Skip to content

feat: add --json flag to kidd commands #158

Description

@zrosenbauer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions