Skip to main content

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-i CLI emits PLATFORM_ERROR=3 on sys.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.

Metadata

Release files for claude-i 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-i 0.2.4
File Size Uploaded Provenance
claude_i-0.2.4.tar.gz 68.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-i 0.2.4
File Interpreter ABI Platform
claude_i-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 110.9 kB

Release files / claude_i-0.2.4.tar.gz

Download URL claude_i-0.2.4.tar.gz
Size 68.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ca0a6575917f945fa6cb09c858130c0ae6094500500b70d7ffd9789219c3b9dc
BLAKE2b-256 checksum
How to use checksums
ebe177672eeb8eace8dfe7b272a1226c4ae1b558aed2bd6715c682fed0c69508
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.

Transparency log

Release files / claude_i-0.2.4-py3-none-any.whl

Download URL claude_i-0.2.4-py3-none-any.whl
Size 42.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f945ae1be8c77fed6db259e7fec3cef749a3aea77164c3ec1d51cf39274c8cb
BLAKE2b-256 checksum
How to use checksums
b17e48f0a51f0d60fad9a250f7a47989671ef5f13a80247d90dbf8937cac2cd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.

Transparency log

Security for claude-i 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for claude_i-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page