DEV Community

MeeXoid0
MeeXoid0

Posted on

I Built CliDock: A Zero-Dependency Local API Dock & TUI for Claude Code, Codex & Antigravity

CliDock Interactive TUI Demo

If you pay for Claude Code (claude), OpenAI Codex (codex), or Google Antigravity (agy) CLI subscriptions, connecting your favorite local AI clients and editors (Cherry Studio, Cline, Roo Code, Continue, Open WebUI, Zed, or the official OpenAI/Anthropic SDKs) usually means juggling fragile reverse proxies, polluting your global ~/.claude / ~/.codex / ~/.gemini configs, or flying blind on subscription rate limits.

So I built CliDock (v0.1.0 early preview for macOS & Linux) — an open-source (MIT), 100% zero-dependency local subscription CLI dock, interactive terminal UI, and 127.0.0.1 loopback gateway.

GitHub Repository: https://github.com/MeeXoid0/clidock


One-Line Install (macOS & Linux)

curl -fsSL https://raw.githubusercontent.com/MeeXoid0/clidock/main/install.sh | bash
Enter fullscreen mode Exit fullscreen mode

The installer works completely from scratch on a clean Mac or Linux machine (bootstrapping an isolated Node.js 22 LTS runtime if needed with zero sudo), asks which upstream CLIs you want to dock, cryptographically verifies their SHA-512/SHA-256 checksums, and runs the offline unit & isolation verification suite automatically. You can also git clone https://github.com/MeeXoid0/clidock.git && cd clidock && ./install.sh.


4 Key Engineering Decisions

1. Zero npm Dependencies (node:* Standard Library Only)

A daemon that supervises authenticated developer CLIs shouldn't pull 400 transitive packages onto your machine. CliDock runs directly on Node.js >=22.18.0 native erasable TypeScript with zero runtime or dev dependencies in package.json.

2. Strict 0700 Host & Keychain Isolation

Each upstream CLI runs unmodified inside an isolated state home (~/.clidock/state/{claude,codex,agy}-home):

  • Base-URL overrides are scrubbed so traffic goes strictly over official first-party CLI protocols (stream-json, codex app-server, agy acp).
  • Built-in host-mutating tools (Bash, Edit, shell_tool) are disabled.
  • Strict 127.0.0.1 loopback binding + Host/Origin validation blocks DNS-rebinding attacks.
  • Your global ~/.claude, ~/.codex, ~/.gemini, and OS Keychain logins remain completely untouched.

3. Tri-Protocol Support on Every Port + In-Process MCP Tool Bridge

Running clidock all exposes:

  • :4140 Unified Gateway (claude/*, codex/*, agy/*)
  • :4141 Claude Code Dock · :4142 OpenAI Codex Dock · :4143 Google Antigravity Dock

Every port simultaneously speaks Anthropic /v1/messages, OpenAI /v1/chat/completions, and OpenAI /v1/responses — supporting vision, PDFs, audio, thinking/effort levels, structured JSON schemas, and custom caller tools[] bridged via an in-process HTTP MCP / DynamicTool broker.

4. Interactive Terminal UI with Zero-Token Live Quota Bars

Inside the interactive clidock › terminal (or via clidock usage / clidock monitor), typing /usage queries each provider's control plane without spending LLM tokens — rendering real-time 5h, 7d, and model-bucket progress bars, extra credits, and exact reset countdowns alongside an interactive /logs request/response inspector.


Feedback, bug reports, and contributions are super welcome as we iterate toward v1.0 (with native Windows support up next):
👉 https://github.com/MeeXoid0/clidock

Top comments (0)