Extend and automate PATAPIM — the desktop cockpit for AI coding CLIs — from your own scripts, tools and services.
PATAPIM runs a local HTTP + WebSocket API on http://127.0.0.1:31415 (the same API its built-in MCP server uses). This repo contains everything you need to build on it:
openapi/openapi.json— the full API spec, generated from the app's route table on every releasepackages/sdk—@patapim/sdk, a zero-dependency TypeScript client (HTTP + event stream)examples/— ready-to-run scripts: post tasks from CI, prompt a terminal, build your own notification routerdocs/— getting started, authentication & scopes, events, versioning policy
- In PATAPIM: Preferences → Local API → Enable Local API, then Create token with the scopes you need. Copy the token (shown once).
- Talk to the API:
curl http://127.0.0.1:31415/api/v1/terminals \
-H "x-patapim-token: ppat_..."Or with the SDK:
import { PatapimClient } from '@patapim/sdk';
const patapim = new PatapimClient({ token: process.env.PATAPIM_TOKEN! });
// Send a prompt to terminal 3
await patapim.terminals.write('3', 'Fix the failing tests\n');
// React to events
const events = await patapim.events(['notifications', 'tasks']);
events.on('notifications', (e) => console.log('terminal needs attention:', e.terminalId));- CI / automation hooks — create tasks, kick off prompts, read terminal output from any script
- Custom notification routing — subscribe to the WS event stream and forward "Claude needs attention" to Slack, Discord, ntfy, a lightbulb…
- Dashboards & monitors — live terminal state (processing / plan mode / attention) over HTTP
- Browser automation — drive PATAPIM's embedded browser (navigate, click, fill, screenshot)
PATAPIM also has an in-app plugin system: drop a folder into ~/.patapim/plugins/<name>/ with a plugin.json manifest, enable it in Preferences (you approve its permissions, browser-extension style), and it runs isolated with a scoped token. Plugins can register MCP tools that appear in every Claude Code / Codex session automatically. Start here: docs/plugins.md · examples/hello-world-plugin.
/api/v1 is additive-only: routes, parameters and response fields are never removed or renamed. Breaking changes would ship as /api/v2 with a long overlap. Details in docs/versioning.md.
MIT — see LICENSE. The PATAPIM application itself is proprietary; see PLUGIN_TERMS.md for the API terms.