Skip to content

fix(cli): delegate command help to local cli#2184

Draft
liangmiQwQ wants to merge 4 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/fix-local-command-help
Draft

fix(cli): delegate command help to local cli#2184
liangmiQwQ wants to merge 4 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/fix-local-command-help

Conversation

@liangmiQwQ

Copy link
Copy Markdown
Collaborator

Close #1995

The global CLI currently renders help for commands implemented by the local CLI, so its documentation can drift from the installed local toolchain.

This PR moves prepared help for delegated commands into the local CLI and routes global, local, and task-script help through the same themed renderer. It also refreshes the documented options to match the current tools while omitting config-file flags that Vite+ does not expose in this workflow.

🤖 Generated with Codex

@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 9d31e3c
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a5899857969750008ac15e6

@liangmiQwQ liangmiQwQ closed this Jul 16, 2026
@liangmiQwQ liangmiQwQ force-pushed the liang/codex/fix-local-command-help branch from b7435e4 to 327d23a Compare July 16, 2026 05:23
Move delegated command help into the local CLI, preserve help annotations, and stabilize dev-server snapshot synchronization.
@liangmiQwQ liangmiQwQ reopened this Jul 16, 2026
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9d31e3c6d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/cli/src/help.ts
}
print_runtime_header(render_options.show_header);
maybe_print_runtime_header("dev", &args, render_options.show_header);
commands::delegate::execute(cwd, "dev", &args).await

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid resolving project Node just to show help

For global vp dev --help/vp build --help and the other delegated help paths, this now falls through to commands::delegate::execute, whose delegate_to_local_cli path resolves and may download the project runtime before the JS help can print. In a project pinned to a Node version that is unavailable or not yet downloaded, a help request can now fail or perform network/runtime setup even though the previous Rust help returned immediately; route help through a side-effect-free CLI-runtime path instead.

Useful? React with 👍 / 👎.

Comment thread packages/cli/src/help.ts
Comment thread packages/cli/src/help.ts
Comment on lines +657 to +660
rows: [
{
label: '-f, --format <FORMAT>',
description: 'Bundle format: esm, cjs, iife, umd (default: esm)',

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Include pack config-loader flags in help

vp pack --help now renders this static list instead of the real pack-bin.ts CLI help, but the list starts at -f, --format and omits the supported --config-loader <loader> and --no-config options defined immediately before it in packages/cli/src/pack-bin.ts. Users who need to change or disable pack config loading will no longer discover these valid flags from help output.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delegate command's --help to local cli

1 participant