Skip to content

Commit 0b8fbc4

Browse files
committed
Initial commit: claude-dashboard plugin
Comprehensive status line plugin for Claude Code featuring: - Model display with emoji - Color-coded progress bar (green/yellow/red) - Token count in K/M format - Cost tracking in USD - API rate limits (5h/7d) with reset countdown - i18n support (English/Korean) - Max and Pro plan support
0 parents  commit 0b8fbc4

26 files changed

+1726
-0
lines changed

.claude-plugin/marketplace.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "claude-dashboard",
3+
"owner": {
4+
"name": "uppinote",
5+
"email": ""
6+
},
7+
"metadata": {
8+
"description": "Comprehensive status line with context usage, API rate limits, and cost tracking",
9+
"version": "1.0.0"
10+
},
11+
"plugins": [
12+
{
13+
"name": "claude-dashboard",
14+
"source": "./",
15+
"description": "Real-time status line showing model, context usage with color-coded progress bar, token count, cost, and API rate limits (5h/7d). Supports Max and Pro plans with i18n (English/Korean).",
16+
"category": "monitoring",
17+
"tags": ["statusline", "monitoring", "context", "rate-limits", "cost", "i18n"]
18+
}
19+
]
20+
}

.claude-plugin/plugin.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "claude-dashboard",
3+
"version": "1.0.0",
4+
"description": "Comprehensive status line with context usage, API rate limits, and cost tracking",
5+
"author": {
6+
"name": "uppinote"
7+
},
8+
"repository": "https://github.com/uppinote20/claude-dashboard",
9+
"license": "MIT",
10+
"keywords": [
11+
"statusline",
12+
"context",
13+
"rate-limits",
14+
"cost",
15+
"i18n"
16+
]
17+
}

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Default owner for all files
2+
* @uppinote20
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or unexpected behavior
4+
title: '[Bug] '
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
<!-- Clear description of the bug -->
12+
13+
## Environment
14+
15+
- OS: <!-- macOS / Linux / Windows -->
16+
- Claude Code version: <!-- e.g., 1.0.80 -->
17+
- Node.js version: <!-- e.g., 20.0.0 -->
18+
- Plan: <!-- Max / Pro -->
19+
- Language: <!-- en / ko / auto -->
20+
21+
## Steps to Reproduce
22+
23+
1.
24+
2.
25+
3.
26+
27+
## Expected Behavior
28+
29+
<!-- What should happen -->
30+
31+
## Actual Behavior
32+
33+
<!-- What actually happens -->
34+
35+
## Status Line Output
36+
37+
```
38+
<!-- Paste your status line output here -->
39+
```
40+
41+
## Additional Context
42+
43+
<!-- Any other information -->

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement
4+
title: '[Feature] '
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## Description
10+
11+
<!-- Clear description of the feature -->
12+
13+
## Use Case
14+
15+
<!-- Why is this feature needed? What problem does it solve? -->
16+
17+
## Proposed Solution
18+
19+
<!-- How should this feature work? -->
20+
21+
## Alternatives Considered
22+
23+
<!-- Any alternative solutions you've considered -->
24+
25+
## Additional Context
26+
27+
<!-- Any other information, mockups, or examples -->

.github/pull_request_template.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## Summary
2+
3+
<!-- Brief description of what this PR does -->
4+
5+
## Changes
6+
7+
-
8+
9+
## Test Plan
10+
11+
- [ ] Tested locally with `npm run test`
12+
- [ ] Verified status line output format
13+
- [ ] Checked i18n (en/ko)
14+
15+
## Screenshots (if applicable)
16+
17+
<!-- Before/After screenshots of status line output -->

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build (dist is committed for plugin users)
5+
# dist/
6+
7+
# IDE
8+
.idea/
9+
.vscode/
10+
*.swp
11+
*.swo
12+
13+
# OS
14+
.DS_Store
15+
Thumbs.db
16+
17+
# Logs
18+
*.log
19+
npm-debug.log*
20+
21+
# Test
22+
coverage/
23+
24+
# Cache
25+
/tmp/claude-dashboard-cache.json

CLAUDE.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Claude Code Configuration
2+
3+
## Project Overview
4+
5+
**claude-dashboard** is a Claude Code plugin that provides a comprehensive status line showing context usage, API rate limits, and cost tracking.
6+
7+
## Tech Stack
8+
9+
- **Runtime**: Node.js 18+
10+
- **Language**: TypeScript 5.0+
11+
- **Build**: esbuild
12+
- **Target**: Claude Code Plugin
13+
14+
## Project Structure
15+
16+
```
17+
claude-dashboard/
18+
├── .claude-plugin/
19+
│ ├── plugin.json # Plugin manifest
20+
│ └── marketplace.json # Marketplace metadata
21+
├── commands/
22+
│ └── setup.md # /claude-dashboard:setup command
23+
├── scripts/
24+
│ ├── statusline.ts # Main entry point
25+
│ ├── types.ts # TypeScript interfaces
26+
│ └── utils/
27+
│ ├── api-client.ts # OAuth API client with caching
28+
│ ├── colors.ts # ANSI color codes
29+
│ ├── credentials.ts # Keychain/credentials extraction
30+
│ ├── formatters.ts # Token/cost/time formatting
31+
│ ├── i18n.ts # Internationalization
32+
│ └── progress-bar.ts # Progress bar rendering
33+
├── locales/
34+
│ ├── en.json # English translations
35+
│ └── ko.json # Korean translations
36+
├── dist/
37+
│ └── index.js # Built output (committed)
38+
└── package.json
39+
```
40+
41+
## Development Workflow
42+
43+
```bash
44+
# Install dependencies
45+
npm install
46+
47+
# Build
48+
npm run build
49+
50+
# Test locally
51+
echo '{"model":{"display_name":"Opus"},...}' | node dist/index.js
52+
```
53+
54+
## Code Style
55+
56+
- Use TypeScript strict mode
57+
- ESM modules (import/export)
58+
- Functional style preferred
59+
- No external runtime dependencies (Node.js built-ins only)
60+
61+
## Key Conventions
62+
63+
1. **dist/index.js is committed** - Plugin users don't need to build
64+
2. **60-second API cache** - Avoid rate limiting
65+
3. **Graceful degradation** - Show ⚠️ on API errors, not crash
66+
4. **i18n** - All user-facing strings in locales/*.json
67+
68+
## Testing Checklist
69+
70+
Before committing:
71+
- [ ] `npm run build` succeeds
72+
- [ ] Max plan output format correct
73+
- [ ] Pro plan output format correct
74+
- [ ] Korean/English switching works
75+
- [ ] API error shows ⚠️ instead of crash
76+
77+
## Common Tasks
78+
79+
### Adding a new locale
80+
81+
1. Create `locales/{lang}.json` copying from `en.json`
82+
2. Update `scripts/utils/i18n.ts` to import new locale
83+
3. Test with `/claude-dashboard:setup {lang}`
84+
85+
### Modifying status line format
86+
87+
1. Edit `scripts/statusline.ts` `formatOutput()` function
88+
2. Update `README.md` examples
89+
3. Update `commands/setup.md` examples
90+
4. Rebuild and test
91+
92+
### Updating API client
93+
94+
1. Edit `scripts/utils/api-client.ts`
95+
2. Check cache invalidation logic
96+
3. Test with expired cache (`rm /tmp/claude-dashboard-cache.json`)

CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing to claude-dashboard
2+
3+
Thank you for your interest in contributing to claude-dashboard!
4+
5+
## Getting Started
6+
7+
1. Fork the repository
8+
2. Clone your fork:
9+
```bash
10+
git clone https://github.com/YOUR_USERNAME/claude-dashboard.git
11+
cd claude-dashboard
12+
```
13+
3. Install dependencies:
14+
```bash
15+
npm install
16+
```
17+
4. Create a feature branch:
18+
```bash
19+
git checkout -b feature/your-feature-name
20+
```
21+
22+
## Development
23+
24+
### Build
25+
26+
```bash
27+
npm run build
28+
```
29+
30+
### Test locally
31+
32+
```bash
33+
echo '{"model":{"display_name":"Opus"},"context_window":{"context_window_size":200000,"current_usage":{"input_tokens":50000,"cache_creation_input_tokens":0,"cache_read_input_tokens":0}},"cost":{"total_cost_usd":0.5}}' | node dist/index.js
34+
```
35+
36+
### Test with Claude Code
37+
38+
```bash
39+
claude --plugin-dir /path/to/claude-dashboard
40+
```
41+
42+
## Pull Request Process
43+
44+
1. Ensure your code builds without errors
45+
2. Test your changes locally with Claude Code
46+
3. Update README.md if you've changed functionality
47+
4. Create a Pull Request with a clear description
48+
49+
## Code Style
50+
51+
- Use TypeScript
52+
- Follow existing code patterns
53+
- Keep functions small and focused
54+
- Add comments for complex logic
55+
56+
## Reporting Issues
57+
58+
- Use GitHub Issues
59+
- Include Claude Code version
60+
- Provide steps to reproduce
61+
- Include error messages if any
62+
63+
## License
64+
65+
By contributing, you agree that your contributions will be licensed under the MIT License.

0 commit comments

Comments
 (0)