Feature request: configurable default flags for `rtk read` and `rtk grep`
Nobody has claimed this yet.
- 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 readwithout flag: ~1-6% savings (101 calls wasted)rtk read -l aggressive: ~80% savingsrtk grepwithout flag: ~50% savingsrtk 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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