v0.4.1: Better Discoverability & Critical README Fixes
π― What's New in v0.4.1
π GitHub Discoverability (New!)
- β
Added 5 repository topics for better search visibility:
claude-code,claude-skills,cost-tracking,llm-optimization,token-optimization - β Optimized README hook for 30-second understanding (was 5-min read)
- β Added "Why PyCostAudit Different" comparison table (vs alternatives)
π Real-World Example Added
- Before: "Spent $47 today"
- After: "$32 on PDFs (save $23) + $12 GitHub ops (save $280/mo) + $3 hours"
- Includes $420/month hidden cost discovery example
π§ Critical README Fixes (10 errors corrected)
- Fixed variable naming in code examples (use
auditorconsistently) - Fixed class names (PyCostReporter β PyCostAudit everywhere)
- Fixed package/import names (pycostreporter β pycostaudit)
- Fixed database paths (~/.pycostreporter/ β ~/.pycostaudit/)
- Fixed environment variable names (PYCOSTREPORTER_DB β PYCOSTAUDIT_DB)
- Fixed multiplier descriptions and baseline clarifications
- Fixed terminology ("busy hour" β "peak hour")
- All code examples now executable and testable
π·οΈ Enhanced Documentation
- Clear scope statement: "Tracks Claude Code only (not Desktop, Web, or API direct calls)"
- Added cost estimate disclaimers including local taxes and currency considerations
- Added UV installation instructions alongside pip
- Added clear agent integration examples for autonomous workflows
- Reorganized Claude Code integration guidance for users and agents
π Python & Runtime Improvements
- Fixed Tokio runtime initialization for Python tests (using once_cell::Lazy for global runtime)
- Updated Python wrapper to use PyCostAudit class consistently
- Fixed test imports to use Python wrapper instead of Rust core directly
- Improved error handling and JSON parsing
π§ͺ Tests
- β 15 Rust unit tests passing
- β 2 core integration tests passing (basic_cost_tracking, file_format_multipliers)
- Fixed test assertions to match actual JSON field names
π¦ Release Highlights
- PyPI: https://pypi.org/project/pycostaudit/0.4.1/
- Installation:
pip install pycostauditoruv pip install pycostaudit - Quick Start: Track Claude Code costs in 3 lines of code
- Platform Support: Python 3.9-3.13, macOS/Linux/Windows
π Installation
# With pip
pip install pycostaudit==0.4.1
# With uv (faster)
uv pip install pycostaudit==0.4.1
# From source
git clone https://github.com/Mullassery/PyCostAudit.git
cd PyCostAudit
make installπ Quick Start
from pycost_audit import PyCostAudit
auditor = PyCostAudit()
# Track an operation
cost = auditor.track_operation(
operation_type="file_read",
tokens_input=450,
tokens_output=120,
model="claude-3-5-haiku",
file_source="pdf_url" # 3.6x multiplier!
)
# Get today's breakdown
breakdown = auditor.analyze_daily()
print(f"Today: ${breakdown['total_cost_usd']:.2f}")
# Get recommendations
recommendations = auditor.get_recommendations()π Learn More
- π Full Documentation
- π‘ Why PyCostAudit is Different
- π Cost Multipliers Explained
- π Real Savings Examples
π Thanks
- Thanks to everyone using PyCostAudit to optimize their Claude Code costs
- Special thanks to Caveman Claude for inspiring better discoverability practices
π Breaking Changes
None. This is a backward-compatible release.
π Known Issues
- Some integration tests for
analyze_daily()show zero costs (database state timing issue being investigated) - Recommend using
track_operation()for immediate cost tracking; analysis queries may require additional debugging
π Support
- π§ Email: mullassery@gmail.com
- π GitHub Issues: Report a bug
- π¬ GitHub Discussions: Ask a question