deterministic output shaping

Shape command output.
Preserve command truth.

cmdshape removes terminal noise before it reaches your coding agent while keeping command behavior, exit codes, failure detail, and raw-output escape hatches intact.

Install
curl -fsSL https://raw.githubusercontent.com/SuppieRK/cmdshape/main/scripts/install.sh | sh

agent integrations

One filtering layer, across the tools you already use.

Connect cmdshape to the coding agents already in your workflow.

  • Claude Code
  • Codex
  • OpenCode
  • Cursor
  • GitHub Copilot
  • Gemini
  • Windsurf
  • Roo Code
  • KiloCode
  • Qwen
  • Cline

the runtime contract

The output gets shorter. The command stays itself.

Terminal output is written for human scanning. cmdshape removes banners, repeated status lines, and boilerplate only when a command-aware filter can preserve the information needed for the next action.

Execute natively

The command shape runs exactly as typed, with its exit status intact.

Shape with evidence

Deterministic rules remove noise only when the command and output shape are understood.

Pass through doubt

Diagnostics, structured output, interactive modes, and --raw remain native.

measured on real commands

Gains on real work

cmdshape does not just promise smaller output. cmdshape gain shows the token impact of real commands, so you can see where filtering helps, where it does not, and whether the result stays worth trusting.

Claude Code
88 cmds · 5,330,571 → 90,127 tokens (98.3% saved)
Wins : find (4.8m / 99%) · gradle (367k / 87%) · grep (6k / 1%)Drag : cd (23 cmds) · jar (21 cmds) · grep (4 cmds)Trend: ↑ +12.4 pts week over week (85.9% → 98.3%) · on a roll
Codex
1,825 cmds · 2,461,959 → 2,160,427 tokens (12.3% saved)
Wins : grep (67k / 60%) · go (54k / 90%) · git (16k / 59%)Drag : sed (765 cmds) · openspec (245 cmds)Trend: ↓ -2.1 pts week over week (14.4% → 12.3%) · slipping

rules you can inspect

Create CLI output filters for your workflow

Write command-aware YAML, replay real output, and verify exactly what changed before you promote a terminal output filter.

start with the command
version: 1
filter: "yarn"
cases:
  - id: "run-success"
    when_arguments:
      have_sequence: ["run"]
    compress_output:
      stdout:
        lines:
          skip:
            - starts_with: "yarn run v"
            - starts_with: "$ "
            - starts_with: "Done in "
native output
yarn run v1.22.22
$ node scripts/success.js
success-line-1
success-line-2
Done in 0.06s.

Scaffold a filter, capture a real command, verify the replay, then promote only when the behavior earns trust.

Read more about command-aware YAML filters

fixture-backed comparisons

Recorded examples from benchmark fixtures

The command on the left is the recorded fixture input. The right side is the verified cmdshape output for that same case.

npm run success-noisy

107 tokens → 45 tokens

original
> cmdshape-npm-benchmark-basic@1.0.0 success-noisy
> node --test test/success.test.js

TAP version 13
# Subtest: add computes sums
ok 1 - add computes sums
  ---
  duration_ms: 0.366266
  type: 'test'
  ...
# Subtest: divide computes quotient
ok 2 - divide computes quotient
  ---
  duration_ms: 0.067165
  type: 'test'
  ...
1..2
# tests 2
# suites 0
# pass 2
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 37.905034
compressed
# Subtest: add computes sums
ok 1 - add computes sums
# Subtest: divide computes quotient
ok 2 - divide computes quotient
1..2
# tests 2
# pass 2
# fail 0
# duration_ms 37.905034