Contributing to TokenMeter
January 29, 2026 · View on GitHub
Thanks for your interest in contributing to TokenMeter!
Getting Started
- Fork and clone the repo
- Build the project:
cd TokenMeter swift build -c release - Create a feature branch:
git checkout -b feat/my-feature
Development
Requirements
- macOS 14 (Sonoma) or later
- Swift 5.9+
- Claude Code installed (for testing with real data)
Project Structure
TokenMeter/
├── TokenMeterApp.swift # App entry with MenuBarExtra
├── UsageViewModel.swift # State, timer, caching, notifications
├── Models/
│ └── UsageSummary.swift # Data models + ClaudePlan enum
├── Services/
│ ├── NativeUsageParser.swift # JSONL parser + pricing engine
│ ├── UsageAPIService.swift # Keychain + Anthropic API client
│ └── UpdateChecker.swift # GitHub releases checker
└── Views/ # SwiftUI views
Building and Testing
cd TokenMeter
swift build -c release
To install locally for testing:
cp .build/release/TokenMeter /Applications/TokenMeter.app/Contents/MacOS/TokenMeter
Submitting Changes
- Ensure
swift build -c releasepasses - Keep commits focused and atomic
- Write clear commit messages
- Submit a PR to
main
Reporting Issues
- Use the bug report template for bugs
- Use the feature request template for new ideas
License
By contributing, you agree that your contributions will be licensed under the MIT License.