add-command
/add-command
Add a command or command group to this Typer CLI with its settings, errors, output and tests. Use when the user asks for a new subcommand, option or setting.
- Author
- steamfield ↗
- Repository
- stacks ↗
- Licence
- Apache-2.0
- Last repository change
- 08.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 08.11.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Add a command or command group to this Typer CLI with its settings, errors, output and tests. Use when the user asks for a new subcommand, option or setting.
Original author description
Add a command or command group to this Typer CLI with its settings, errors, output and tests. Use when the user asks for a new subcommand, option or setting.
How it works
SKILL.md has no level-two headings · 13 lines, 189 words
SKILL.md preview
---
name: add-command
description: Add a command or command group to this Typer CLI with its settings, errors, output and tests. Use when the user asks for a new subcommand, option or setting.
---
# Add a command
`config show` in `src/<package>/cli.py` is the model. Read it and `docs/ARCHITECTURE.md` first.
1. Put the work in a domain module under `src/<package>/` that returns plain data and raises `CliError`. It never imports Typer.
2. In `cli.py`, add the function with `@app.command("<name>")`, or create a group with `typer.Typer(no_args_is_help=False)` and `app.add_typer(...)` as `config_app` does. Declare arguments and options with `Annotated[..., typer.Argument(...)]` or `typer.Option(...)`; options that apply to every command belong on the root callback.
3. Begin with `settings = start(ctx)`, call the domain module, and finish with `render(output_options(settings), data, human_text)`. `data` must be JSON-serializable.
4. A new failure mode gets a `CliError` with a suggestion. A new error code also needs an `EXIT_CODES` row and a line in `docs/configuration.md`.
5. A new setting goes on `Settings` with a default and a validator, with a precedence case in `tests/test_config.py` and a row in `docs/configuration.md`.
6. Tests: unit tests for the domain module, `tests/test_cli.py` cases for text, `--json` and each error path, and a `tests/integration/` case when the command adds an exit path.
7. Run `make lint typecheck coverage smoke`, then add the command to the README's Usage section.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · steamfield/stacks | 86 | Apache-2.0 |
| todoist/todoist-cli | 100 | MIT |
| proteanhq/protean | 100 | Apache-2.0 |
| doist/todoist-cli | 100 | MIT |
| coralogix/cx-cli | 100 | Apache-2.0 |
| GO-VIRTUAL-bv/tile38.go | 100 | MPL-2.0 |
| steamfield/stacks | 96 | Apache-2.0 |
| steamfield/stacks | 96 | Apache-2.0 |
| ldayton/dippy | 95 | MIT |
Database snapshot: 13.11.2026 · package version e1aa81fa0826 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95building-python-clis
Builds command-line interfaces for Python libraries using Click or Typer. Includes command groups, argument handling, progress bars, shell completion, and CLI testing with CliRunner. Use when adding CLI functionality to a library or building standalone command-line tools. - 100add-cli-command
Use when a ticket adds or changes a command-line interface — a new subcommand, flag, or output format for the repo's CLI tool — and it must follow the CLI's existing conventions for arguments, exit codes, JSON output, help text, and tests. Invoke for "add a `foo bar` command",… - 100python-cli-ops
CLI application patterns for Python. Triggers on: cli, command line, typer, click, argparse, terminal, rich, console, terminal ui. - 100help2skill
Use help2skill to give a Python CLI (Click, Typer, argparse, cyclopts or plumbum) an --llms flag, generate or refresh its SKILL.md, and check hand-written CLI examples against the real command tree. Use when adding agent docs to a CLI or when a help2skill check fails. - 91cli
Guidance for building command-line interfaces and terminal applications in Python. USE FOR: building CLI tools with argparse/click/typer, rich terminal output, TUI applications with textual, CLI testing strategies, output formatting, exit codes DO NOT USE FOR: Python project… - 90CLI Artisan Agent
Knowledge for designing and building command-line interfaces — argument/flag parsing, subcommand structure, interactive prompts, colored and tabular output, progress feedback, exit codes, shell completion, and CLI UX. Use when adding or redesigning a CLI command, choosing a CLI…