Drive Claude Code headlessly in a tmux session — script and automate the claude CLI.
Project description
🪈 pipper
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.
Why
- 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
Requires
tmux- the
claudeCLI — installed and already authenticated (clauderuns without a login prompt)
Install
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.
Use
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 --json
Options: --cwd <dir>, --session <name>, --timeout <s>, --boot-timeout <s>, --json.
From Python:
import pipper
answer = pipper.run("explain what this project does", cwd="./repo")
How it works
- 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
Limitations / honest notes
- 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.
Author
Built by Sanjay (sanjoxtech) — sanjox.tech · sanjox.tech@gmail.com
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pipper_cli-0.1.0.tar.gz.
File metadata
- Download URL: pipper_cli-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1903935a2b1f55e33ec2cac88d56aec8c321763bbe7ffc1d73028d19e047d8b3
|
|
| MD5 |
97f8b99cdd6cbfbae5bac397b5a68ee8
|
|
| BLAKE2b-256 |
4e6d016239a870103c5b24bda05960486868805c336b3c9375757e368e26abcf
|
Provenance
The following attestation bundles were made for pipper_cli-0.1.0.tar.gz:
Publisher:
publish.yml on sanjoxtech/pipper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipper_cli-0.1.0.tar.gz -
Subject digest:
1903935a2b1f55e33ec2cac88d56aec8c321763bbe7ffc1d73028d19e047d8b3 - Sigstore transparency entry: 2009884013
- Sigstore integration time:
-
Permalink:
sanjoxtech/pipper@b598d53fee6668e9c166668431f34a238dc68327 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/sanjoxtech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b598d53fee6668e9c166668431f34a238dc68327 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pipper_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pipper_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36bd3037ecba8f3cb4382644450e8f2c95d6c3d2d1f340482d4222b609df2fef
|
|
| MD5 |
9a7316b11149c524c20c54d07e32de56
|
|
| BLAKE2b-256 |
dfd002c4d08c8ffdc8f748b75da45d55850fe8fe8496af4989ec35d69a201385
|
Provenance
The following attestation bundles were made for pipper_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on sanjoxtech/pipper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipper_cli-0.1.0-py3-none-any.whl -
Subject digest:
36bd3037ecba8f3cb4382644450e8f2c95d6c3d2d1f340482d4222b609df2fef - Sigstore transparency entry: 2009884092
- Sigstore integration time:
-
Permalink:
sanjoxtech/pipper@b598d53fee6668e9c166668431f34a238dc68327 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/sanjoxtech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b598d53fee6668e9c166668431f34a238dc68327 -
Trigger Event:
workflow_dispatch
-
Statement type: