Installation
Installation
Section titled “Installation”Name collision warning
Section titled “Name collision warning”Two unrelated projects share the name rtk. Make sure you install the right one:
- Rust Token Killer (
rtk-ai/rtk) — this project, a token-saving CLI proxy - Rust Type Kit (
reachingforthejack/rtk) — a different tool for generating Rust types
The easiest way to verify you have the correct one: run rtk gain. It should display token savings stats. If it returns “command not found”, you either have the wrong package or RTK is not installed.
Check before installing
Section titled “Check before installing”rtk --version # should print: rtk x.y.zrtk gain # should show token savings statsIf both commands work, RTK is already installed. Skip to Project initialization.
Quick install (Linux and macOS)
Section titled “Quick install (Linux and macOS)”curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/master/install.sh | shHomebrew (macOS and Linux)
Section titled “Homebrew (macOS and Linux)”brew install rtk-ai/tap/rtkcargo install --git https://github.com/rtk-ai/rtk rtkPre-built binaries (Windows, Linux, macOS)
Section titled “Pre-built binaries (Windows, Linux, macOS)”Download from GitHub releases:
- macOS:
rtk-x86_64-apple-darwin.tar.gz/rtk-aarch64-apple-darwin.tar.gz - Linux:
rtk-x86_64-unknown-linux-musl.tar.gz/rtk-aarch64-unknown-linux-gnu.tar.gz - Windows:
rtk-x86_64-pc-windows-msvc.zip
Windows users: Extract the zip and place rtk.exe in a directory on your PATH. Run RTK from Command Prompt, PowerShell, or Windows Terminal — do not double-click the .exe (it prints usage and exits immediately). For full hook support, use WSL instead.
Verify installation
Section titled “Verify installation”rtk --version # rtk x.y.zrtk gain # token savings dashboardIf rtk gain fails but rtk --version succeeds, you installed Rust Type Kit by mistake. Uninstall it first:
cargo uninstall rtkThen reinstall using one of the methods above.
Project initialization
Section titled “Project initialization”Run once per project to enable the Claude Code hook:
rtk initFor a global install that patches settings.json automatically:
rtk init --globalUninstall
Section titled “Uninstall”rtk init -g --uninstall # remove hook, RTK.md, and settings.json entrycargo uninstall rtk # remove binary (if installed via Cargo)brew uninstall rtk # remove binary (if installed via Homebrew)