Skip to content

CLI: add --json flag to list subcommand #8

Description

@FROWNINGdev

What

The django-orm-lens list subcommand currently emits plain app.Model lines. scan already supports --format json. Add --json (or --format json) support to list for pipe-friendly machine output.

Where

cli/django_orm_lens/cli.py_cmd_list (search for def _cmd_list).

Acceptance

  • django-orm-lens list --json prints [{"app": "...", "model": "..."}, ...]
  • django-orm-lens list unchanged (backward compat)
  • Add one test in cli/tests/ covering the new output shape
  • All existing pytest -q pass (currently 44)

Difficulty

S (< 1 hour). Pattern to follow: how _cmd_scan handles --format — just mirror it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions