claude-code-driverDrive interactive Claude Code from Node.js
The real Claude Code TUI runs in a private tmux pane on your subscription. Your code sends the prompts and reads every step as a typed event.
The real Claude Code TUI runs in a private tmux pane on your subscription. Your code sends the prompts and reads every step as a typed event.
Hooks report each prompt and tool call as it happens. The transcript confirms what finished. The screen shows retries and dialogs that nothing else reports. One pure core merges the four sources into events and a live state snapshot.
const turn = session.send('Fix the failing test.');
for await (const e of turn) {
if (e.type === 'toolStarted') {
console.log(e.data.name);
}
}
const { outcome } = await turn.done;The library makes these guarantees in code and tests them.
Build from source, add it to your project next to the pinned Claude Code, and open a session in a folder you trust. The getting started guide takes about five minutes.
pnpm add /path/to/claude-code-driver @anthropic-ai/claude-code@2.1.316