Skip to content

Split the CLI into command modules and add command-focused tests #147

Description

@lbliii

Context

src/kida/cli.py has accumulated many commands and helpers in one file. The CLI is public contract surface, so command-specific behavior should be easier to review and test without threading through a 1,300-line module.

Evidence

  • src/kida/cli.py is 1,304 lines.
  • main() is about 344 lines.
  • The file includes check, render, format, components, explain, README scaffolding, report/data parsing, and shared output helpers.
  • CLI behavior is part of the public contract per the root and runtime steward docs.

Proposed Scope

  • Move command implementations into small modules under src/kida/cli/ or equivalent while preserving the kida.cli:main entrypoint.
  • Keep argument parsing and command dispatch straightforward.
  • Add/organize command-specific tests for check/render/readme/report paths.

Done When

  • kida.cli:main remains stable.
  • Command implementations are reviewable by domain.
  • Existing CLI tests and public API snapshot pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions