Summary
Add a --json flag to the existing kidd commands CLI command that outputs the full command tree as structured JSON, consumable by tooling like the demo generator (#157).
Current state
kidd commands (packages/cli/src/commands/commands.ts) already walks the command map and builds a TreeEntry tree with name, description, and children — but only renders ASCII art output.
Proposed scope
- Add
--json flag to kidd commands that outputs richer structured JSON including: options with types/defaults/descriptions, positionals, aliases, deprecation status
- Output shape:
{
"name": "my-cli",
"version": "1.0.0",
"commands": [
{
"name": "deploy",
"description": "Deploy the application",
"aliases": ["d"],
"options": [
{ "name": "env", "type": "string", "description": "Target environment", "required": true }
],
"positionals": [],
"commands": []
}
]
}
Related
Summary
Add a
--jsonflag to the existingkidd commandsCLI command that outputs the full command tree as structured JSON, consumable by tooling like the demo generator (#157).Current state
kidd commands(packages/cli/src/commands/commands.ts) already walks the command map and builds aTreeEntrytree with name, description, and children — but only renders ASCII art output.Proposed scope
--jsonflag tokidd commandsthat outputs richer structured JSON including: options with types/defaults/descriptions, positionals, aliases, deprecation status{ "name": "my-cli", "version": "1.0.0", "commands": [ { "name": "deploy", "description": "Deploy the application", "aliases": ["d"], "options": [ { "name": "env", "type": "string", "description": "Target environment", "required": true } ], "positionals": [], "commands": [] } ] }Related