Display ccusage JSON output as terminal graphs with Claude Pro/Pro Max threshold indicators
npm install @koinunopochi/ccusage-to-graphDisplay ccusage JSON output as terminal graphs with Claude Pro/Pro Max threshold indicators.
bash
npx ccusage@latest --json | npx @koinunopochi/ccusage-to-graph@latest
`$3
`bash
npm install -g @koinunopochi/ccusage-to-graph
`$3
`bash
git clone https://github.com/koinunopochi/ccusage-to-graph.git
cd ccusage-to-graph
npm install
npm run build
`Usage
$3
`bash
Bar chart (default)
npx ccusage@latest --json | npx @koinunopochi/ccusage-to-graph@latestLine chart
npx ccusage@latest --json | npx @koinunopochi/ccusage-to-graph@latest --type lineHide threshold lines
npx ccusage@latest --json | npx @koinunopochi/ccusage-to-graph@latest --no-threshold
`$3
`bash
After installing globally
ccusage --json | ccusage-graph
`$3
`bash
Using local build
cat test-data.json | node dist/bin/ccusage-graph.js
cat test-data-threshold.json | node dist/bin/ccusage-graph.js
`Options
- -t, --type : Graph type (bar or line, default: bar)
- -p, --period : Time period to display (future feature)
- --no-threshold`: Hide Pro and Pro Max threshold linesMIT License - see LICENSE file for details
koinunopochi
Issues and Pull Requests are welcome!