senkani_exec
Bash
Savings 60–90%
Shell execution with 24+ command-specific filter rules applied to output. Mutating commands pass through unchanged; read commands (git status, npm install, make, curl) get heavily compressed.
Signature
Behavior
FilterEngine matches `(command, subcommand)` pairs to rule chains. Read-only commands route through the filter; mutating commands (`git commit`, `rm`, `docker run`, `terraform apply`, ...) bypass it so the tool never hides a destructive effect. Adaptive truncation for long outputs; background mode for long builds via `background: true`.
Inputs
Output
stdout + stderr (filtered) + exit code + a `compressed_from` byte count so the agent sees the ratio. Background mode returns a `job_id` and the starting tail.
Example
// filtered npm install {"tool": "senkani_exec", "args": {"cmd": "npm install"}} // raw output: 428 lines · returned: 2 lines added 312 packages in 4.8s (0 vulnerabilities) // savings: 99.5%
Details
Rule set covers git (status/diff/log/clone/pull), npm/yarn/pnpm install, pip, make, cargo, swift build, curl, ssh, docker pull, terraform plan, and ~14 more. Each rule is tested under `Tests/FilterTests/`. Rules are a pure function of `(cmd, stdout, stderr)` — no side effects.
See also
Filter toggle (F)— Disable the filter pipeline per-pane.senkani exec CLI— Same filter, scriptable from the shell.Compound learning— New filter rules learned from your own sessions.
Sources/MCPServer/Tools/ExecTool.swift + Sources/Filter/FilterEngine.swift