Skip to content

feat: add uv package manager support#1

Open
adawalli wants to merge 2 commits intomainfrom
uv
Open

feat: add uv package manager support#1
adawalli wants to merge 2 commits intomainfrom
uv

Conversation

@adawalli
Copy link
Owner

@adawalli adawalli commented Jun 19, 2025

Add modern Python packaging with uv tool installation support:

  • Add pyproject.toml with console script entry points (ccusage-monitor, claude-monitor)

  • Update README.md to prioritize uv installation over legacy methods

  • Add CLAUDE.md development documentation

  • Add comprehensive .gitignore for Python project

Users can now install with: uv tool install claude-usage-monitor

Maintains full backwards compatibility with existing installation methods

Fixes Maciek-roboblog#12

Summary by CodeRabbit

  • Documentation

    • Added a comprehensive user and developer guide for the Claude Code Usage Monitor project.
    • Updated installation and usage instructions to recommend the modern "uv" tool, with clear separation from legacy methods.
    • Improved clarity and organization of usage examples and best practices.
  • Chores

    • Added a detailed .gitignore file to exclude development, environment, and system-specific files from version control.
    • Introduced a project configuration file to streamline packaging, dependencies, and CLI entry points.

@coderabbitai
Copy link

coderabbitai bot commented Jun 19, 2025

Warning

Rate limit exceeded

@adawalli has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 6 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6f81f60 and 26bae77.

📒 Files selected for processing (2)
  • CLAUDE.md (1 hunks)
  • README.md (16 hunks)

Walkthrough

The changes introduce essential project infrastructure files: a comprehensive .gitignore for Python projects, detailed user and developer documentation in CLAUDE.md, a modernized and reorganized README.md with updated installation and usage instructions incorporating the "uv" tool, and a complete pyproject.toml for packaging, dependencies, and CLI entry points.

Changes

File(s) Change Summary
.gitignore Added a Python-centric .gitignore to exclude environment, build, OS, editor, and temp files.
CLAUDE.md Added detailed documentation covering usage, architecture, setup, and development notes.
README.md Updated with modern "uv" install instructions, reorganized usage, and clarified legacy methods.
pyproject.toml Added project metadata, dependencies, build system, and CLI entry points for packaging.

Assessment against linked issues

Objective Addressed Explanation
Use proper package manager "uv" for install

Poem

In the warren, files now gleam and shine,
With docs and configs all neatly aligned.
A .gitignore shields our code from the mess,
While pyproject.toml brings packaging finesse.
README and CLAUDE guide every hop and turn—
Now the rabbit’s project is easy to learn! 🐇✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (6)
pyproject.toml (1)

33-36: Pin Python dependency versions?
Consider specifying a version range for reproducible builds, e.g.:

-dependencies = ["pytz"]
+dependencies = ["pytz>=2023.3,<2024.0"]
README.md (3)

239-242: Replace bold emphasis with a proper heading
Markdown lint flagged **With uv tool installation:** as a pseudo-heading. Convert to an actual heading, e.g.:

- **With uv tool installation:**
+##### With uv tool installation

273-277: Replace bold emphasis with a proper heading
Same pattern occurs here—use a markdown heading instead of bold text.

- **With uv tool installation:**
+##### With uv tool installation

293-297: Replace bold emphasis with a proper heading
For consistency and lint compliance, swap the bold line for a heading (e.g., ##### With uv tool installation).

- **With uv tool installation:**
+##### With uv tool installation
CLAUDE.md (2)

136-136: Add missing article in sentence
Grammar fix for clarity:

- Automatically switches to custom_max when Pro limit exceeded
+ Automatically switches to custom_max when the Pro limit is exceeded

137-137: Capitalize list item for consistency
Uniform capitalization improves readability:

- custom_max scans previous sessions to find actual token limits
+ Custom_max scans previous sessions to find actual token limits
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bcab2af and cb92155.

📒 Files selected for processing (4)
  • .gitignore (1 hunks)
  • CLAUDE.md (1 hunks)
  • README.md (16 hunks)
  • pyproject.toml (1 hunks)
🧰 Additional context used
🪛 LanguageTool
CLAUDE.md

[uncategorized] ~136-~136: You might be missing the article “the” here.
Context: ...tomatically switches to custom_max when Pro limit exceeded - custom_max scans previ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🪛 markdownlint-cli2 (0.17.2)
README.md

537-537: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


645-645: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

🔇 Additional comments (12)
.gitignore (1)

1-201: Comprehensive .gitignore is spot on
All relevant Python artifacts, virtual environments, IDE settings, OS files, and project‐specific patterns are correctly excluded, ensuring a clean repo.

pyproject.toml (6)

1-4: Build system configuration is correct
Using Hatchling as the build backend aligns with modern Python packaging standards.


5-36: Project metadata looks solid
Name, version, readme, license, Python requirement, authors, keywords, and classifiers are all appropriate and complete.


37-41: Project URLs are correctly set
Homepage, repository, and issues links all point to the right GitHub locations.


42-45: CLI entry points configured properly
Both ccusage-monitor and claude-monitor map to ccusage_monitor:main as intended.


46-49: Wheel target configuration is adequate
Packages and includes cover the main module file for wheel builds.


50-59: Source distribution includes all necessary docs
README.md, LICENSE, CLAUDE.md, DEVELOPMENT.md, CONTRIBUTING.md, and TROUBLESHOOTING.md are included for sdist.

README.md (4)

52-58: Modern installation section introduction is clear
The new uv-based instructions offer a smooth, one-stop setup path.


67-80: Install-and-run instructions are straightforward
Commands for installing dependencies and running the tool globally are concise and correct.


104-111: Virtual environment setup is well-documented
Step-by-step venv instructions will help new contributors replicate the environment reliably.


215-224: Basic usage examples updated for uv
Users see both ccusage-monitor and claude-monitor examples, covering different preferences.

CLAUDE.md (1)

1-4: Overall documentation is comprehensive
CLAUDE.md adds in-depth architecture, setup, and usage guidance that nicely complements README.md.

Add modern Python packaging with uv tool installation support:

- Add pyproject.toml with console script entry points (ccusage-monitor, claude-monitor)

- Update README.md to prioritize uv installation over legacy methods

- Add CLAUDE.md development documentation

- Add comprehensive .gitignore for Python project

Users can now install with: uv tool install claude-usage-monitor

Maintains full backwards compatibility with existing installation methods
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
README.md (1)

13-24: Outdated Table of Contents anchors

The TOC still references “⚡ Quick Start” and “🔒 Production Setup (Recommended)”, but those sections were replaced by “Modern Installation with uv (Recommended)” and “Legacy Installation Methods”. Please update the TOC entries and their anchor links to match the new headings.

🧹 Nitpick comments (5)
README.md (1)

218-227: Convert emphasis to proper subheadings

Sections like With uv tool installation: and Traditional/Development mode: use bold text rather than Markdown headings. Converting them to #### (or deeper) headings will improve navigation, include them in the TOC, and satisfy markdownlint rules.

Also applies to: 242-255

CLAUDE.md (4)

1-4: Add a Prerequisites section

Consider inserting a top-level Prerequisites section listing required Node.js, npm, Python 3.6+, and the uv tool before the setup commands. This helps users prepare their environment.


128-134: Fix missing article in session description

Change “Sessions start with first message” to “Sessions start with the first message” to improve clarity.


135-139: Fix missing determiner in plan switching description

Update to “automatically switches to custom_max when the Pro limit is exceeded” for grammatical correctness.


140-142: Fix missing article in future development note

Revise to “See DEVELOPMENT.md for a roadmap including:” to correct the missing article.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cb92155 and 6f81f60.

📒 Files selected for processing (4)
  • .gitignore (1 hunks)
  • CLAUDE.md (1 hunks)
  • README.md (16 hunks)
  • pyproject.toml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .gitignore
🚧 Files skipped from review as they are similar to previous changes (1)
  • pyproject.toml
🧰 Additional context used
🪛 LanguageTool
CLAUDE.md

[uncategorized] ~129-~129: You might be missing the article “the” here.
Context: ...g session system: - Sessions start with first message and last exactly 5 hours - Mult...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~136-~136: You might be missing the article “the” here.
Context: ...tomatically switches to custom_max when Pro limit exceeded - custom_max scans previ...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~141-~141: You might be missing the article “a” here.
Context: ...ture Development See DEVELOPMENT.md for roadmap including: - ML-powered auto-detection ...

(AI_EN_LECTOR_MISSING_DETERMINER_A)

🪛 markdownlint-cli2 (0.17.2)
README.md

540-540: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


648-648: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)

Update installation docs to use local directory instead of PyPI:

- Change from 'uv tool install claude-usage-monitor' to 'uv tool install .'

- Add git clone step since package not yet published to PyPI

- Clarify platform-specific uv installation commands

Fixes installation errors for users trying to install from PyPI
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.

Use proper package manager

1 participant