Thunder Compute CLI (tnr)

Fast, secure, and developer-friendly command-line interface for managing Thunder Compute GPU instances.
tnr is the official CLI for Thunder Compute, enabling seamless management of cloud GPU instances. Built for speed and ease of use, it handles authentication, instance provisioning, SSH connections, file transfers, and monitoringβall from your terminal.
Features
- β‘ Quick Instance Provisioning β Create GPU instances (T4, A100, A100 XL) in seconds with flexible CPU and memory configurations
- π Automatic SSH Key Management β Connect securely without manual SSH configuration
- π¦ Built-in File Transfer β Copy files between local and remote instances with integrated SCP support
- π Real-time Monitoring β Track instance status, resource usage, and configuration details
- π¨ Pre-configured Templates β Launch instances with Ollama, ComfyUI, or WebUI Forge pre-installed
- π Cross-platform Support β Native binaries for macOS, Linux, and Windows
- π Auto-update β Keep the CLI current with
tnr self-update
- π― Port Forwarding β Easily expose remote services to your local machine
Installation
Package Managers
macOS / Linux (Homebrew)
brew tap Thunder-Compute/tap
brew install tnr
Windows (Scoop)
scoop bucket add tnr https://github.com/Thunder-Compute/scoop-bucket
scoop install tnr
Windows (Winget)
winget install Thunder.tnr
Debian / Ubuntu
Download the latest .deb package from Releases:
sudo dpkg -i tnr_*.deb
RHEL / CentOS / Fedora
Download the latest .rpm package from Releases:
sudo rpm -i tnr_*.rpm
Install Scripts
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Thunder-Compute/thunder-cli/main/scripts/install.sh | bash
Windows (PowerShell)
irm https://raw.githubusercontent.com/Thunder-Compute/thunder-cli/main/scripts/install.ps1 | iex
Manual Installation
- Download the appropriate binary for your platform from Releases
- Extract the archive
- Move the
tnr binary to a directory in your PATH (e.g., /usr/local/bin on Unix systems)
- Make it executable (Unix):
chmod +x /usr/local/bin/tnr
Build from Source
Requirements: Go 1.25.3 or later
git clone https://github.com/Thunder-Compute/thunder-cli.git
cd thunder-cli
go build -o tnr
Quick Start
# 1. Authenticate with Thunder Compute
tnr login
# 2. Create a new GPU instance (default: A100)
tnr create --gpu a100
# 3. Connect to your instance
tnr connect 0
# 4. Check instance status
tnr status
# 5. Copy files to/from instance
tnr scp ./local-file.txt 0:/remote/path/
tnr scp 0:/remote/file.txt ./local-path/
# 6. Delete instance when done
tnr delete 0
Usage
Authentication
Login
Authenticate with Thunder Compute. Opens your browser to generate an API token:
tnr login
The token is stored in ~/.thunder/token. You can also set the TNR_API_TOKEN environment variable for programmatic access.
Logout
Remove stored credentials:
tnr logout
Instance Management
Create an Instance
Basic creation (default: A100 GPU, 4 vCPUs, 32GB RAM):
tnr create
Specify GPU type:
tnr create --gpu t4 # NVIDIA T4 (16GB VRAM)
tnr create --gpu a100 # NVIDIA A100 (40GB VRAM)
tnr create --gpu a100xl # NVIDIA A100 (80GB VRAM)
Multiple GPUs:
tnr create --gpu a100 --num-gpus 4
Custom CPU configuration:
tnr create --vcpus 8 # 8 vCPUs = 64GB RAM
Use a template:
tnr create --template ollama # Ollama LLM server
tnr create --template comfy-ui # ComfyUI image generation
tnr create --template webui-forge # Stable Diffusion WebUI
Production mode (enhanced stability):
tnr create --mode production
View Instance Status
List all instances with details:
tnr status
Add --no-wait to disable automatic status monitoring.
Delete an Instance
tnr delete <instance_id>
β οΈ Warning: This permanently deletes the instance and all data. Back up important files first.
Connecting to Instances
Basic SSH Connection
tnr connect <instance_id>
Port Forwarding
Forward one or more ports to access remote services locally:
# Forward a single port
tnr connect 0 -t 8000
# Forward multiple ports
tnr connect 0 -t 8000 -t 8080 -t 3000
After forwarding, access services at localhost:<port>.
File Transfer (SCP)
Transfer files between your local machine and instances:
# Upload to instance
tnr scp ./local-file.txt 0:/remote/path/
tnr scp -r ./local-directory/ 0:/remote/path/
# Download from instance
tnr scp 0:/remote/file.txt ./local-path/
tnr scp -r 0:/remote/directory/ ./local-path/
Path formats:
- Remote:
<instance_id>:/path (e.g., 0:/home/user/data)
- Local: Standard absolute or relative paths
Self-Update
Keep your CLI up-to-date with the latest features and bug fixes.
Check Current Version
tnr --version
Update to Latest Version
For manual installations (install script or direct download):
tnr self-update
This command will:
- Check for the latest release on GitHub
- Download the appropriate binary for your OS/architecture
- Replace the current binary automatically
- Preserve all your settings and configuration
For package manager installations:
If you installed via Homebrew, Scoop, or Winget, use your package manager's update command instead:
# Homebrew
brew upgrade tnr
# Scoop
scoop update tnr
# Winget
winget upgrade Thunder.tnr
The tnr self-update command will automatically detect package manager installations and direct you to use the appropriate command.
Disable Auto-Update
If you need to prevent self-updates (e.g., in CI/CD environments or for testing), set the TNR_NO_SELFUPDATE environment variable:
export TNR_NO_SELFUPDATE=1
tnr self-update # Will skip update and show a message
Notes
- Self-update requires write access to the binary location
- Development builds (
dev version) cannot use self-update
- The CLI will automatically verify the integrity of downloaded updates
- After updating, you may need to restart any active sessions to use the new version
Shell Completion
Generate shell completion scripts:
# Bash
tnr completion bash | sudo tee /etc/bash_completion.d/tnr
# Zsh
tnr completion zsh > "${fpath[1]}/_tnr"
# Fish
tnr completion fish > ~/.config/fish/completions/tnr.fish
# PowerShell
tnr completion powershell > tnr.ps1
Documentation
Guides
Development
Prerequisites
Setup
# Clone the repository
git clone https://github.com/Thunder-Compute/thunder-cli.git
cd thunder-cli
# Install dependencies
go mod download
# Build the CLI
go build -o tnr
# Run tests
go test ./... -v
# Run specific tests
go test ./cmd -v
go test ./api -v
Project Structure
thunder-cli/
βββ api/ # Thunder Compute API client
βββ cmd/ # Cobra command definitions
βββ internal/ # Internal utilities and version info
βββ tui/ # Terminal UI components (Bubble Tea)
βββ utils/ # SSH, SCP, and helper utilities
βββ main.go # Entry point
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature)
- Write tests for new functionality
- Ensure all tests pass (
go test ./... -v)
- Commit your changes (
git commit -m 'Add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
Support
| Platform |
Architecture |
Status |
| macOS |
ARM64 (Apple Silicon) |
β
Supported |
| macOS |
AMD64 (Intel) |
β
Supported |
| Linux |
AMD64 |
β
Supported |
| Linux |
ARM64 |
β
Supported |
| Windows |
AMD64 |
β
Supported |
Updating
For detailed update instructions, including how to check your current version and disable auto-updates, see the Self-Update section above.
Quick reference:
- Package managers: Use
brew upgrade tnr, scoop update tnr, or winget upgrade Thunder.tnr
- Manual installations: Use
tnr self-update
License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright Β© 2025 Thunder Compute
Acknowledgments
Built with:
Get Started β | View on GitHub β | Report Issue β