A beautiful terminal interface for the Tinker API, built with Bubble Tea.
- π Training Runs - View and manage your training runs with expandable tree view
- πΎ Checkpoints - Browse, publish/unpublish, and delete model checkpoints
- π Usage Statistics - View your API usage and quotas
- βοΈ Settings - Configure API key (stored in local config file)
- β¨ Interactive UI - Beautiful dark theme with keyboard navigation
# Install uv if you don't have it
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Run directly (downloads and runs in isolated environment)
uvx better-tinkerpip install better-tinker
better-tinkerThis CLI uses a Python bridge server to communicate with the Tinker API. The bridge is started automatically when you run better-tinker.
βββββββββββββββ Authorization Header βββββββββββββββββββ gRPC-Web βββββββββββββββ
β Go CLI β βββββββββββββββββββββββββΊ β Python Bridge β βββββββββββββββΊ β Tinker API β
β (Bubble Tea)β Bearer <api_key> β (FastAPI) β β β
βββββββββββββββ βββββββββββββββββββ βββββββββββββββ
The easiest way to configure your API key is through the CLI itself:
- Run
better-tinker - Select Settings from the menu
- Select API Key and enter your key
- The key is stored in a local config file:
- Windows:
%APPDATA%\tinker-cli\config.json - macOS/Linux:
~/.config/tinker-cli/config.json
- Windows:
Set your Tinker API key as an environment variable:
# Linux/macOS
export TINKER_API_KEY="your-api-key-here"
# Windows (PowerShell)
$env:TINKER_API_KEY="your-api-key-here"
# Windows (CMD)
set TINKER_API_KEY=your-api-key-here
# Then run
better-tinkerNote: Environment variables take precedence over stored credentials.
If you use uvx, setting the environment variable in your shell config is the most reliable method:
macOS/Linux (bash/zsh):
echo 'export TINKER_API_KEY="your-api-key-here"' >> ~/.zshrc
source ~/.zshrcWindows (PowerShell profile):
# Add to your PowerShell profile
Add-Content $PROFILE 'setx TINKER_API_KEY "your-api-key-here"'| Key | Action |
|---|---|
β/k |
Move up |
β/j |
Move down |
Enter |
Select / Confirm / Edit |
Space |
Expand/collapse training run |
r |
Refresh data |
p |
Publish/Unpublish checkpoint |
d |
Delete checkpoint / Delete API key (in Settings) |
Esc |
Go back / Cancel editing |
q |
Quit |
| Variable | Description | Default |
|---|---|---|
TINKER_API_KEY |
Your Tinker API key | (from config) |
TINKER_BRIDGE_URL |
Custom bridge server URL | http://127.0.0.1:8765 |
TINKER_BRIDGE_PORT |
Bridge server port | 8765 |
TINKER_BRIDGE_HOST |
Bridge server host | 127.0.0.1 |
Set your API key using one of these methods:
-
Via Settings menu (recommended):
better-tinker # Navigate to Settings > API Key -
Via environment variable:
export TINKER_API_KEY="your-api-key-here" better-tinker
This usually means the Python environment is missing dependencies. Try:
# Reinstall with fresh environment
uvx --refresh better-tinker
# Or with pip
pip install --upgrade better-tinker tinkerThe bridge should start automatically. If it fails:
- Check if port 8765 is already in use
- Try manually starting the bridge:
python -m better_tinker.bridge.server
When the bridge server is running, you can access the interactive API documentation at:
- Swagger UI: http://127.0.0.1:8765/docs
- ReDoc: http://127.0.0.1:8765/redoc
git clone https://github.com/mohaddz/better-tinker.git
cd better-tinker
# Build Go binaries for all platforms
python build_binaries.py
# Install in development mode
pip install -e .
# Run
better-tinkerbetter-tinker/
βββ main.go # Go CLI entry point (thin wrapper around internal/tui)
βββ better_tinker/
β βββ wrapper.py # Python wrapper (starts bridge + Go CLI)
β βββ bridge/
β βββ server.py # FastAPI bridge server
βββ internal/
β βββ api/
β β βββ client.go # REST API client (calls bridge)
β β βββ types.go # API response types
β βββ config/
β β βββ config.go # Configuration / credential storage
β βββ tui/
β β βββ program.go # Bubble Tea program wiring
β β βββ model.go # App state + initial model
β β βββ update.go # Update loop + navigation logic
β β βββ views.go # View rendering
β β βββ commands.go # Async commands (API calls)
β β βββ types.go # Msg/types used by the TUI
β β βββ layout.go # Layout helpers
β β βββ util.go # Small helpers
β β βββ menu_delegate.go # Custom menu renderer
β βββ ui/
β βββ styles.go # Lip Gloss styles
βββ build_binaries.py # Cross-compilation script
βββ pyproject.toml # Python package config
βββ go.mod # Go module config
- TUI Framework: Bubble Tea
- Components: Bubbles
- Styling: Lip Gloss
MIT License - see LICENSE for details.
Contributions are welcome! Please feel free to submit a Pull Request.