Claude Code Control
/install claude-code-control
Claude Code Control
Control Claude Code programmatically through visible Terminal.app windows on macOS.
How It Works
Uses AppleScript to:
- Open Terminal.app and launch
claude codein a project directory - Type commands via System Events keystrokes
- Capture screenshots of just the Terminal window (not full screen)
- Record full sessions with timestamped logs
Requirements
- macOS
- Node.js 18+
- Claude Code installed and authenticated
- Accessibility permissions for Terminal.app + Script Editor (System Settings → Privacy & Security → Accessibility)
Usage
const cc = require('./index');
// Launch Claude Code visibly
const session = await cc.launch('/path/to/project');
// Send a command (types it + presses Enter)
const result = await cc.send(session, 'write tests for app.py', 30);
// result.screenshot → path to Terminal window screenshot
// Save session recording
await cc.saveSession(session, './recording.json');
// Close
await cc.close(session);
API
| Function | Description |
|---|---|
launch(path, opts?) |
Open Terminal + start Claude Code. Returns session ID |
send(id, command, waitSec?) |
Type command, wait, screenshot. Returns {screenshot, duration_ms} |
verifyScreen(id, desc) |
Take a verification screenshot |
approveSecurity(id) |
Handle "trust this folder" prompt |
handleLogin(id) |
Send /login command |
saveSession(id, path) |
Save session log to JSON |
close(id) / closeAll() |
Exit Claude Code gracefully |
takeScreenshot(path?) |
Capture Terminal window |
focusTerminal() |
Bring Terminal to front |
Pro Features (Coming Soon)
- 🎬 Video recording of sessions
- 🤖 Multi-agent / multi-terminal orchestration
- 📊 Session analytics
- 🔄 Session replay
- 🌐 Remote control via SSH
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install claude-code-control - After installation, invoke the skill by name or use
/claude-code-control - Provide required inputs per the skill's parameter spec and get structured output
What is Claude Code Control?
Programmatically control Claude Code in visible macOS Terminal windows via AppleScript for command input, screenshots, session logging, and terminal management. It is an AI Agent Skill for Claude Code / OpenClaw, with 1417 downloads so far.
How do I install Claude Code Control?
Run "/install claude-code-control" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Claude Code Control free?
Yes, Claude Code Control is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Claude Code Control support?
Claude Code Control is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Claude Code Control?
It is built and maintained by Michael Melichar (@melichar-m); the current version is v1.2.0.