Repository navigation
Description
Describe the bug
When using global cli, vp <dev/pack/bulid etc.> --help does not delegate to local cli. Instead, Vite+ maintained a help.rs to record all commands
This can cause bugs: when the global Vite+'s cli version is different from local cli's, the help document will mismatch with the real behavior.
What's more, I don't think having a document in global cli is good for maintaining, it requires Vite+ to update help.rs when upstream gets update every single time. It has already had some mismatch.
$ vp dev --help
VITE+ - The Unified Toolchain for the Web
Usage: vp dev [ROOT] [OPTIONS]
Run the development server.
Options are forwarded to Vite.
Arguments:
[ROOT] Project root directory (default: current directory)
Options:
--host [HOST] Specify hostname
--port <PORT> Specify port
--open [PATH] Open browser on startup
--strictPort Exit if specified port is already in use
-c, --config <FILE> Use specified config file
--base <PATH> Public base path
-m, --mode <MODE> Set env mode
-h, --help Print help
# ⚠️⚠️ Missed: `--force`, `--experimentalBundle`, `--debug` etc. ⚠️⚠️
Examples:
vp dev
vp dev --open
vp dev --host localhost --port 5173
Documentation: https://viteplus.dev/guide/devHowever, directly delegating help document to local may bring new challenge. Different tools have different output formats. Vite itself, Vitest and tsdown use cac (no color / special format), while Oxlint and Oxfmt use its own colorful output, Vite+'s commands like vp check use viteplus style output. It's hard to make all tools' output unified. But I still believe document correctness should take precedence over brand consistency.
Reproduction
https://github.com/liang-demos/vite-plus-help-message-mismatch.git
Steps to reproduce
vp dev --help
vpr localhelp --help
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Effort
Target date
Start date
Activity
liangmiQwQ commentedon Jul 1, 2026
Local cli's help message is not completely proper, either.
fix(cli): delegate command help to local cli (#2184)