Like `claude -p`, but driven through an interactive Claude Code session.
Project description
claude-i
Like claude -p, but driven through an interactive Claude Code session.
The interactive claude CLI loads everything (hooks, MCPs, skills, plugins); claude -p is headless and skips a lot of it. claude-i bridges the two: it scripts an interactive session inside a headless tmux, captures the final assistant message via a gated Stop hook, and tears down the process tree on exit.
Status
v0.2.4 — production-ready for both interactive use and non-interactive automation. This release includes the v0.2.3 long-prompt / @agent / slash-skill fixes, late Stop-hook artifact cleanup, clearer Bug 5 retry guidance, and Node 24-ready CI/release infrastructure.
Install
Native Windows is not supported; use WSL2. The
claude-iCLI emitsPLATFORM_ERROR=3onsys.platform == "win32"(G9 platform guard, STORY-001.2).
Option 1 — PyPI (recommended)
pipx install claude-i
# or: uv tool install claude-i
Option 2 — Homebrew (macOS / Linux)
brew tap rafaelscosta/claude-i
brew install claude-i
Option 3 — pipx + GitHub Release
pipx install https://github.com/rafaelscosta/claude-i/releases/download/v0.2.4/claude_i-0.2.4-py3-none-any.whl
Option 4 — pipx + git tag
pipx install git+https://github.com/rafaelscosta/claude-i.git@v0.2.4
Option 5 — sdist (uv-compatible)
pipx install https://github.com/rafaelscosta/claude-i/releases/download/v0.2.4/claude_i-0.2.4.tar.gz
# or: uv tool install https://github.com/rafaelscosta/claude-i/releases/download/v0.2.4/claude_i-0.2.4.tar.gz
Verify
claude-i --version # → claude-i 0.2.4
claude-i doctor # self-diagnostic — should report 5/5 PASS
Artifact checksums
Checksums are published with the GitHub Release assets. For local verification:
shasum -a 256 claude_i-0.2.4-py3-none-any.whl claude_i-0.2.4.tar.gz
Usage
Interactive (single-shot)
claude-i "What is 2+2?"
# → 4
Non-interactive automation / CI / scripts
Use --retries N to absorb the upstream Anthropic-side burst-load session hang (Bug 5 in NOTES.md):
claude-i --retries 3 "<prompt>"
The runner spawns a fresh tmux session on each retry. Recommended:
| Use case | Invocation |
|---|---|
| Interactive single-shot | claude-i "<prompt>" |
| Automation / CI scripts | claude-i --retries 3 "<prompt>" |
| High-burst pipeline | claude-i --retries 5 "<prompt>" + 2s sleep between calls |
If the final stderr contains No Stop hook signal, the CLI now classifies it
as the documented Bug 5 environmental/upstream hang and suggests the retry
level above. Run claude-i doctor first; if doctor is green, treat the timeout
as host/upstream saturation rather than a payload parsing regression.
Script-friendly first run
On the very first invocation, claude-i prompts to install its Stop hook. In a non-TTY context (CI, redirected stdin) this would normally fail with EOFError. Opt into auto-install:
export CLAUDE_I_AUTO_INSTALL_HOOK=1
claude-i --retries 3 "<prompt>"
JSON output
claude-i --output-format json --retries 3 "<prompt>"
# → {"text": "...", "cost_usd": null, "tokens_in": null, "tokens_out": null, "duration_ms": 4231}
Subcommands
claude-i doctor # self-diagnostic (5 checks; --json for machine-readable)
claude-i uninstall # remove the Stop hook from settings.json
claude-i reap # kill orphaned claude-i-* tmux sessions
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Runtime error (timeout, parse failure, doctor FAIL, all retries exhausted) |
| 2 | Missing dependency or config error |
| 3 | Unsupported platform (native Windows; use WSL2) |
Distribution Status
v0.2.4 (2026-06-10) is the current public release. v0.2.3 fixed long prompts, agent/slash-skill invocation, and title/SKIP misattribution; v0.2.4 adds the final PyPI release hygiene and environmental hardening.
| Path | Status |
|---|---|
| Repository (PUBLIC) | ✓ active |
| GitHub Release (wheel + sdist) | ✓ active |
Homebrew tap (rafaelscosta/claude-i) |
✓ active |
PyPI (pipx install claude-i) |
✓ active |
install.sh bootstrap (`curl |
sh`) |
The install.sh script lives at the repo root and supports --local <path> mode using artifacts downloaded from a GitHub Release. See docs/guides/homebrew-tap.md for detailed bootstrap docs.
Origin
Forked from gist isingh/62bdfd0886b0b72bf6231c44f0389ecc. Original single-file script preserved in seed/claude-i for traceability.
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 claude_i-0.2.4.tar.gz.
File metadata
- Download URL: claude_i-0.2.4.tar.gz
- Upload date:
- Size: 68.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 |
ca0a6575917f945fa6cb09c858130c0ae6094500500b70d7ffd9789219c3b9dc
|
|
| MD5 |
a7e9fedf72862c3859f5b632d5afa136
|
|
| BLAKE2b-256 |
ebe177672eeb8eace8dfe7b272a1226c4ae1b558aed2bd6715c682fed0c69508
|
Provenance
The following attestation bundles were made for claude_i-0.2.4.tar.gz:
Publisher:
publish.yml on rafaelscosta/claude-i
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_i-0.2.4.tar.gz -
Subject digest:
ca0a6575917f945fa6cb09c858130c0ae6094500500b70d7ffd9789219c3b9dc - Sigstore transparency entry: 1780705607
- Sigstore integration time:
-
Permalink:
rafaelscosta/claude-i@b8bd885756ded04eb4314eb9678eadd507aebae1 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/rafaelscosta
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b8bd885756ded04eb4314eb9678eadd507aebae1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file claude_i-0.2.4-py3-none-any.whl.
File metadata
- Download URL: claude_i-0.2.4-py3-none-any.whl
- Upload date:
- Size: 42.9 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 |
6f945ae1be8c77fed6db259e7fec3cef749a3aea77164c3ec1d51cf39274c8cb
|
|
| MD5 |
ad94bae3a73510a06e1f1ae8eb052f7d
|
|
| BLAKE2b-256 |
b17e48f0a51f0d60fad9a250f7a47989671ef5f13a80247d90dbf8937cac2cd5
|
Provenance
The following attestation bundles were made for claude_i-0.2.4-py3-none-any.whl:
Publisher:
publish.yml on rafaelscosta/claude-i
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_i-0.2.4-py3-none-any.whl -
Subject digest:
6f945ae1be8c77fed6db259e7fec3cef749a3aea77164c3ec1d51cf39274c8cb - Sigstore transparency entry: 1780705650
- Sigstore integration time:
-
Permalink:
rafaelscosta/claude-i@b8bd885756ded04eb4314eb9678eadd507aebae1 -
Branch / Tag:
refs/tags/v0.2.4 - Owner: https://github.com/rafaelscosta
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b8bd885756ded04eb4314eb9678eadd507aebae1 -
Trigger Event:
workflow_dispatch
-
Statement type: