rtk-ai / rtk-ai/rtk

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

Open
#2,091 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area:config enhancement help wanted priority:medium
Dominant language
Rust
Stars
81.1k
Forks
5.1k
Avg merge
4d 21h
Merged PRs (30d)
35

Description

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how rtk read and rtk grep currently parse their flags and how configuration is loaded from config.toml. Implement the proposed [defaults] settings for read_level and grep_ultra_compact, then verify that the configured defaults affect both commands as described and that the documented behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.