Small local HTTP API and web UI for managing Claude Code Agent SDK sessions.
npm install
npm run devOpen http://127.0.0.1:5173.
The API runs on http://127.0.0.1:8787.
Projects are local folders under:
/Users/masa/Documents/nj/claude-code-api/projectsThe UI shows the selected project folder name and runs Claude Code from that folder.
GET /api/sessionslists persisted Claude Code sessions across all projects.GET /api/sessions/:sessionId/messagesreads a transcript.POST /api/runsstarts or resumes a session and streams SDK messages as SSE.PATCH /api/sessions/:sessionIdrenames and tags a session.POST /api/sessions/:sessionId/forkforks a transcript.POST /api/sessions/:sessionId/closecloses the in-memory SDK session.DELETE /api/sessions/:sessionIddeletes the local transcript.
By default, runs use opus and bypassPermissions mode with the
SDK's explicit dangerous skip-permissions opt-in. Override defaults with:
CLAUDE_MODEL=sonnet \
CLAUDE_PROJECT=my-project \
npm run devThis is intended for local use. The API can run Claude Code tools against your filesystem without prompting in the default configuration, so do not expose it on a public network.