@austinjan/ch-cli
v0.1.4
Published
Capture terminal commands and output, format as markdown, copy to clipboard. Built for pasting into LLMs.
Downloads
575
Maintainers
Readme
ch (copy-history)
Capture terminal commands and their output, format as markdown, and copy to clipboard. Built for pasting into ChatGPT, Claude, Gemini, etc.
Optionally ask Gemini to analyze errors directly from your terminal.
Requirements
- Bun runtime
- Zellij terminal multiplexer
GEMINI_API_KEYenvironment variable (optional, for AI features)
Install
bun install -g @austinjan/ch-cliOr from source:
git clone https://github.com/austinjan/ch.git
cd ch
bun install
bun run build
bun linkQuick Start
Run ch inside a Zellij session:
chA picker shows your recent commands. Use arrow keys to navigate, space to toggle, then:
- Enter — copy selected commands to clipboard
- a — ask Gemini to analyze (requires
GEMINI_API_KEY)
Paste the clipboard into your favorite LLM.
Use Cases
Copy error context to LLM
You ran several commands and something failed. Run ch, select the relevant commands, hit enter. Paste into ChatGPT or Claude with your question.
Quick error analysis
ch whyCaptures your recent terminal history and sends it to Gemini for analysis. If it finds errors, it explains the root cause and suggests fixes. If it needs more info, it'll ask to run diagnostic commands (with your permission).
Options
ch # launch picker, copy to clipboard
ch --stdout # print to stdout instead
ch --debug # show debug info
ch why # ask Gemini to analyze recent errors