Pipe any command output directly into your existing Claude Code session.
curl -fsSL https://raw.githubusercontent.com/zen4399/cq/main/install.sh | bash && source ~/.zshrcEvery time you hit an error, you:
- Copy the error output
- Switch to Claude Code pane
- Paste
- Lose your conversation context
7 steps. 2 context switches. Every. Single. Time.
cq gcc main.cOne command. Zero context switches. Existing session preserved.
cq gcc main.c
│
├─ Runs: gcc main.c 2>&1 (auto-captures stderr)
│
├─ Finds Claude Code pane via WezTerm / tmux IPC
│
└─ Injects output into existing session + auto-focus
vs the official | claude:
gcc main.c 2>&1 | claude # opens NEW session (context lost)
cq gcc main.c # pipes into EXISTING session (context preserved)One-liner:
curl -fsSL https://raw.githubusercontent.com/zen4399/cq/main/install.sh | bash && source ~/.zshrcOr via git clone:
git clone https://github.com/zen4399/cq
cd cq && ./install.sh
source ~/.zshrccq gcc main.c
cq make
cq ./a.out
cq cargo build
cq npm installAutomatically captures both stdout and stderr. No 2>&1 needed.
cat error.log | cq
tail -f app.log | cq
grep "ERROR" app.log | cq- Claude Code CLI
- zsh
- One of:
- WezTerm (macOS/Linux/Windows)
- tmux (macOS/Linux)
| Terminal | Status |
|---|---|
| WezTerm | ✅ Supported |
| tmux | ✅ Supported |
| iTerm2 | 🚧 Coming soon |
| Others | ⬇️ Falls back to claude --continue |
If no Claude Code pane is detected, cq automatically opens one in a new split pane:
[cq] No Claude Code pane found. Launching...
→ WezTerm splits right, launches claude --continue
→ Sends output to the new pane
No manual setup required. Just run cq and it handles everything.
MIT
