Quick Start
Get RTK up and running in under 5 minutes. This guide walks you through installation, verification, initialization, and your first token-optimized commands.Prerequisites
- macOS, Linux, or Windows
- Command-line access
- Claude Code, Cursor, or another AI coding assistant (optional but recommended)
Step 1: Install RTK
Choose your preferred installation method:If you already have RTK installed, verify it’s the correct package:If this command works (even if it says “No tracking data yet”), you’re good to go. Skip to Step 3.
Step 2: Verify Installation
Confirm RTK is installed correctly:Step 3: Initialize RTK
Set up RTK to work automatically with your AI coding assistant:What just happened?
- Hook installed:
~/.claude/hooks/rtk-rewrite.shnow intercepts bash commands - Context optimized:
~/.claude/RTK.mdadded (only 10 lines, saves ~2000 tokens vs old method) - Settings patched:
~/.claude/settings.jsonnow registers the hook - Backup created: Original settings saved to
~/.claude/settings.json.bak
Step 4: Test Your First Command
Try a few RTK commands to see the difference:Directory Listing
Git Status
Git Push
Test Runner (Failures Only)
Step 5: View Your Savings
After running a few RTK commands, check your token savings:First run? The
rtk gain command will show “No tracking data yet” until you’ve run at least one RTK command.RTK tracks all usage in a local SQLite database at ~/.local/share/rtk/history.db.What’s Next?
You’re now set up and saving tokens! Here are some next steps:Explore Commands
See the full list of 50+ optimized commands for git, testing, linting, and more.
Hook Configuration
Learn how auto-rewrite hooks work and customize them for your workflow.
Analytics Deep Dive
Export token savings data as JSON/CSV for dashboards and reports.
Troubleshooting
Common issues and solutions for installation, hooks, and command failures.
Tips for Maximum Savings
Use hooks for automatic optimization
With
rtk init --global, you never need to type rtk manually - all commands are rewritten automatically.Prefix commands manually if hooks aren't installed
If you skipped the hook setup, manually prefix commands:
Check savings regularly
Run
rtk gain weekly to see your cumulative savings and identify high-impact commands.Report missing commands
If you find a command RTK doesn’t optimize, open an issue - we’re always adding more!
Common Workflows
Git Workflow
Test-Driven Development
Package Management
Container Operations
Getting Help
If you run into issues:Documentation
Browse the full documentation for guides, references, and examples.
GitHub Issues
Report bugs, request features, or ask questions.
Troubleshooting
Fix common problems with installation, hooks, and commands.
Community
Join the RTK community and share your token savings!
Pro Tip: Run
rtk gain --all --format json to export your savings data and create custom dashboards or CI/CD reports.