Installation
Installation Methods
Choose the method that works best for your platform:Homebrew
Recommended for macOS/LinuxEasiest installation method with automatic updates.
Quick Install Script
Fast one-liner for Linux/macOSDownloads and installs to
~/.local/bin.Cargo
For Rust developersBuild from source or install from crates.io.
Pre-built Binaries
Manual installationDownload compiled binaries for all platforms.
Homebrew (macOS/Linux)
If
rtk gain shows token savings stats OR says “No tracking data yet”, you have the correct RTK installed.If you get “command not found”, you have the wrong package.Quick Install Script (Linux/macOS)
Add to PATH if needed
If
rtk --version fails after installation, add ~/.local/bin to your PATH:bash
zsh
Cargo (from source)
Pre-built Binaries
Download pre-compiled binaries from GitHub Releases:macOS Intel
rtk-x86_64-apple-darwin.tar.gzmacOS Apple Silicon
rtk-aarch64-apple-darwin.tar.gzLinux x86_64
rtk-x86_64-unknown-linux-gnu.tar.gzLinux ARM64
rtk-aarch64-unknown-linux-gnu.tar.gzWindows x86_64
rtk-x86_64-pc-windows-msvc.zipProject Initialization
After installation, initialize RTK for your AI coding assistant:Global Setup (Recommended)
This installs a hook that automatically rewrites commands across all Claude Code projects:What happens during init
- Installs hook to
~/.claude/hooks/rtk-rewrite.sh - Creates
~/.claude/RTK.md(10 lines, minimal context) - Adds
@RTK.mdreference to~/.claude/CLAUDE.md - Prompts: “Patch settings.json? [y/N]”
What is settings.json?Claude Code’s configuration file (
~/.claude/settings.json) that registers hooks. The RTK hook transparently rewrites commands like git status → rtk git status before execution.RTK creates a backup at ~/.claude/settings.json.bak before making changes.Alternative: Non-Interactive Setup
Verification
Test that RTK is working correctly:Troubleshooting
Command Not Found
Problem:rtk: command not found after installation
Solution:
Wrong RTK Installed
Problem:rtk gain says “command not found” but rtk --version works
Solution: You installed Rust Type Kit instead of Token Killer
Hook Not Working
Problem: Commands still not using RTK afterrtk init --global
Solution:
Settings.json Patching Failed
Problem:rtk init --global fails to patch settings.json
Solution:
Platform-Specific Notes
macOS
- Homebrew is the recommended installation method
- Use Apple Silicon binary (
aarch64) on M1/M2/M3 Macs - First run may trigger Gatekeeper - allow in System Preferences → Security
Linux
- Quick install script works on all distros
- For DEB-based distros (Ubuntu, Debian): Download
.debfrom releases - For RPM-based distros (Fedora, RHEL): Download
.rpmfrom releases - Ensure
~/.local/binis in PATH
Windows
- Download Windows binary from releases
- Extract to a permanent location (e.g.,
C:\Program Files\rtk) - Add to PATH via System Properties → Environment Variables
- RTK has limited Windows testing - report issues on GitHub
Uninstalling
Complete Removal
Restore Settings.json
If something goes wrong:Next Steps
Quick Start Guide
Follow our 5-minute guide to start saving tokens immediately
