Add --status and --version flags to display account, credit information and client version#194
Merged
Conversation
Implements a new --status flag that displays: - User information (name, email, organization owner) - API key label - Rendering credits (plan credits and purchased credits) - Progress bars showing credit usage - Expiration dates - Warning messages when credits are exhausted - Outdated client version warnings in red Changes: - Add cli_output/ module for non-interactive CLI output formatting - status.py: Status display with progress bars - dry_run.py: Dry run output (moved from plain2code_utils.py) - render_summary.py: Render exit summary (moved from plain2code.py) - Add --status argument to plain2code_arguments.py - Add status() method to codeplain_REST_api.py - Update plain2code.py to handle --status early-exit - Add comprehensive unit tests in test_cli_output.py (23 tests) - Update CLAUDE.md documentation Features: - Handles both timezone-aware and naive datetimes from API - Shows red/bold text for outdated client versions - Displays "expired" vs "expires" based on date - Handles null/empty credit states gracefully - Mutually exclusive with --dry-run and --full-plain Testing: - 23 unit tests covering all status display functions - Edge cases: expired credits, timezone handling, null values - Mock API responses for isolated testing
NejcS
approved these changes
May 25, 2026
NejcS
left a comment
Contributor
There was a problem hiding this comment.
Looks good but I didn't test locally. Do you want testing?
- Add --version argument to display 'codeplain version X.X.X' - Update filename validation to allow --version without filename - Add unit test for --version flag - Version flag takes precedence (checked first in main())
4282463 to
573a369
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a new --status flag that displays:
Changes:
Features:
Testing: