Repository navigation
Closed
Description
Problem
The CLI grew organically across 9 releases. Commands were added as features shipped, not designed as a cohesive interface. For v1.0, the CLI should feel intentional.
Audit Areas
1. Help Text Consistency
Every command should have:
- One-line description (shows in
cortex --help) - Detailed description with examples (shows in
cortex <cmd> --help) - Flag descriptions that explain what the flag does, not just what it is
Bad: --mode string search mode
Good: --mode string search strategy: bm25 (exact keywords), semantic (conceptual), hybrid (both, default), rrf (rank fusion)
2. Flag Naming Consistency
Audit for inconsistencies:
- Is it
--limitor--maxor-n? Pick one pattern. - Is it
--sourceor--provider? - Is it
--agenteverywhere? - Do boolean flags use
--no-Xconsistently? (--no-enrich,--no-classify,--no-infer)
3. Output Format
- Default output should be human-readable (aligned columns, colors for TTY)
--jsonflag on every command that returns data (for scripting/piping)--quietflag to suppress non-essential output (for cron jobs)
4. Command Grouping
Current: flat list of ~20 commands. Consider logical grouping:
Memory: import, search, extract, classify, cleanup, reimport
Observe: stats, stale, conflicts, alerts
Graph: graph (serve + CLI queries)
Connect: connect add/sync/schedule/list
LLM: reason, summarize, expand (or are these flags, not commands?)
System: mcp, embed, optimize, version
5. Shell Completion
- Generate completion scripts for bash, zsh, fish
cortex completion bash > /etc/bash_completion.d/cortex- Cobra has built-in support β wire it up
6. Discoverability
cortexwith no args should show a helpful overview, not just the flag list- Include "Quick start" in the root help text
cortex doctorcommand that checks: DB exists, embeddings available, LLM keys configured, connectors set up
Acceptance Criteria
- Every command has examples in
--help - Flag naming is consistent across all commands
-
--jsonoutput available on search, stats, stale, conflicts, agents - Shell completions generated and documented
-
cortex doctorcommand validates installation health - Root
cortexhelp shows logical command groups
Activity
feat: CLI hardening, doctor/agents commands, graph pagination (#228, #β¦
feat: grouped CLI help, shell completions, cleaner UX (#236)
hurttlocker commentedon Feb 26, 2026
All acceptance criteria met:
Shipped in ab53871:
cortex completion bash|zsh|fishcortexCommandsvar as single source of truth for all 31 commandscortex <cmd> --help)Pre-existing (verified):
--agenteverywhere,--jsonon 12+ commands,--no-Xpattern consistentcortex doctorcommand (ac5a54c)--jsonon search, stats, stale, conflicts, agents, list, export, cluster, bench, doctor, graph, optimize856 test functions, 15 packages green.