Files
deepseek-harness/docs/upgrade-guide/v0.2.1-alpha.1/plugin-option-placement/guide.md
T
Tianyi Cui 231d5a311e fix(cli): bound CLI help alias discovery and document plugin option placement
`collectCliHelp` stops propagating an alias when it reaches a page
already on the current path, so a `help [command]` row that prints its
parent's help no longer recurses until the stack overflows. `serve|s`
command rows are split into separately collected names.

The CLI reference and upgrade guide describe the forwarded-argument
boundary that Commander applies, including a leading pnpm option, and
args.spec.ts pins that `--profile` placed after a leading pnpm option is
forwarded. Generated pages use the repository's two-line generated
header, and docs/AGENTS.md lists the CLI help among the generated
references.

Refs #4114
2026-10-05 17:45:17 +08:00

1.5 KiB

kind, description
kind description
upgrade-guide dsh plugin reads --profile only before the forwarded pnpm arguments and prints its own help.

dsh plugin option placement

English | 中文

Change

dsh plugin reads --profile only before the forwarded pnpm arguments, which start at the first token it does not recognize, and it has its own help. Previously it accepted --profile <name> anywhere on the command line, had no help of its own, and forwarded -h and --help to pnpm from any position.

When the forwarded arguments begin with the pnpm command, everything after that command now reaches pnpm verbatim, including -h, --help, and --profile. In any other position, including after a leading pnpm option such as --filter <selector>, -h or --help prints the dsh plugin help and exits 0. Scripts that place --profile after the pnpm command or after a leading pnpm option fail with required option '--profile <name>' not specified, and dsh plugin --profile <name> --help no longer prints pnpm's help.

Migration

  1. Move --profile <name> before every pnpm argument: replace dsh plugin add <package> --profile <name> with dsh plugin --profile <name> add <package>.
  2. Request pnpm's help for one command after that command, with any pnpm options after it too, as in dsh plugin --profile <name> add --help. For pnpm's general help, forward help: dsh plugin --profile <name> help.
  3. Confirm that dsh plugin --help prints Usage: dsh plugin [options] [args...] and that the commands from steps 1 and 2 reach pnpm.