Explain terminal output with GPT-4 in one command.
TermPilot is a Rust-based CLI that pipes terminal output to GPT-4 and returns a concise explanation. Useful for debugging cryptic commands, understanding logs, and speeding up shell workflows. Open source, configurable, and dead simple.
record_output ls -la
explain
Terminal output:
-rw-r--r-- 1 user staff 1024 May 15 notes.txt
GPT says:
"This lists a file called
notes.txtwith read/write permissions, owned by 'user', size 1024 bytes, last modified May 15."
git clone https://github.com/YOURNAME/termpilot
cd termpilot
cargo build --release
cp target/release/termpilot /usr/local/bin/termpilot
function record_output() {
"$@" 2>&1 | tee ~/.last_output
}
alias explain='cat ~/.last_output | termpilot'
- You'll be prompted for your OpenAI key on first run.
- It's saved to
~/.config/termpilot/config.toml - Reset it anytime with:
termpilot --reset-key
| Flag | Description |
|---|---|
--file <path> |
Read output from a file |
--reset-key |
Clear stored API key |
--help |
Show help text |
--version |
Show version number |
MIT — open source and ready to fork.
Because shell commands are fast. But understanding what they just did shouldn't slow you down.
GPT, explain this mess.
Done.