Enhance CLI UX by supporting shell expansion for claude-flow sub-options (nested subcommand autocompletion)
- Dominant language
- TypeScript
- Stars
- 72.7k
- Forks
- 8.6k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 83
Description
Description:
Currently, the claude-flow CLI tool does not support shell autocompletion for its nested subcommands or sub-options. This degrades user experience of someone staying at the Linux command line, particularly when dealing with multi-level command trees that require memorization or frequent consultation of --help.
This feature request is to implement shell expansion (autocomplete) support for claude-flow, inspired by techniques described in this Stack Overflow discussion:
🔗 https://stackoverflow.com/questions/17879322/how-do-i-autocomplete-nested-multi-level-subcommands
Use Case
Example of desired UX improvement:
```
$ claude-flow
analyze batch config help
$ claude-flow config
set get reset
$ claude-flow config set
api-key model timeout
```
This would support nested structures with arbitrary depth, improving discoverability and productivity and bring shell-level usability to more similar to being within the claude shell.
Suggested Implementation Approaches
- Leverage argcomplete or similar Python tools that support dynamic completions.
- Generate a _claude-flow shell completion script with support for nested subcommands, as shown in the linked Stack Overflow example.
Benefits
- Faster command-line usage
- Lower cognitive load for new users
- Easier scripting and automation
Related
- [How do I autocomplete nested, multi-level subcommands?](https://stackoverflow.com/questions/17879322/how-do-i-autocomplete-nested-multi-level-subcommands) — helpful discussion on shell expansion design patterns.
Would love to see this enhancement prioritized for smoother CLI interactions!
Contributor guide
Research direction
Start by locating the claude-flow CLI entry point and its nested command definitions. Review the linked nested-subcommand completion discussion and assess argcomplete or generated shell completion scripts. Done means completion exposes top-level, nested, and deeper sub-options such as the examples in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, typescript
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100