Quick Start
このコンテンツはまだ日本語訳がありません。
Quick Start
Section titled “Quick Start”This guide walks you through your first RTK commands after installation.
Prerequisites
Section titled “Prerequisites”RTK is installed and verified:
rtk --version # rtk x.y.zrtk gain # shows token savings dashboardIf not, see Installation.
Step 1: Initialize for your AI assistant
Section titled “Step 1: Initialize for your AI assistant”# For Claude Code (global — applies to all projects)rtk init --global
# For a single project only (CLAUDE.md instructions, no hook)cd /your/project && rtk initrtk init --global installs the hook that automatically rewrites commands. Restart your AI assistant after this step.
Using something other than Claude Code? Every agent has its own flag:
rtk init -g --gemini # Gemini CLIrtk init -g --codex # Codex (OpenAI)rtk init -g --agent cursor # Cursorrtk init -g --agent windsurf # Windsurfrtk init --agent cline # Cline / Roo CodeSee Supported agents for the full list, including per-agent uninstall and the project-local vs global distinction.
Preview without writing: --dry-run
Section titled “Preview without writing: --dry-run”To see exactly what init would change before it touches anything, add --dry-run:
rtk init --global --dry-runEvery would-be file create/update/patch is printed with a [dry-run] would ... prefix, then a [dry-run] Nothing written. footer. Nothing on disk is modified, no settings.json is patched, and the telemetry consent prompt is skipped. Combine with -v to also print the full content RTK would write:
rtk init --global --dry-run -v--dry-run works for every init flavour (--agent cursor, --gemini, --codex, --copilot, --uninstall, …). It cannot be combined with --show.
Step 2: Use your tools normally
Section titled “Step 2: Use your tools normally”Once the hook is installed, nothing changes in how you work. Your AI assistant runs commands as usual — the hook intercepts them transparently and rewrites them before execution.
For example, when Claude Code runs cargo test, the hook rewrites it to rtk cargo test before it executes. The LLM receives filtered output with only the failures — not 500 lines of passing tests. You never see or type rtk.
RTK covers all major ecosystems — Git, Cargo/Rust, JavaScript, Python, Go, Ruby, .NET, Docker/Kubernetes, and more. See What RTK Optimizes for the full list.
Step 3: Check your savings
Section titled “Step 3: Check your savings”After a few commands, see how much was saved:
rtk gainIllustrative output:
Total commands : 10Input tokens : 50,000Output tokens : 5,000Saved : 45,000 (90.0%)Simple quoted shell wrappers are rewritten too, without changing the shell they name:
bash -c "head foo && grep -R bar ."# → bash -c "rtk read foo --head-lines 10 && rtk grep -R bar ."This covers exact sh -c, bash -c, zsh -c and fish -c wrappers around a quoted script. A fish -c script is read as fish, so fish’s own syntax ((cmd) substitution, and/or/end) is left alone rather than rewritten under POSIX rules:
fish -c 'git status; cargo test' # → fish -c 'rtk git status; rtk cargo test'fish -c 'git status; and cargo test' # unchangedShell expansion inside an outer double quote, extra shell options, redirects to files and nested wrappers pass through unchanged.
Step 4: Unsupported commands
Section titled “Step 4: Unsupported commands”Commands RTK doesn’t recognize run through passthrough — output is unchanged, usage is tracked:
rtk bypass make installNext steps
Section titled “Next steps”- What RTK Optimizes — all supported commands and savings by ecosystem
- Supported agents — Claude Code, Cursor, Copilot, and more
- Configuration — customize RTK behavior
- Token Savings Analytics — the full
rtk gainsurface - Editions and Licensing — what each download contains