nanocoder icon indicating copy to clipboard operation
nanocoder copied to clipboard

[Feature] Shell completions: cover review, verify, skills add, --prompt-file and --mouse/--no-mouse

Open me-adityaraj8 opened this issue 1 month ago • 1 comments

Description

Shell completions don't offer some of the current CLI. docs/features/shell-completions.md already lists review, skills add, --prompt-file and --mouse / --no-mouse as "not covered yet". verify was added to the CLI later and is missing from the bash, zsh and fish scripts too, without being mentioned in that list.

Use Case

Typing nanocoder ver<Tab>, nanocoder skills <Tab> or nanocoder run --prom<Tab> completes nothing today, so these have to be typed in full. Nothing catches a flag that is added to the CLI but not to the completion spec, which is how --prompt-file and --mouse were missed.

Proposed Solution

  • Add review, verify and skills (child add) to COMPLETION_SUBCOMMANDS in source/cli-completions/spec.ts.
  • Add prompt-file (takes a value), mouse and no-mouse to COMPLETION_FLAGS.
  • Update the coverage paragraph in docs/features/shell-completions.md.

Alternatives Considered

Leaving them for users to type in full, as the docs say today.

Additional Context

  • [x] I have searched existing issues to ensure this is not a duplicate
  • [x] This feature aligns with the project's goals (local-first AI assistance)

Implementation Notes (optional)

I'd also add a test in source/cli-completions/cli.spec.ts that checks every flag in RUN_FLAGS_WITH_VALUES / RUN_FLAGS_STANDALONE (from run-prompt-args.ts) is in the completion spec with the right takesValue. It fails on main today for --prompt-file and passes with the change, so a new flag can't silently miss completion again.

init's --preset / --lean are per-subcommand flags, which the spec can't express yet, so I'd leave them out of this one.

I have this ready locally and would like to open the PR.

me-adityaraj8 avatar Oct 23 '26 13:10 me-adityaraj8

Covered by 544cf36 on main — thanks @will-lamerton! Closing.

me-adityaraj8 avatar Oct 24 '26 12:10 me-adityaraj8