NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

feat: add shell completion for nemoclaw CLI

Open vasanth53 opened this issue 8 months ago • 0 comments

Summary

Add shell completion support for the nemoclaw CLI to improve user experience.

Currently, users have to type full commands manually. Adding shell completion would help users discover and complete commands faster.

Proposed change

Add shell completion for:

  • bash — generate completion script via nemoclaw completion bash
  • zsh — generate completion script via nemoclaw completion zsh
  • fish — generate completion script via nemoclaw completion fish

Implementation approach

  1. Add a completion subcommand to bin/nemoclaw.js that outputs the appropriate completion script
  2. For each shell type, generate completions for:
    • Global commands: onboard, setup, setup-spark, deploy, start, stop, status, list, help
    • Sandbox-scoped actions: connect, status, logs, policy-add, policy-list, destroy
    • Sandbox names from registry

Example usage

Additional considerations

  • Detect current shell automatically when run without arguments
  • Provide installation instructions in the completion output

Related

  • This is a common pattern in CLI tools (e.g., docker, kubectl, helm)

vasanth53 avatar Mar 17 '26 08:03 vasanth53