Skip to content

feat: add JSON output support to CLI commands#52

Open
Jiya3177 wants to merge 1 commit into
Hell1213:mainfrom
Jiya3177:feat/json-output-cli-33
Open

feat: add JSON output support to CLI commands#52
Jiya3177 wants to merge 1 commit into
Hell1213:mainfrom
Jiya3177:feat/json-output-cli-33

Conversation

@Jiya3177
Copy link
Copy Markdown

Summary

Add JSON output support to selected Typer CLI commands.

Related Issue

Fixes #33

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Test changes
  • CI/Chore

Testing

  • uv run ruff check passes
  • uv run mypy passes
  • uv run pytest passes
  • Manual testing done

Manual testing:

  • PYTHONPATH=src python3 -m pytest tests/cli/test_new_cli.py
  • python3 -m ruff check src/oss_dev/cli/app.py tests/cli/test_new_cli.py

Note: Full test suite was run and has unrelated existing/environment failures around Gemini API key, GitHub PR fallback behavior, and macOS temp path resolution.

Description

Added a --json flag to:

  • oss-dev discover repos
  • oss-dev discover issues
  • oss-dev issues list
  • oss-dev analyze

When --json is passed, the commands now print valid structured JSON and skip the default formatted text output. Existing text output remains unchanged when --json is not provided.

Added CLI tests using CliRunner and json.loads() to verify JSON output for all updated commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add JSON output format support to CLI commands

1 participant