Drive Claude Code headlessly in a tmux session — script and automate the claude CLI from shell, cron, or code.
pipper is a tiny harness that runs the interactive claude CLI inside tmux, auto-accepts its permission dialogs, sends a prompt, and returns Claude's answer. It lets you call Claude Code from scripts, cron jobs, pipelines, or another program — without sitting at the terminal.
It drives your normal, already-logged-in claude client, so it inherits whatever plan and limits that login has. Use it within Anthropic's terms of service.
- Automate Claude Code in CI, cron, or batch jobs
- Glue it into other tools — get an answer back as text or JSON
- TUI-version-proof — instead of scraping the terminal, pipper asks Claude to write its answer to a temp file, then reads it back
tmux- the
claudeCLI — installed and already authenticated (clauderuns without a login prompt)
pip install pipper-cli # once published; command is `pipper`
# or from source:
git clone https://github.com/sanjoxtech/pipper && cd pipper && pip install -e .Zero dependencies — Python stdlib only.
pipper "summarize this repo's README in 3 bullets"
echo "list the riskiest lines in auth.py" | pipper --cwd ./myproject
pipper -f task.txt --timeout 900 --jsonOptions: --cwd <dir>, --session <name>, --timeout <s>, --boot-timeout <s>, --json.
From Python:
import pipper
answer = pipper.run("explain what this project does", cwd="./repo")- Spawns
claude --permission-mode bypassPermissionsin a fresh tmux session - Auto-accepts the startup/permission dialogs (handles different orderings + plain y/n)
- Pastes your prompt via an isolated tmux buffer (so parallel runs don't clash)
- Asks Claude to write its final answer to a temp file, then polls that file
- Returns the answer; tears the session down; bails early on repeated API errors
- Relies on
tmux+ the interactiveclaudeTUI. If Claude Code changes its startup dialogs a lot, the auto-accept heuristics may need a tweak. bypassPermissionsmeans Claude can run tools without asking — only point it at directories you trust.- It automates your normal
claudelogin; respect Anthropic's usage terms and rate limits.
Built by Sanjay (sanjoxtech) — sanjox.tech · sanjox.tech@gmail.com
MIT — see LICENSE.
