AI Agent Hub
Back to skills
💻

Anvil Terminal CLI/TUI Development

Development Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @org-02qudk26/anvil1.

About this skill

Problem

CLI/TUI tools often work in the happy path but fail when --help is weak, exit codes are arbitrary, pipes hang, or --json schemas drift. Anvil treats the terminal interface as a stable contract: command signatures, subcommands, flag conventions, environment variables, config formats, and machine-readable output should be deliberate.

How It Works

It starts by locking the BLUEPRINT command contract, then builds the skeleton, TTY-aware interaction, and failure paths.

  • Command design: subcommands, flag conventions, --help, --version, and POSIX-style exit codes.
  • TUI interaction: spinners, progress bars, tables, selection menus, with --no-color and non-TTY fallbacks.
  • Automation compatibility: human-readable output by default; --json as a stable API contract; --no-prompt or --no-interactive for CI and agent execution.
  • Toolchain integration: shell completion, config precedence, doctor checks, and Homebrew/deb/npm/cargo distribution paths.

Boundaries

Use it for CLI/TUI implementation and review, not for pure business logic, full CI orchestration, or extensive documentation. Confirm impact before changing existing command interfaces, adding dependencies, editing global configs, or introducing blocking interactive prompts.

Use Cases

  • Design subcommands, flags, help, and exit codes for an internal build tool, plus a --json contract.
  • Run a CLI in non-TTY CI with --no-prompt, --no-color, and stable JSON output.
  • Generate Bash/Zsh/Fish/PowerShell completions and add a CI harness to catch drift.
  • Wrap an existing linter or test runner with doctor checks and config precedence.

Best For

  • Engineers owning CLI interfaces: clarify flags, help, exit codes, and --json contracts.
  • Platform engineers maintaining dev tools: support CI, non-TTY, completion, and config precedence.
  • TUI engineers building terminal products: handle prompts, progress, tables, and non-interactive fallbacks.
  • DevOps engineers shipping tooling: manage Homebrew, deb, npm/cargo distribution and install scripts.