Skip to content

trim 0.1.6

Latest

Choose a tag to compare

@github-actions github-actions released this 05 Sep 06:42
· 1 commit to master since this release

Full Changelog: 0.1.5...0.1.6

New commands

  • trim context — one-call workspace context: git status + diff, changed and untracked files, file metadata, outlines, source windows, recent history, and matches — compacted once, with an explicit CONTEXT_TRUNCATED marker so the agent knows to narrow scope. Supports --query for targeted symbol context
  • trim ref <symbol> [path] [--depth N] — syntax-level call tree: callees + callers by file/function/line, breadth-first to --depth (default 2, max 8). Built on ast-grep with graceful rg fallback; engine refactored into src/ref/ with per-language profiles
  • trim string <text> [path] — string → keys → translations + call sites, anything
  • trim keyword <kw...> [path] [--depth N] — fuzzy keywords → symbols + string-bound ids → refs + callers. No persistent index or cache required

Improvements

  • Smart routing — the ref/keyword index routes ast-grep scans only to language profiles whose extensions are present in the path (single file listing) instead of probing all 18 profiles; falls back to plain rg when discovery is unavailable
  • Paging — terminal output is auto-paged through TRIM_PAGER/PAGER (less -FRX default on macOS/Linux, more on Windows; TRIM_NO_PAGER=1 to disable; piped output never paged). Short output exits automatically and preserves ANSI colors. Fixed pager behavior on macOS
  • HUMAN mode — TRIM_HUMAN=1 disables compaction globally for raw output
  • Compaction refs ^1^–^5^ — replaces $1..$5 to avoid accidental $N collisions inside output bodies; still fully lossless
  • Output strings now use raw ASCII punctuation