Jean-Claude: A Self-Hosted Command Center for Claude Code
Featured Project

Jean-Claude: A Self-Hosted Command Center for Claude Code

Jean-Claude is a self-hosted web front end for Claude Code that I designed and built. It lets me start, watch, steer, and approve AI coding sessions in any of my repositories from my phone, my PC browser, or a terminal, with several devices driving the same live session and nothing left open on my desk.

Technologies Used

bubblewrapChrome DevTools ProtocolFastifyGoogle ColabJupyterModel Context ProtocolNode.jsPlaywrightProgressive Web AppPythonReactSQLiteSSHtmuxTypeScriptuvViteVitestWeb PushWebAuthnWebSocketswhisper.cppZod

Overview

Jean-Claude is a self-hosted, single-user command center for Claude Code. An always-on daemon runs on my workstation, starts and resumes Claude Code sessions in any of my roughly 70 local git repositories, and streams each one to an installable web app. I can start a session at my desk, approve its next step from my phone in line at the store, and pick it back up in a terminal, all without losing a single message or interrupting work in progress. It has since grown from a session remote into a full AI workspace: notebooks that run on a local GPU or in Google Colab, an encrypted secrets store, interactive artifacts, and a shared browser with real developer tools.

My Role & Contributions

I'm the sole architect and engineer. I wrote the spec, ran the feasibility spikes, and designed, built, tested, and deployed every layer. My key contributions include:

  • Protocol Engineering: I mapped and documented how the Claude Code CLI streams sessions and reports events, then locked that behavior down with recorded, scrubbed fixtures and contract tests, so every CLI upgrade is checked against real traffic.
  • Daemon Architecture: I built a single-process Node.js daemon (Fastify, WebSockets, SQLite) with a session supervisor, a per-session state machine, an append-only event log, and replay-on-reconnect fan-out to any number of clients.
  • Mobile-First Client: I designed and built a React progressive web app tuned for the iPhone as the primary device: thumb-reach actions, safe areas, keyboard insets, offline-fast cold starts, and push notifications.
  • Remote Execution: I extended the whole system to run sessions on other machines over SSH. Sessions survive dropped connections, and the remote host needs no setup.
  • Quality & Release Engineering: I built the test pyramid and a release pipeline that ships each commit from its own release directory, runs every test gate, backs up the databases, and only then swaps the running service.

The Challenge

Claude Code is a terminal application. That works at a desk, but agentic coding sessions are long-running. They stop to ask for permission, ask clarifying questions, and finish while you're somewhere else. A session started in one terminal was effectively stuck there: stepping away meant coming back to an agent that had been waiting on a yes/no answer for an hour, and moving to another device meant killing work in progress. Existing remote options either reimplemented the agent loop, which drifts from the real tool, or exposed a raw terminal that's unusable on a phone.

The Solution

I built Jean-Claude around one rule: the real CLI is the source of truth. Jean-Claude never calls the model API directly or reimplements the agent. It spawns the official claude binary, speaks its native stream-json protocol, and reads its own transcripts. The database is only an index and a UI cache that can always be rebuilt from those transcripts. As a result, every skill, hook, MCP server, and project instruction file I already use keeps working, and each CLI upgrade comes down to verifying new fixtures, not rewriting features.

Before writing product code, I ran 16 pass/fail spikes against the live CLI to prove the risky assumptions, like remote permission approvals, image input, per-session browser isolation, and terminal handoff. I've recorded every decision made along the way, more than 370 so far, in a decision log organized by domain.

Core Capabilities

  • Any Session, Any Device: Several clients can watch and drive the same live session at once. A WebSocket event log with sequence numbers replays exactly what a reconnecting client missed, and a sent message is never silently lost, stuck, or doubled.
  • Approvals from Anywhere: Permission prompts and questions arrive as push notifications that can be answered right from the notification, with "always allow" gated behind Face ID through WebAuthn passkeys. The first device to answer wins.
  • Chat ↔ Terminal Handoff: A session can move from the chat view into a tmux-backed terminal and back. Terminal sessions stay fully drivable from the phone through Claude Code's hooks, and sessions started outside Jean-Claude can be adopted once they're idle.
  • Never Cut Work in Progress: Idle shutdown, device handoff, and restarts all wait while a turn, a background task, or a subagent is still running.
  • Shared, Watchable Browser: Each project gets its own Chromium instance and each session its own isolated context. The agent drives it through a Playwright MCP server while I watch and take over through a live video stream that sharpens when the page is still, with an inspector, console, and network panel built in.
  • Notebooks, Anywhere There's Compute: Python notebooks that Claude and I work in together. Each notebook has its own reproducible uv environment and runs its kernel in a bubblewrap sandbox, on my workstation's GPU, on an SSH host, or on a Google Colab T4 or A100, chosen per notebook. Shared datasets attach read-only or read-write, with frozen versions a notebook can pin. Claude edits cells freely but runs code only with my approval.
  • Encrypted Secrets: API keys and tokens are encrypted at rest. They reach notebooks and Claude sessions only when I opt them in behind a passkey, and they're never exposed where other processes could read them.
  • Live Plan Usage: Real-time meters for the five-hour and weekly plan windows, per-session cost and context-window fill, usage history charts, and threshold alerts, all read from data the CLI already emits.
  • A Full Workspace: File browsing and editing, diffs, source control, worktrees, pull requests kept in sync through the GitHub CLI, checkpoints, and line-level diff comments sent back to Claude as a single review. New sessions start in their own worktree by default, and every session shows the work that isn't on GitHub yet.
  • Integrated Terminal: Real shell tabs for whichever machine I'm working on, my workstation or an SSH host, apart from any agent session. On desktop they live in a bottom panel that's always one keystroke away. On the phone they open full screen with an extra-keys row above the keyboard. A terminal opened from a session starts in that session's folder or worktree, and the shells outlive dropped connections. Opening one takes a passkey.
  • Parallel Attempts: Try one prompt two or three ways in separate git worktrees, compare the results side by side, and keep the best one.
  • Hands-Free Voice: Hold-to-dictate and hands-free conversation, transcribed with whisper.cpp and read back aloud by a local text-to-speech model, both on my own GPU, so no audio ever leaves the network.
  • Skills & Plugins: Claude Code skills and marketplace plugins managed from Settings, so I can change what every session loads from my phone.
  • Scheduled Sessions & Artifacts: Prompts that run on a schedule, plus artifacts that Claude and I edit together: documents, spreadsheets with formulas and live charts, and interactive HTML pages (dashboards and small tools) that run sandboxed away from the app's origin.

Technical Architecture

  • Daemon: Node.js 24, Fastify, and ws in a single process, with SQLite (WAL) for a global database plus one database per execution context. Claude runs as a child process over stdio, and tmux with node-pty backs the terminal sessions.
  • Client: React and Vite, shipped as an installable PWA with xterm.js for terminals and CodeMirror for editing.
  • Protocol Layer: A shared Zod schema package for the CLI's wire format and the app's own REST and WebSocket contract. The schemas are deliberately permissive, so an unknown message type from a newer CLI shows up as a raw event and never crashes the parser.
  • Contexts: Local and SSH execution contexts behind one host abstraction, with every command and file access validated and confined to the project it belongs to.
  • Notebook Kernels: A kernel bridge runs each notebook's kernel sandboxed, on my workstation, an SSH host, or Colab, and keeps notebook files in sync with whichever machine is doing the compute.
  • Security: Passkey-only sign-in, per-device sessions, encrypted secrets, and no public exposure: the app is reachable only over a private network.

Testing & Reliability

Jean-Claude is tested like a product, not a side project. A purpose-built fake of the Claude CLI lets the daemon and client run end to end without spending tokens. Each release must pass more than 2,200 unit, integration, and fixture contract tests, plus more than 300 Playwright end-to-end tests in each of three device profiles (two iPhone Pro Max sizes and desktop) running side by side. A doctor canary checks the live CLI after each upgrade for less than a cent.

Impact

  • Work Follows Me: Agent sessions no longer stall waiting for me at my desk. Approvals, questions, and finished work reach me wherever I am, and any session continues on any device.
  • Faster Iteration: Parallel attempts, scheduled sessions, and phone-first review mean more agent work happens in the gaps of my day instead of in blocks of desk time.
  • Upgrade-Proof by Design: Because Jean-Claude drives the real CLI and doesn't imitate it, new Claude Code features show up for free, and protocol changes are caught by fixture tests before they ship.
  • A Proving Ground: I develop Jean-Claude through Jean-Claude, so it's a daily, real-world test of how far a spec-first, test-gated approach to agentic engineering can go.
// work with me

Want a build like this for your own business? I take on a limited number of engagements spanning technology consulting, AI engineering services, and website development & hosting.

// more from the record

Related Projects

ClickIQ: An AI-Powered Marketing Intelligence & Automation Platform
project · related

ClickIQ: An AI-Powered Marketing Intelligence & Automation Platform

As the lead architect and engineer, I spearheaded the development of ClickIQ, an AI-driven advertising intelligence platform that transformed Click Here Digital's operations by automating campaign management, unifying data analytics, and providing a single source of truth for measuring ROI across a vast digital landscape.

Amazon Web ServicesGoKubernetes
view project →
Facebook Ad Preview Validator
project · related

Facebook Ad Preview Validator

A recurring issue with the Facebook API was causing broken ad previews in client-facing reports, creating confusion and disabling a feature our clients had come to rely on. To address this, I developed the Facebook Ad Preview Validator, creating a classification engine, powered by Machine Learning, to validate ad creatives and protect the client experience.

Computer VisionDeep LearningDocker
view project →

tell me what you're building.

Free 30-minute consult. If I'm not the right fit, I'll say so and point you to who is.

Book a consultation