Conversation
|
There was a problem hiding this comment.
Pull request overview
Adds machine-readable JSON output modes to fitbit-cli and refactors display logic so the CLI can emit either rich tables or JSON for the same endpoints.
Changes:
- Introduces
--jsonand--raw-jsonoutput modes and routes output selection through a newfitbit_cli/output.pymodule. - Updates
formatter.pydisplay functions to supportas_jsondict returns in addition to table rendering. - Updates packaging/docs (version bump, Python requirement to 3.12+, README + new AGENTS guidance).
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Updates metadata (license classifier) and raises python_requires to >=3.12. |
| fitbit_cli/output.py | New output-mode layer for table vs JSON vs raw JSON output. |
| fitbit_cli/main.py | Simplifies main flow to select output mode. |
| fitbit_cli/formatter.py | Adds as_json branches to return plain dicts; table output remains via rich. |
| fitbit_cli/cli.py | Adds --json/--raw-json flags and adjusts “no args” validation logic. |
| fitbit_cli/init.py | Bumps package version to 1.6.0. |
| README.md | Documents the new JSON modes and updates usage output snippet. |
| AGENTS.md | Adds contributor/agent guidance (but currently includes duplicated/conflicting sections). |
| .gitignore | Adds ignores for local/dev directories. |
| .envrc | Adds a direnv/pyenv layout pin (may be problematic to commit). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
--json/-jflag for minimized, token-efficient JSON output (table fields only, no spinner)--raw-json/-rflag for full raw Fitbit API response as compact JSONoutput.pywithtable_display,json_display, andraw_json_displayfunctionsdisplay_*functions informatter.pywithas_json=Falseparameter; JSON branch returns a plain snake_case dict, table branch unchangedmain.pyto branch on output modeAGENTS.mdwith full contributor and agent guidance