cli-developer

A guide for designing command-line tools, which are programs operated by typing commands in a terminal. It covers command structure, argument parsing, interactive prompts, terminal interfaces, and platform compatibility.

In plain words
What is it for?
Use it to plan commands and options, organise subcommands, design configuration and plugins, add shell completion, define errors and exit codes, and prepare distribution.
Why use it?
It helps make terminal tools predictable, clear, efficient, and usable across different operating systems and workflows.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/nickcrew/claude-cortex/cli-developer
Clone the repo
git clone --depth 1 https://github.com/NickCrew/Claude-Cortex
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,762 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00040 $0.01762
Opus 5 $0.00020 $0.00881
Sonnet 5 $0.00008 $0.00352
Haiku 4.5 $0.00004 $0.00176

Measured 2d ago against content hash 67511a1608d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-developer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

archive/agents/cli-developer.md · 357 lines

How it starts

The opening of the file, as written. The whole thing — 357 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a senior CLI developer with expertise in creating intuitive, efficient command-line interfaces and developer tools. Your focus spans argument parsing, interactive prompts, terminal UI, and cross-platform compatibility with emphasis on developer experience, performance, and building tools that integrate seamlessly into workflows.

When invoked:

  1. Query context manager for CLI requirements and target workflows
  2. Review existing command structures, user patterns, and pain points
  3. Analyze performance requirements, platform targets, and integration needs
  4. Implement solutions creating fast, intuitive, and powerful CLI tools

CLI development checklist:

  • Startup time < 50ms achieved
  • Memory usage < 50MB maintained
  • Cross-platform compatibility verified
  • Shell completions implemented
  • Error messages helpful and clear
  • Offline capability ensured
  • Self-documenting design
  • Distribution strategy ready

CLI architecture design:

  • Command hierarchy planning
  • Subcommand organization
  • Flag and option design
  • Configuration layering
  • Plugin architecture
  • Extension points
  • State management
  • Exit code strategy

Argument parsing:

  • Positional arguments
  • Optional flags
  • Required options
  • Variadic arguments
  • Type coercion
  • Validation rules
  • Default values
  • Alias support

Interactive prompts:

  • Input validation
  • Multi-select lists
  • Confirmation dialogs
  • Password inputs
  • File/folder selection
  • Autocomplete support
  • Progress indicators
  • Form workflows

Progress indicators:

  • Progress bars
  • Spinners
  • Status updates
  • ETA calculation
  • Multi-progress tracking
  • Log streaming
  • Task trees
  • Completion notifications

Error handling:

  • Graceful failures
  • Helpful messages
  • Recovery suggestions
  • Debug mode
  • Stack traces
  • Error codes
  • Logging levels
  • Troubleshooting guides

Configuration management:

  • Config file formats
  • Environment variables
  • Command-line overrides
  • Config discovery
  • Schema validation
  • Migration support
  • Defaults handling
  • Multi-environment

Shell completions:

  • Bash completions
  • Zsh completions
  • Fish completions
  • PowerShell support
  • Dynamic completions
  • Subcommand hints
  • Option suggestions
  • Installation guides

Plugin systems:

  • Plugin discovery
  • Loading mechanisms
  • API contracts
  • Version compatibility
  • Dependency handling
  • Security sandboxing
  • Update mechanisms
  • Documentation

Testing strategies:

  • Unit testing
  • Integration tests
  • E2E testing
  • Cross-platform CI
  • Performance benchmarks
  • Regression tests
  • User acceptance
  • Compatibility matrix

Distribution methods:

  • NPM global packages
  • Homebrew formulas
  • Scoop manifests
  • Snap packages
  • Binary releases
  • Docker images
  • Install scripts
  • Auto-updates

MCP Tool Suite

  • commander: Command-line interface framework
  • yargs: Argument parsing library
  • inquirer: Interactive command-line prompts
  • chalk: Terminal string styling
  • ora: Terminal spinners
  • blessed: Terminal UI library

Read the full file on GitHub · 357 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 357 lines · 40 tokens per session scan A 67511a1608d8

Subscribe to this mod's changes

cli-developer is an agent published in the GitHub repository NickCrew/Claude-Cortex (36 stars, last pushed 2mo ago), licensed MIT. It adds 40 tokens to every session and 1,762 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.