mirror of
https://github.com/rtk-ai/rtk.git
synced 2026-09-19 07:33:17 +08:00
6e55f8984c
Structure: - Move docs/README.md → .github/docs-pipeline-contract.md (interface contract is not user-facing content) - Rewrite docs/guide/index.md as a proper landing page with RTK intro, flow diagram, and navigation (replaces empty nav stub) - Move configuration.md → getting-started/configuration.md (sidebar order 4, after supported-agents per Adrien's suggestion) Missing content: - Add docs/guide/analytics/discover.md: rtk discover (missed savings analysis) and rtk session (adoption tracking across sessions) - Add uninstall instructions to installation.md (rtk init -g --uninstall, cargo uninstall, brew uninstall) - Add global flags section to what-rtk-covers.md (-u/--ultra-compact, -v/--verbose) - Add rtk smart command to what-rtk-covers.md Files section Agents: - Update supported-agents.md: 10 agents (was 9) - Add OpenClaw (TypeScript plugin, before_tool_call) - Add Mistral Vibe (planned, issue #800) - Fix GitHub Copilot: VS Code = transparent rewrite via PreToolUse, Copilot CLI = deny-with-suggestion (upstream limitation) Signed-off-by: Florian BRUNIAUX <florian@bruniaux.com>
3.2 KiB
3.2 KiB
title, description, sidebar
| title | description | sidebar | ||
|---|---|---|---|---|
| Configuration | Customize RTK behavior via config.toml, environment variables, and per-project filters |
|
Configuration
Config file location
| Platform | Path |
|---|---|
| Linux | ~/.config/rtk/config.toml |
| macOS | ~/Library/Application Support/rtk/config.toml |
rtk config # show current configuration
rtk config --create # create config file with defaults
Full config structure
[tracking]
enabled = true # enable/disable token tracking
history_days = 90 # retention in days (auto-cleanup)
database_path = "/custom/path/tracking.db" # optional override
[display]
colors = true # colored output
emoji = true # use emojis in output
max_width = 120 # maximum output width
[filters]
ignore_dirs = [".git", "node_modules", "target", "__pycache__", ".venv", "vendor"]
ignore_files = ["*.lock", "*.min.js", "*.min.css"]
[tee]
enabled = true # save raw output on failure
mode = "failures" # "failures" (default), "always", "never"
max_files = 20 # rotation: keep last N files
# directory = "/custom/tee/path" # optional override
[telemetry]
enabled = true # anonymous daily ping (opt-out below)
[hooks]
exclude_commands = [] # commands to never auto-rewrite
Environment variables
| Variable | Description |
|---|---|
RTK_DISABLED=1 |
Disable RTK for a single command (RTK_DISABLED=1 git status) |
RTK_TEE_DIR |
Override the tee directory |
RTK_TELEMETRY_DISABLED=1 |
Disable telemetry |
RTK_HOOK_AUDIT=1 |
Enable hook audit logging |
SKIP_ENV_VALIDATION=1 |
Skip env validation (useful with Next.js) |
Tee system
When a command fails, RTK saves the full raw output to a local file and prints the path:
FAILED: 2/15 tests
[full output: ~/.local/share/rtk/tee/1707753600_cargo_test.log]
Your AI assistant can then read the file if it needs more detail, without re-running the command.
| Setting | Default | Description |
|---|---|---|
tee.enabled |
true |
Enable/disable |
tee.mode |
"failures" |
"failures", "always", "never" |
tee.max_files |
20 |
Rotation: keep last N files |
| Min size | 500 bytes | Outputs shorter than this are not saved |
| Max file size | 1 MB | Truncated above this |
Excluding commands from auto-rewrite
Prevent specific commands from being rewritten by the hook:
[hooks]
exclude_commands = ["git rebase", "git cherry-pick", "docker exec"]
Or for a single invocation:
RTK_DISABLED=1 git rebase main
Telemetry
RTK sends one anonymous ping per day (23h interval). No personal data, no file paths, no command content.
Data sent: device hash, version, OS, architecture, command count/24h, top commands, savings %.
To opt out:
# Via environment variable
export RTK_TELEMETRY_DISABLED=1
# Via config.toml
[telemetry]
enabled = false
Per-project filters
Create .rtk/filters.toml in your project root to add custom filters or override built-ins. See src/filters/README.md for the full TOML DSL reference.