https://github.com/flexiondotorg/tokentank
A delightful Go terminal application that displays remaining credit balances for AI providers in a gorgeous, human-friendly interface.
https://github.com/flexiondotorg/tokentank
Last synced: 10 months ago
JSON representation
A delightful Go terminal application that displays remaining credit balances for AI providers in a gorgeous, human-friendly interface.
- Host: GitHub
- URL: https://github.com/flexiondotorg/tokentank
- Owner: flexiondotorg
- Created: 2025-08-20T17:52:30.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-20T18:15:59.000Z (11 months ago)
- Last Synced: 2025-09-05T18:22:52.094Z (10 months ago)
- Language: Go
- Size: 21.5 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TokenTank đ¯
A delightful Go terminal application that displays remaining credit balances for AI providers in a gorgeous, human-friendly interface.
## Features
- **Single command**: `tokentank` checks all configured providers
- **Beautiful terminal UI** with colors, spinners, and smooth animations
- **Graceful error handling** with helpful, non-punishing messages
- **Multi-provider support**:
- â
**OpenRouter**: Full balance checking via API
- â ī¸ **OpenAI**: API key validation (no balance API available)
- â ī¸ **Anthropic**: API key validation (no balance API available)
## Installation
```bash
# Download and build from source
git clone https://github.com/flexiondotorg/tokentank
cd tokentank
go mod tidy
just build
# Or use go install
go install github.com/flexiondotorg/tokentank/cmd/tokentank@latest
```
## Usage
Set your API keys (only configure the providers you use):
```bash
export TT_OPENAI_API_KEY="your-openai-key"
export TT_ANTHROPIC_API_KEY="your-anthropic-key"
export TT_OPENROUTER_API_KEY="your-openrouter-key"
```
Then run:
```bash
tokentank
```
## Example Output
```
Checking balances for: OpenRouter, OpenAI, Anthropic
OpenRouter $42.50
OpenAI âšī¸ â API key valid - OpenAI doesn't provide balance checking via API. Check usage at platform.openai.com
Anthropic âšī¸ â API key valid - Anthropic doesn't provide balance checking via API. Check usage at console.anthropic.com
```
## Development
TokenTank is built using [Tessl](https://tessl.io) AI Native Development:
- **Specification-driven**: Natural language specs drive code generation
- **AI-generated code**: All implementation generated from `tokentank.spec.md`
- **Real-world tested**: APIs verified against working implementations
### Build Commands
```bash
# Build
just build
# Run directly
just run
# Test
just test
# Cross-compile for multiple platforms
just cross
```
## License
MIT License - see [LICENSE](LICENSE) file for details.
## Acknowledgments
- Inspired by [token-tongs](https://github.com/utensils/token-tongs) for OpenRouter API implementation
- Built with [Charm](https://charm.sh/) libraries for beautiful terminal UI
- Generated using [Tessl](https://tessl.io) AI Native Development platform