rtk-ai/rtk

Feature request: configurable default flags for `rtk read` and `rtk grep`

Open

#2.091 geöffnet am 25. Mai 2026

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (2.914 Forks)batch import
area:configenhancementhelp wantedpriority:medium

Repository-Metriken

Stars
 (48.085 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11T 1h) (45 gemergte PRs in 30 T)

Beschreibung

Problem

When using RTK with an AI assistant (Claude Code), the flags -l aggressive (for rtk read) and --ultra-compact (for rtk grep) dramatically improve token savings — but they must be specified manually on every call.

Measured impact over real sessions:

  • rtk read without flag: ~1-6% savings (101 calls wasted)
  • rtk read -l aggressive: ~80% savings
  • rtk grep without flag: ~50% savings
  • rtk grep --ultra-compact: ~80% savings

Because these flags cannot be set as defaults, savings depend entirely on the AI assistant's behavior — which is inconsistent across sessions due to context resets. Average adoption sits at ~55% despite explicit instructions in CLAUDE.md.

Proposed Solution

Add a [defaults] section to config.toml allowing users to set default flags per command:

[defaults]
read_level = "aggressive"       # equivalent to -l aggressive on every rtk read
grep_ultra_compact = true       # equivalent to -u on every rtk grep

Contributor Guide