Skip to content

About

Self-hosted web and Android control surface for Codex and Claude Code sessions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Coding WebUI

A self-hosted web and Android control surface that lists and drives running Codex + Claude Code coding-agent sessions from one place. See your sessions in a sidebar grouped by agent, open any of them into a streaming chat, and change model / permission mode / effort on the fly — with the current values always visible. Premium dark UI, responsive on phone and desktop. Runs as a local server or a Docker container; the installable Android app reuses the same UI, API, and login.

Single-user, host-local. It reuses the claude and codex CLIs already installed and authenticated on your machine — it never builds a shared-login gateway (an Anthropic TOS tripwire). Built from verified control surfaces + fleet design analysis; see DESIGN.md.

What it does

  • Sidebar keeps pinned sessions visible once, groups Codex sessions into collapsible local projects by working directory, adds a new-chat action to each project, and keeps Claude Code in its own persisted collapsible group. Search temporarily expands matching groups. (Live detection: claude agents --json for Claude; mtime-growth for Codex.)
  • Chat loads full transcript history (messages, tool calls, reasoning) and lets you send new messages that drive the underlying agent live, streaming tokens back.
  • Codex dictation shows a microphone for Codex sessions and fresh-chat drafts. Browser audio is sent through Codex app-server realtime using the machine's existing ChatGPT login; the editable transcript stays in the composer until you press Send.
  • Settings panel + always-visible header chips: change model, permission mode (Claude default auto; also plan, acceptEdits, bypassPermissions, manual, dontAsk), and effort/thinking (low → max). Changes apply to the next turn.
  • New chat opens a blank Codex workspace with the normal composer. Choose a project, type or dictate the first message, and the persistent Codex task is created only when you send it.
  • Responsive: persistent rail on desktop (≥1024px), a slide-in drawer below that, phone bottom nav, rotation-aware compact landscape layout, touch-sized controls, and reduced motion for slow/e-ink displays.
  • Android app: login once to the same HTTPS URL with the same username/password. Credentials are encrypted with Android Keystore; native Android supplies speech recognition, file picking, back navigation, lifecycle handling, and strict TLS around the existing responsive UI.

Quick start

Local (dev)

cd coding_webui
npm run install:all      # installs server + web deps
npm run build            # builds web (dist) + server (dist)
npm start                # serves the built UI + API on http://127.0.0.1:4173

Or run the frontend in Vite dev mode (HMR) while the server runs:

npm run dev:server       # terminal 1: Fastify on :4173
npm run dev:web          # terminal 2: Vite on :5173 (proxies /api + /ws to :4173)

For an isolated, password-free local test surface while the normal server/container is running:

npm run dev:test         # http://127.0.0.1:4174; loopback-only, proxies to :4173

This starts only a development frontend, so it reuses the live backend without starting a second Codex app-server or exposing the test port to the network.

Docker

cp .env.example .env
# Edit .env and replace WEBUI_PASSWORD before exposing the public hostname.
docker compose up --build
# → http://localhost:4173

The compose file mounts ~/.claude, ~/.codex, and WORKSPACE_DIR into the container so it can discover sessions and drive the CLIs using the host's auth. Codex is installed in the image; the Claude binary and state mounts are optional and may be removed on a Codex-only host. Compose uses Linux host networking while the server itself binds only to 127.0.0.1; this preserves the real loopback security boundary and is intended for Linux desktops and VPS hosts.

The public hostname uses the browser's native username/password prompt, then issues an HttpOnly, Secure, same-site session cookie so REST and WebSocket traffic share that login reliably. Credentials are read from the ignored .env; localhost stays password-free only for a real loopback connection. All non-loopback traffic is restricted to PUBLIC_HOST and HTTPS. Run npm run password:set to change the password through a masked KDE dialog (or a hidden terminal prompt); it updates .env and restarts only the WebUI container.

For a complete VPS + TLS + Android walkthrough, see self-hosting and Android.

Android APK

cd mobile
./gradlew lintDebug assembleDebug
# install mobile/app/build/outputs/apk/debug/app-debug.apk on a phone

The debug APK is signed by Android's generated debug key and is ready for direct testing/installing. Public distribution should use a maintainer-owned release signing key that is never committed.

Verification

npm run test:all
cd mobile && ./gradlew lintDebug assembleDebug

GitHub Actions runs the portable server, web, and Android checks and publishes its debug APK as a workflow artifact. The production browser acceptance flow is web/e2e/browser-smoke.mjs; run it with Codex Browser against a live instance. It never sends an agent message.

Endpoints & protocol

  • REST: GET /api/sessions, GET /api/sessions/:uid/messages, GET/PATCH .../settings, POST /api/sessions (new), POST .../interrupt, GET /api/models, GET /api/defaults.
  • WebSocket /ws: subscribe/unsubscribe/message/interrupt/resolveApproval; server pushes sessions, message, stream, permission, error.
  • Deep-link a session with /#/s/<uid>.

Remote BOOX access

The tested BOOX setup uses Firefox, explicit HTTPS, and the native password prompt. See BOOX remote access and dictation for the verified setup, diagnostic stages, failure interpretation, and password rotation.

How it talks to the agents (verified)

  • Claude: claude -p --resume <id> --output-format stream-json --verbose --model --effort --permission-mode.
  • Codex: stored and newly created threads use codex app-server over stdio with thread/start, thread/resume, and turn/start. Dictation uses the experimental thread/realtime/* WebRTC surface and requires localhost or HTTPS browser access.
  • Transcripts: ~/.claude/projects/<cwd>/<sid>.jsonl and ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl, normalized to one message model.

Project layout

coding_webui/
  server/   Fastify + WS backend (drivers, store, routes, transport)
  web/      React + Vite + TS frontend (sidebar, chat, settings, responsive shell)
  mobile/   Native Android shell (WebView, Keystore, speech, file picker)
  Dockerfile, docker-compose.yml
  DESIGN.md # locked architecture + fleet provenance

Status

Functional with source, protocol, auth, parser/resource, Android contract, APK build, and Android lint checks. Session discovery, live Claude + Codex drives, settings persistence, and responsive UI are retained from the existing implementation.

License

The original Coding WebUI source is available under the MIT License. Codex, ChatGPT, Claude, and their services remain products of their respective owners and subject to their own terms. This project does not redistribute an upstream application, login database, or credential.

About

Self-hosted web and Android control surface for Codex and Claude Code sessions

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages