This directory contains machine-readable documentation of the CLI interface.
commands.json- Complete CLI structure including all commands, arguments, and options
The JSON file uses a custom format specifically designed for CLI documentation:
{
"format": "cli-documentation",
"format_version": "1.0",
"cli": {
"name": "torrust-tracker-deployer",
"version": "0.1.0",
"about": "Deploy and manage Torrust Tracker instances",
"commands": [...]
}
}AI coding assistants can read this file to understand all available commands:
jq '.cli.commands[] | {name, description}' docs/cli/commands.jsonTrack CLI interface changes across versions:
git log -p docs/cli/commands.jsonVerify CLI structure in automated tests:
jq '.cli.commands | length' docs/cli/commands.jsonAfter modifying the CLI interface, regenerate this file:
cargo run -- docs docs/cli/commands.jsonThe documentation is automatically generated from the actual CLI code using Clap's introspection capabilities.
This file should be committed whenever the CLI interface changes, creating a version history of the command structure.