ashlr

ashlr__bash

Token-efficient bash execution. Auto-compresses long stdout, summarizes common commands, refuses catastrophic patterns.

Server: ashlr-bash — servers/bash-server.ts

A token-efficient replacement for Claude Code's built-in Bash tool. Long stdout is auto-compressed; common commands like git log, ls, and npm list return compact structured summaries instead of raw output. Catastrophic patterns (rm -rf /, DROP TABLE, etc.) are refused before execution. stderr is never compressed — errors always reach the agent intact.

Tools exposed

ToolDescription
ashlr__bashRun a command and return compressed output
ashlr__bash_startStart a long-running process in the background
ashlr__bash_stopStop a background process by ID
ashlr__bash_tailTail output from a background process
ashlr__bash_listList all running background processes

Input schema — ashlr__bash

FieldTypeRequiredDescription
commandstringyesShell command to execute
cwdstringnoWorking directory (default: process.cwd())
timeout_msnumbernoKill after N ms (default 60000)
compactbooleannoAuto-compress long output (default true)
bypassSummarybooleannoSkip LLM summarization of long output

Output format

Output starts with the command echo and ends with a footer giving the exit code, elapsed time and bytes saved by compaction. Common commands get a structured summary. Here git log is trimmed to the 10 most recent commits:

$ git log --oneline -20
3d2c59c chore: commit 39
373f538 chore: commit 38
1e92294 chore: commit 37
...
91cad2a chore: commit 30
· 20 commits total (showing 10 most recent)

· exit 0 · 24ms · [compact saved 207 bytes]

Other long stdout keeps its head and tail, with an elided-bytes marker in the middle ([... 7,293 bytes of output elided ...]). stderr follows stdout under its own marker, uncompressed:

$ echo out; echo oops >&2; exit 3
out

--- stderr ---
oops
· exit 3 · 7ms · [compact saved 0 bytes]

Example

Use ashlr__bash to run: git log --oneline -50
  • ashlr__diff — token-efficient git diff, more structured than raw bash
  • ashlr__logs — read log files with severity filtering

On this page