tail-me-everything
v0.1.1
Published
opencode plugin: tee full pipeline output to /tmp/opencode/tee.log before the first grep/tail/head filter
Downloads
310
Readme
tail-me-everything
An opencode plugin that streams the full output of every bash pipeline into a log file you can watch live.
When an agent runs a long command, it usually pipes the output through
grep / tail / head to keep its token bill small. To you watching the
terminal, nothing shows up until the command finishes — and then only the
filtered last lines. This plugin rewrites those commands so the complete
output lands in /tmp/opencode/tee.log while the agent keeps seeing only what
it asked for.
npm run build | tail -n 20 # what the agent intended
npm run build | tee -a /tmp/opencode/tee.log | tail -n 20 # what actually runsWatch the agent work
In a second terminal:
tail -f /tmp/opencode/tee.logYou see every line of every long command as it is produced, before the
grep / tail / head step discards it.
Install
Add to your opencode config (~/.config/opencode/opencode.json globally, or a
project-level opencode.json):
{
"plugin": ["tail-me-everything"]
}Requires Linux or macOS (the log path is a Unix path). Restart opencode after editing the config.
How it works
- Hooks the
bashtool before execution and rewrites the command. - Inserts
| tee -a /tmp/opencode/tee.logat the first pipe togrep,tail, orhead— even when a non-filter pipe comes first (ls | sort | head -n 3). - Ignores pipes inside single or double quotes (
echo "a | grep b" | tailis rewritten only at the real pipe). - Never inserts a second
teeinto an already-rewritten command. - Command without a
grep/tail/headpipe is left untouched.
Enable / disable
The agent can toggle the plugin itself with the tail_me_toggle tool
(enabled: false / enabled: true). The state is persisted in a flag file
and survives restarts.
You can also toggle it manually:
touch /tmp/opencode/tail-me-everything.off # disable
rm /tmp/opencode/tail-me-everything.off # enableLimitations
teecaptures stdout only. Pass2>&1first if you also want stderr in the log (make 2>&1 | tail -n 30).- The log grows indefinitely — trim it yourself (
: > /tmp/opencode/tee.logto truncate). - Only piped commands are affected; a bare
head file.txtis left alone.
License
MIT
