Skip to content

feat: add shell completion for nemoclaw CLI #155

@vasanth53

Description

@vasanth53

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)

Metadata

Metadata

Assignees

Labels

area: cliCommand line interface, flags, terminal UX, or output
No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions