Skip to content

Commit 891b011

Browse files
Merge branch 'main' into add-emoji-and-text-burn-rate-to-statusline
2 parents 4267df1 + 8b8e12a commit 891b011

26 files changed

Lines changed: 2246 additions & 128 deletions

‎.githooks/pre-commit‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
#!/bin/sh
2+
3+
# Generate JSON Schema before committing
4+
bun run generate:schema
5+
6+
# Run lint-staged
27
npx --no-install lint-staged

‎.mcp.json‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
{
22
"mcpServers": {
33
"context7": {
4-
"type": "sse",
5-
"url": "https://mcp.context7.com/sse"
6-
},
7-
"gunshi-doc": {
8-
"command": "bun",
9-
"args": [
10-
"x",
11-
"sitemcp",
12-
"https://gunshi.dev/",
13-
"--concurrency 10",
14-
"--no-cache"
15-
]
4+
"type": "http",
5+
"url": "https://mcp.context7.com/mcp"
166
},
177
"lsmcp": {
188
"command": "bun",
@@ -29,6 +19,16 @@
2919
"byethrow-mcp"
3020
],
3121
"env": {}
22+
},
23+
"gunshi-doc": {
24+
"command": "bun",
25+
"args": [
26+
"x",
27+
"sitemcp",
28+
"https://gunshi.dev/",
29+
"--concurrency 10",
30+
"--no-cache"
31+
]
3232
}
3333
}
3434
}

‎README.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ ccusage daily --locale ja-JP # Use Japanese locale for date/time formatting
7171
ccusage daily --instances # Group by project/instance
7272
ccusage daily --project myproject # Filter to specific project
7373
ccusage daily --instances --project myproject --json # Combined usage
74+
75+
# Compact mode for screenshots/sharing
76+
ccusage --compact # Force compact table mode
77+
ccusage monthly --compact # Compact monthly report
7478
```
7579

7680
## Features
@@ -87,6 +91,7 @@ ccusage daily --instances --project myproject --json # Combined usage
8791
- 📁 **Custom Path**: Support for custom Claude data directory locations
8892
- 🎨 **Beautiful Output**: Colorful table-formatted display with automatic responsive layout
8993
- 📱 **Smart Tables**: Automatic compact mode for narrow terminals (< 100 characters) with essential columns
94+
- 📸 **Compact Mode**: Use `--compact` flag to force compact table layout, perfect for screenshots and sharing
9095
- 📋 **Enhanced Model Display**: Model names shown as bulleted lists for better readability
9196
- 📄 **JSON Output**: Export data in structured JSON format with `--json`
9297
- 💰 **Cost Tracking**: Shows costs in USD for each day/month/session
@@ -96,6 +101,7 @@ ccusage daily --instances --project myproject --json # Combined usage
96101
- 🏗️ **Multi-Instance Support**: Group usage by project with `--instances` flag and filter by specific projects
97102
- 🌍 **Timezone Support**: Configure timezone for date grouping with `--timezone` option
98103
- 🌐 **Locale Support**: Customize date/time formatting with `--locale` option (e.g., en-US, ja-JP, de-DE)
104+
- ⚙️ **Configuration Files**: Set defaults with JSON configuration files, complete with IDE autocomplete and validation
99105
- 🚀 **Ultra-Small Bundle**: Unlike other CLI tools, we pay extreme attention to bundle size - incredibly small even without minification!
100106

101107
## Documentation

‎bun.lock‎

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎ccusage.example.json‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"$schema": "./config-schema.json",
3+
"defaults": {
4+
"json": true,
5+
"mode": "auto",
6+
"timezone": "Asia/Tokyo",
7+
"locale": "ja-JP",
8+
"offline": false,
9+
"breakdown": false
10+
},
11+
"commands": {
12+
"daily": {
13+
"instances": true,
14+
"order": "desc"
15+
},
16+
"monthly": {
17+
"breakdown": true
18+
},
19+
"weekly": {
20+
"startOfWeek": "monday"
21+
},
22+
"session": {
23+
"order": "desc"
24+
},
25+
"blocks": {
26+
"tokenLimit": "500000",
27+
"sessionLength": 5,
28+
"active": false
29+
},
30+
"statusline": {
31+
"offline": true
32+
}
33+
}
34+
}

0 commit comments

Comments
 (0)