feat(ccusage): add --no-cost flag to hide cost column#768
feat(ccusage): add --no-cost flag to hide cost column#768majiayu000 wants to merge 1 commit intoryoppippi:mainfrom
Conversation
Add --no-cost option to all commands (daily, monthly, session, blocks) to hide cost information from table output. This is useful for Claude Pro subscribers who pay a flat rate and don't need cost tracking. - Add noCost flag to shared args - Update table utilities to support hideCost option - Apply hideCost to formatUsageDataRow, formatTotalsRow, pushBreakdownRows - Update all commands to conditionally hide cost column Closes ryoppippi#625
📝 WalkthroughWalkthroughA Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (6)apps/ccusage/src/**/*.ts📄 CodeRabbit inference engine (apps/ccusage/CLAUDE.md)
Files:
apps/ccusage/**/*.ts📄 CodeRabbit inference engine (apps/ccusage/CLAUDE.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.ts{,x}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{ts,tsx,json}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (2)📚 Learning: 2025-09-18T16:07:16.293ZApplied to files:
📚 Learning: 2025-09-18T16:07:16.293ZApplied to files:
🧬 Code graph analysis (2)apps/ccusage/src/commands/blocks.ts (2)
apps/ccusage/src/commands/session.ts (2)
🔇 Additional comments (16)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@majiayu000 looks good! please apply it for codex and opencode as well!!! |
Summary
Add
--no-costoption to all commands (daily, monthly, session, blocks) to hide cost information from table output. This is useful for Claude Pro subscribers who pay a flat rate and don't need cost tracking.noCostflag to shared argshideCostoptionhideCosttoformatUsageDataRow,formatTotalsRow,pushBreakdownRowsCloses #625
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.