Skip to content

Add a claude-cli engine that runs Claude through the local CLI - #2

Merged
bensynapse merged 1 commit into
mainfrom
claude-cli-engine
Sep 29, 2026
Merged

bensynapse merged 1 commit into
mainfrom
claude-cli-engine

Conversation

@bensynapse

Copy link
Copy Markdown
Contributor

Adds a claude-cli engine for people who have a Claude subscription but no API key. It runs the local Claude Code CLI (claude -p) with only WebSearch and WebFetch allowed.

Each call runs as a stranger. The working directory is a new empty temp folder, HOME and the config folder are temp folders too, and git reads no config. Only an allow-list of environment variables gets through, and only the login is copied in. An earlier internal run leaked the operator's git username into the session, and Claude then addressed the reader as the company owner. The README now says that CLI results still depend on the local account.

The engine only runs when you name it with --engine claude-cli. If claude is not on PATH, or there is no login, the run stops before the first call with a clear error. Rows record cost_usd: 0 and "subscription": true, and the report says so. A new --timeout flag works for every engine (180 s by default, 600 s for claude-cli). The 13 new tests use a fake claude script, so CI makes no real calls.

Live check on 2026-09-29: aeb run questions/template.yaml --engine claude-cli --dry-run with brand "Example Corp" and domain example.org. All 4 calls answered without errors. Each one searched the web and came back with 9 or 10 sources. None of the answers mentioned the operator.

For people with a Claude subscription and no API key. Each call runs
`claude -p` with only WebSearch and WebFetch allowed. It runs in an
empty temp folder with a temp HOME, no git config and an allow-listed
environment. The model never sees the operator's git identity,
CLAUDE.md or memory. Only the login is copied in.

The engine joins a run only when named with --engine claude-cli, and
stops before the first call if `claude` is not on PATH. Rows record a
cost of 0 and "subscription": true. Sources come from the search
results and fetched pages in the tool stream, plus links in the text.

A new --timeout flag sets the per-call limit for every engine
(default 180 s, claude-cli 600 s). The tests use a fake `claude`.
@bensynapse
bensynapse merged commit c7189d5 into main Sep 29, 2026
6 checks passed
@bensynapse
bensynapse deleted the claude-cli-engine branch September 29, 2026 01:34
bensynapse added a commit that referenced this pull request Sep 29, 2026
Bumps the version to 0.1.2 in pyproject.toml, CITATION.cff and the
package.

The release adds the claude-cli engine from #2, which runs Claude
through the local Claude Code command line on a subscription.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant