Claude Code and Codex Web UI
Project description
TwiCC
The Web Interface for Claude and Codex
A single self-hosted web interface for both Claude Code (Anthropic) and Codex (OpenAI). Browse projects and sessions, run agents, follow them in real time, track costs and quotas, and stay in control of your AI coding work — from desktop or mobile, in your browser.
Disclaimer
This is a personal project made by Twidi for his own needs. It is freely available and you are welcome to use it however you see fit.
That said, no support is guaranteed. Suggestions, issues, and pull requests are welcome, but there is no commitment to address them.
Note: the project was almost entirely vibe-coded, with general oversight from the author.
Quick start
uvx twicc@latest
Then open http://localhost:3500.
Don't have
uvx? It comes with uv, a fast Python package manager:curl -LsSf https://astral.sh/uv/install.sh | shA plain
pip install twiccin your own virtualenv also works.
Permanent install
If you use TwiCC regularly, install it as a persistent tool:
uv tool install twicc
twicc
Update with:
uv tool upgrade twicc
Features
Claude Code and Codex, side by side
- Both providers in one UI, using your existing credentials — nothing extra to set up
- Live conversation with full tool-use details, real-time streaming of assistant text and thinking
- Per-session agent control: model (Opus 4.7, Sonnet 4.6, …), context window (200K / 1M), effort, thinking, permissions, with reusable presets
- Interactive tool approvals and provider questions, answered directly from the browser
- Persistent Claude Code cron jobs: scheduled tasks survive TwiCC restarts and are auto-renewed before their 7-day expiry — they would otherwise be lost on a Claude Code CLI restart
- Provider status monitoring (Anthropic and OpenAI status pages) with in-app outage notifications
Mobile-first, work from anywhere
- Fully responsive UI, designed for touch from the start
- Mobile-friendly terminal: touch selection, paste, proper scrollbar, scroll/select toggle, support for tmux and alternate-screen apps
- Extra keys bar (Essentials / More / F-keys) with modifiers (tap for one-shot, double-tap to lock), arrow keys, special characters, function keys
- User-defined key combos and reusable text snippets for the terminal
- Combined with a tunnel (Cloudflare Tunnel, ngrok, Tailscale Funnel, …), TwiCC turns a phone into a usable Claude or Codex frontend — see Remote access below
Productivity tools
- Command palette (Ctrl+K / Cmd+K): jump to any project, session, or workspace, change session settings, and trigger common actions from a single keyboard-driven menu
- Slash commands and file references:
/for Claude Code skills and commands,$for Codex skills,@for the file picker — all from the message input - Message snippets: reusable text snippets with placeholders, scoped globally or per-project, for the prompts you keep retyping
- Inline code comments: click a line number in a code block to annotate, then send a formatted review comment back to the agent — human review of AI-generated code, right from the browser
- Selection comments: select text in Chat, Files, Git, or Terminal to copy it or attach a comment, then send the selection and your note back to the agent, preformatted and ready to go
- Full-text search across all sessions (Ctrl+Shift+F) and in-session search (Ctrl+F)
- Multiple simultaneous terminals, with optional custom
tmux.conf - Git integration: log, diffs (including side-by-side image diff), file browser, commit details
- Project and session archiving (including bulk archive of old sessions)
Costs, usage and activity
- Per-session and per-project cost tracking
- Quota graphs and burn rate for the Claude Code and Codex 5h / 7-day windows
- Daily and weekly activity heatmaps and stats, per project, per workspace, and across all projects
Workspaces and projects
- Group projects into named, color-coded workspaces, with optional auto-add by directory pattern
- Scoped session list, search, snippets, and aggregated stats per workspace
- Workspace-level Files, Git, and Terminal tabs in addition to per-project ones
Self-aware: the TwiCC plugin
TwiCC ships with a Claude Code / Codex plugin (auto-installed) whose skills let agents query TwiCC itself:
- list and inspect projects and workspaces
- browse sessions, read their messages, list their subagents
- run a full-text search across all session history
- check current usage and cost estimates
- spawn new sessions in any project from within a running session
Use it when you want an agent to look up its own past work, audit costs, or kick off a sub-task in another project — without leaving the chat.
CLI for scripts
Every list / inspect command outputs JSON, so you can compose TwiCC into scripts:
| Command | Purpose |
|---|---|
twicc projects / twicc project <id> |
List or inspect projects |
twicc sessions / twicc session <id> |
Browse sessions, read messages, list subagents |
twicc workspaces / twicc workspace <id> |
List or inspect workspaces |
twicc search "<query>" |
Full-text search across all sessions |
twicc usage |
Latest quota snapshot |
twicc create-session ... |
Spawn a fresh Claude or Codex session with a prompt |
twicc claude / twicc codex |
Run the bundled Claude or Codex CLI binary directly |
Run twicc --help (or twicc <command> --help) for full details.
How it works
TwiCC reads the JSONL data files written by each provider and indexes them into a local SQLite database (~/.twicc/db/data.sqlite). Claude Code sessions are read from ~/.claude/projects/; Codex sessions are read from ~/.codex/sessions/. Provider data files remain the source of truth — TwiCC never modifies them. Whether you use Claude Code or Codex directly from the terminal or through TwiCC, everything shows up in the same place.
When you start a session or send messages through TwiCC, it uses the provider SDK under the hood: the Claude Agent SDK for Claude Code and OpenAI's vendored Codex SDK/CLI for Codex. This means it uses your existing provider credentials and configuration — there is nothing extra to set up. The conversation data written by the provider is then picked up by TwiCC's file watcher and broadcast to the UI in real time over WebSocket.
On each startup, TwiCC detects changes and updates its database accordingly. While running, it watches the filesystem for new sessions and updates them in real time.
Remote access
The interface is fully usable from a mobile browser. Combined with a tunnel service like Cloudflare Tunnel, ngrok, or Tailscale Funnel, you can access TwiCC from anywhere and interact with Claude Code or Codex from your phone.
Important: if you expose TwiCC over the internet, enable password protection (see Configuration) and prefer a tunnel service with its own access control. TwiCC has no built-in access control beyond optional password protection.
Tip: on Android, the author uses Unexpected Keyboard for an even better terminal experience — it natively exposes Ctrl, Esc, Tab, and other keys that complement TwiCC's built-in keys bar.
Requirements
- Claude Code and/or Codex already configured locally
- For existing history: a
~/.claude/projects/directory created by Claude Code and/or a~/.codex/sessions/directory created by Codex
TwiCC needs Python 3.13+. If you install through uvx or uv tool install (recommended, see Quick start), uv will download and manage the right Python version for you — nothing to install by hand. If you go the pip install route, install Python 3.13 yourself first.
Configuration
All configuration goes through environment variables, set in ~/.twicc/.env:
| Variable | Default | Description |
|---|---|---|
TWICC_PORT |
3500 |
Server port |
TWICC_PASSWORD_HASH |
(empty) | Password hash to enable password protection (managed by twicc password set) |
TWICC_DATA_DIR |
~/.twicc/ |
Data directory (database, logs, settings) |
Password protection
Set, clear, or check the password interactively. Use the same invocation prefix as for launching TwiCC — twicc if you installed it permanently, uvx twicc for a one-off run, or uv run twicc from a source checkout:
twicc password set # prompt for a password (with confirmation) and write it to .env
twicc password clear # disable password protection
twicc password status # show whether password protection is enabled
Restart TwiCC after setting or clearing the password for the change to take effect.
Platform support
TwiCC runs on Linux and macOS. There is no native Windows support — the codebase relies on Unix-specific APIs (PTY, process signals, process groups) that would require significant work to adapt, and the author does not have access to a Windows machine for development and testing.
WSL (Windows Subsystem for Linux) is the recommended path for Windows users. TwiCC has been reported to work correctly under WSL2. If you hit issues, please open an issue or a pull request.
FAQ
Can I use TwiCC while Claude Code or Codex is running?
Yes. TwiCC only reads provider data files and never modifies them.
Where is my data stored?
By default in ~/.twicc/. This includes the SQLite database, logs, and user settings. Set TWICC_DATA_DIR to change the location.
Where are the logs?
In ~/.twicc/logs/backend.log for the backend (the file to check first when troubleshooting), and ~/.twicc/logs/sdk/ for raw per-provider SDK message logs.
How do I reset the database?
Delete ~/.twicc/db/data.sqlite* and restart TwiCC. It will rebuild from the provider source files.
Is this allowed by Anthropic?
For Claude Code sessions, TwiCC uses the official Claude Agent SDK with the Claude Code system prompt. This is permitted by Anthropic's terms of service.
Billing change on June 15, 2026: until that date, SDK usage is billed against the same plan quota as the regular Claude Code CLI. Starting June 15, 2026, Anthropic moves SDK usage to a separate, plan-specific credits quota dedicated to the SDK. In practice, TwiCC sessions will no longer share the Claude Code plan quota and may be more constrained depending on your plan tier — see Anthropic's documentation for details.
Is this allowed by OpenAI?
For Codex sessions, TwiCC uses OpenAI's Codex SDK and CLI binary (vendored — see docs/codex-vendoring.md). OpenAI does not document any limitation on this kind of usage, and TwiCC sessions draw from the same plan quota as the regular Codex CLI.
How can I support this project?
If you find TwiCC useful, consider sponsoring me on GitHub — it means a lot and helps keep the project going.
Development
See CONTRIBUTING.md for development setup, devctl.py usage, building, and the release process. Conventions, architecture notes, and patterns live in AGENTS.md and CLAUDE.md. The Codex SDK vendoring is documented in docs/codex-vendoring.md.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file twicc-1.6.1-py3-none-win_amd64.whl.
File metadata
- Download URL: twicc-1.6.1-py3-none-win_amd64.whl
- Upload date:
- Size: 91.8 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f885ae023a9a45cd4974ddb1fcf5f7e21151c29fb2ab7f3c61bdb395755586f5
|
|
| MD5 |
16471363f51de9cc559fdb931bc6c955
|
|
| BLAKE2b-256 |
ab3ebb5ee32e2b14566afff437f6508d4eb2a7c07e37ee8930c4aaec6616a1e4
|
File details
Details for the file twicc-1.6.1-py3-none-manylinux_2_17_x86_64.whl.
File metadata
- Download URL: twicc-1.6.1-py3-none-manylinux_2_17_x86_64.whl
- Upload date:
- Size: 91.4 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e15da68bee63d17deadbdcd7d1db7d2e4bcce8a6126164ee17cc7593cf1f086
|
|
| MD5 |
5f500d9504706a66c062833d3bfa67d6
|
|
| BLAKE2b-256 |
4c2829cac7d12eed48fbc9aa80052c68ab0161b61f9024cdf4c3d66b4e8be169
|
File details
Details for the file twicc-1.6.1-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: twicc-1.6.1-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 86.4 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f1639babbe556063a20b59fa2ddd31c2cdaa8afa3e57d6bf6f7c7baa97057aa
|
|
| MD5 |
2e448c6ba0922668a78feb78c87650a7
|
|
| BLAKE2b-256 |
c5039b722e87040f62d57e810f026cb1f819d0054f0803b1344c22000bd12a6c
|
File details
Details for the file twicc-1.6.1-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: twicc-1.6.1-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 95.5 MB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6005ce7f24851694423c9a0f3ff01375412a2f4225fad68e74f260e7cfe7d56
|
|
| MD5 |
0a00794cc431e5b799c55b3cf5af2745
|
|
| BLAKE2b-256 |
aad367a4b89b9b85e960cd3176edf506d3feeb88618eb805e48d69a7aad9d85d
|