rtk-ai/rtk
View on GitHubfeat: add yq rewrite rule and TOML filter for YAML query output compression
Open
#1,910 opened on May 16, 2026
area:clienhancementgood first issuepriority:low
Repository metrics
- Stars
- (48,085 stars)
- PR merge metrics
- (Avg merge 11d 1h) (45 merged PRs in 30d)
Description
Problem
yq is the YAML counterpart to jq — it produces verbose YAML output that can be large when querying multi-document manifests, Kubernetes configs, or Helm values files. Currently rtk has no hook rewrite rule for yq, so bare yq commands are never compressed even though a simple truncation filter would save significant tokens.
Proposed Solution
Add a yq rewrite rule to src/discover/rules.rs and create src/filters/yq.toml following the same pattern as the existing jq.toml:
match_command = "^yq\\b"strip_lines_matching = ["^\\s*$"]— remove blank linesmax_lines = 40truncate_lines_at = 120
Related
- Similar to #1364 (jq rewrite rule) — same compression pattern for structured query tools
jq.tomlalready exists as the template for this approach