Choose CLI Stack
A CLI is the right product when users want automation more than screens.
CLI Wins When
- Users are developers, operators, or power users.
- The product runs in scripts, CI, cron, or local automation.
- Inputs and outputs are files, streams, APIs, or shell commands.
- A GUI would mostly wrap flags and logs.
- Distribution can happen through one binary, package manager, or repo-local tool.
Language Defaults
| Pick | Use when | Trade-off |
|---|---|---|
| Go | Networking, subprocesses, test runners, simple static binaries, backend adjacency | Less low-level control than Rust |
| Rust | Performance, safety, native libraries, dependency-conscious tools | Slower iteration and steeper learning curve |
| Python | Internal scripts, data tasks, quick automation | Packaging and runtime management can be the product pain |
| Node/TypeScript | JS ecosystem tools, frontend-adjacent CLIs | Runtime/dependency footprint |
Minimum Starter
cmd/<tool>/ # entrypoint
internal/ # implementation packages
README.md # install and examples
docs/commands.md # command reference
tests/ # command and library tests
Quality Gates
--helpis useful.- Exit codes are predictable.
- Output formats are documented.
- Config paths are explicit.
- Dry-run exists for destructive operations.
- Install/update path is real for target users.
Tip: If the CLI grows a server, keep the server hidden or explicit. The user should not need to debug process orchestration unless that is the product.