حول
Native Rust + GPUI desktop workbench for running Claude Code, Codex, Antigravity & DSH side by side: multi-provider & account routing, built-in agent dispatch, KV-cache context optimizer, fork DAG, kanban & Git worktrees (macOS & Windows). 码头:多 Agent 原生桌面工作台
أدوات التطويرالنمو المقاس للنجوم
- خلال 24 ساعة
- +٨
- خلال 7 أيام
- جارٍ جمع السجل
- خلال 15 يومًا
- جارٍ جمع السجل
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصل
Matou (码头)
A native multi-agent desktop workbench for AI coding
Built in Rust + GPUI + libghostty-vt for macOS and Windows. Run Claude Code, Codex, Antigravity and DSH side by side —
with a unified HUD across every agent, multi-provider & account hot-swap, built-in agent dispatch, zero-MCP cache optimization, custom skins & sounds, fork DAG, kanban and Git worktrees.
Custom Skins · Providers & Accounts · Agent Dispatch · Context & Cache · Workbench & DAG · Download · Build · Community · 简体中文
Matou is a native desktop workbench for AI coding on macOS and Windows with zero Node.js runtime dependency. It brings Claude Code, Codex, Antigravity, DSH, and regular shell sessions into a single recoverable workspace hierarchy — Workspace → Task → Canvas → Session Card — so you can run many agents in parallel, switch accounts and providers in place, dispatch subtasks to the right specialist agent, and always see what every session is doing, how much context it has used, and where it branched from.
Status: Native release in active development. Published downloads are on Releases.
What's new in v0.3.3: Custom Skins & Voice Alerts (pre-seeds a ready-to-try Van Gogh Starry Night custom skin on first launch, full-surface + terminal theming, local agent
.matouskincreation prompt, redacted showcase poster export, and custom notification audio), per-card width dragging & fixed ordering, focused-card KV-cache capsule & manual warming, unified provider pool & persistent/modelswitches, always-on OS notifications, Windows Acrylic sidebar & recovery water animation, and self-healing for hung Antigravity /model-routersessions.Video walkthrough: YouTube (Chinese, 5 min) · Bilibili (Chinese, 5 min)
Community: Join QQ Group 454249629 (QR code) · GitHub Issues
Scan QQ Group QR code (454249629) / 扫码加入 QQ 体验反馈群


A full native workflow in one pass: Claude Code, Codex, and Antigravity cards run side by side with distinct agent icons; a background task raises an unread badge and opens through the tiered notification center; the DAG view maps parent/child branches; and the workspace board tracks task status via drag-and-drop. All screenshots and GIFs were captured in an isolated demo environment.
Pure Native Stack (Rust + GPUI + libghostty-vt)
Matou has fully moved off Electron to a single native stack:
- GPU-accelerated UI & terminal: Rust + GPUI for crisp native rendering paired with
libghostty-vtfor fast terminal emulation under heavy multi-card output. - Zero Node.js runtime: The session host, platform PTYs,
mtcontrol plane, agent hooks, and built-inmt-foremandispatch engine all ship insidematou-native-runtime. - macOS & Windows native: Supports Apple Silicon / Intel macOS and x64 / ARM64 Windows, including native titlebars, Windows Acrylic sidebar & recovery water animation, ferrofluid startup loader, CJK IME composition, OS notifications, and external file drag-and-drop.
Custom Skins & Voice Alerts
Beyond official Light / Dark / System themes, Matou ships a full-surface native skin engine paired with custom notification sounds — so you can bring your favorite art, game, or anime aesthetics into your daily coding workbench and co-create new packs with your local coding agents.


Both showcase posters above were rendered directly by Matou's built-in offline poster generator — automatically redacted, complete with zone palette swatches and the bound 16-color ANSI terminal strip. Starting in v0.3.3, Matou automatically pre-imports the Van Gogh Starry Night pack into your custom skin library on first launch so you can try full-surface theming in one click (and rename, export, or delete it anytime like any user-imported pack).

- Pair custom skins with custom voice alerts: Match a custom theme with a local audio file in Settings → Notifications — e.g. let your favorite character voice call you back whenever a background agent finishes a test run or waits for approval.
- Shell + terminal themed as one: Supports cross-tone zone palettes (e.g. dark sidebar paired with light paper terminal), multi-stop linear gradients, alpha-faded character/scene art, multi-color SVG badges, and parametric 45° chamfered notification drawer frames — covering every popover, settings page, DAG view, and bound 16-color terminal palette, with instant fallback to official themes from the topbar.
- Let your local AI build
.matouskinpacks: Copy the ready-to-use creation prompt from Settings → Appearance & Skins or the topbar quick skin switcher and hand your idea or reference artwork to Claude Code, Codex, or Antigravity. Guided by the bundledSKIN_SPEC.md, the agent writes a.matouskinpack into your chosen folder (default Desktop) for import inspection. - Single
.matouskinformat, safe hot-reload & poster export: Validates contrast and asset safety on import, supports inline renaming, export/share,mt skin checkCLI verification, and instant hot-reload (broken packs keep the last good frame and copy diagnostics for quick agent fixes). Built-in pure-Rust offline renderer exports clean 16:9 and 3:4 PNG showcase posters ready to share without leaking real project names or paths.
Multi-Provider Routing, Account Switching & Live Model Hot-Swap
Real daily coding rarely stays on one subscription or one model. Matou manages both account quotas and model supply in one place so you do not have to juggle shell environment variables or restart active terminals.
1. Multi-provider supply, per-role model assignment & live hot-swap

Open Settings → Providers to wire up all your model sources:
- Unified provider pool & per-role assignment: Bring Official Anthropic OAuth, routed subscription accounts, DeepSeek, Zhipu GLM, Kimi, MiniMax, and custom compatible endpoints into one provider pool, assigning target models and reasoning effort independently for
Opus,Sonnet,Haiku, andFablewith live model discovery and folded Antigravity effort series. - Live hot-swap &
/modelpersistence: Update a role's mapping and save — the very next message uses the new model without restarting running sessions. Mid-session/modelswitches are also persisted across cold resume, allocation edits, permission restarts, and forks. - Safe global switching: Switching providers reports exact per-session status; rejected keys or timeouts keep your form intact for immediate retry, and editing a provider without changing its endpoint preserves the stored key.
API keys stay strictly on your machine and are sent only to the configured endpoint. Built-in presets are derived from cc-switch (MIT).
2. Switch Claude subscription accounts from the footer

Keep work and personal subscriptions — or multiple quota pools — side by side in the bottom-right Claude Accounts button:
- Clean isolated sign-in: Adding an account uses official
claude auth loginin an isolated browser window so existing browser logins never collide. - Live quota visibility: Each account shows 5-hour and weekly usage with refresh timestamps, keeping the last valid reading during transient network blips. The footer always displays the active account name.
- Smooth switching & optional immediate restart: Switch the default account in one click. Running sessions pick it up safely, or click Restart now to restart active Claude sessions and resume each conversation in place without touching plain shells.
Account storage, switching, and usage lookups are powered by claude-swap (MIT) and stay compatible with the cswap CLI.
Built-in Zero-Config Multi-Agent Dispatch

Different coding agents shine at different jobs — let Claude Code plan and verify while delegating heavy coding or refactors to Codex, UI work to DSH, or targeted tasks to Antigravity.
Matou builds native dispatch (mt-foreman) directly into the runtime with zero external Node scripts required:
- Unified Settings → Dispatch panel: Configure Codex, DSH, and Antigravity on a single screen — activation mode (default worker / auto by specialty / on-demand), default model, reasoning effort, specialty notes, and cross-agent delegation rules.
- Cross-agent sub-delegation with no artificial concurrency cap: Optionally allow an executing agent to delegate sub-tasks matching another enabled specialist's niche, and run as many parallel delegated workers as your workflow needs.
- Full live visibility: Every running delegated task appears as a live card in the footer Agents popover showing the agent, task name, model, and effort level — with interactive Q&A, resume-from-checkpoint, and completion notifications.
Want the same supervisor workflow outside Matou in any plain terminal? See the standalone agent-foreman skill.
Zero-MCP Context & KV-Cache Optimizer

Long coding sessions lose speed and budget when huge command outputs flood the context window or KV-cache expires. Matou includes a zero-MCP native context & cache optimizer (no MCP servers to install; supported for Claude Code and Antigravity):
- Oversized log compression & dedup guards: Compresses bulky test/build output while keeping raw logs locally searchable, warns on repeated reads of unchanged files, and blocks direct
.envsecret reads (while allowing.env.example). - Focused-card KV-cache capsule & manual warming: A priority-fitted compact footer HUD hosts the active card's cache capsule; open its popover to inspect Prompt Cache reuse, tokens saved, and remaining TTL, trigger manual cache warming, and track estimated TTL on restored gateway sessions — without noisy card-top banners.
- One-click handoff summary & fresh session: When context crosses the threshold, jump straight from the footer into a new session with a complete, untruncated handoff summary or copy it in one click.
- Live session details popover: Inspect tool calls, hooks, MCP servers, and todos directly from the footer without scrolling back through terminal history.
Multi-Session Workbench & Cross-Card Collaboration
1. Four-level workspace with mixed agents side by side
Organize work by Workspace → Task → Canvas → Session Card, mixing Claude Code, Codex, Antigravity, DSH, and plain shells on the same canvas:


- Instant agent recognition & per-card width dragging: Every card header displays its official agent brand logo; the focused card expands automatically, and you can drag individual card edges to custom widths (with a live pixel readout and stable fixed ordering) while sibling cards stay visible on either side.
- Flexible splits & detached windows: Use tabs plus horizontal/vertical splits, or detach any card into its own window and re-dock it anytime — both windows share the same live runtime session.
2. Natural-language cross-card control (mt)
Skip manual tab-hopping and copy-pasting. Ask your active agent directly:
"Check the card on the right — did the regression suite pass?"
"Read the parent session's latest output and compare Option A vs Option B."
"Fork three child cards from here to test performance, compatibility, and rollback separately."
Every managed session receives the built-in mt control plane to inspect sibling/parent/child cards, read live screen or history, send inputs, and manage workspaces, tasks, canvases, and forks.
Built-in mt control commands
Supports mt identify, mt list, mt read, mt history, mt commands, mt send, mt key, mt create, mt fork, mt remove, mt close, mt focus, mt switch, and mt-foreman. Targets accept self, left, right, parent, child:N, sibling:N, or an explicit session ID.
3. Fork DAG & Git Worktree isolation
Press Option + Tab to open the DAG view and see how every session relates:

- Two clear edge types: Solid lines mark Forks (inheriting conversation context); dashed lines mark relations (linked in the same workflow without inheriting chat history).
- Parallel Git Worktrees: Fork alternative implementations into isolated Git worktrees, compare them safely, and merge or discard when done.
- Search, zoom & jump: Filter by title, path, branch, or recent output, then click any node to jump straight back to that card.
4. Unified HUD across every agent, four-tier notifications & OS-level alerts

One consistent HUD for every agent: Whether the focused card is Claude Code, Codex, Antigravity, or DSH, the footer uses the same unified layout and shows each agent's live metrics — active model (including mapped target model) and reasoning effort, one-click permission mode switching, context usage & alerts, 5h / weekly quotas (for Claude Code, Codex, and Antigravity), MCP / hooks / tools / todos / agents details, directory & Git branch actions, and quick
CLAUDE.md/ instructions editing. Switching agents never forces you to re-learn where status lives.Four-tier in-app notifications: When a background agent finishes, waits for confirmation, needs input, or hits an error, unread and status indicators bubble up across all four levels — Session Card → Canvas Tab → Task → Workspace — so you can trace attention from anywhere in the app while the card you are already watching stays quiet. The notification center lists summaries, source paths, and sound controls, jumping straight to the source card on click.

Always-on native OS notifications & custom sounds: Important agent events deliver native macOS Notification Center and Windows Toast alerts reliably whether Matou is focused or in the background (suppressing idle/auth noise). Under Settings → Notifications, import custom local audio files (MP3 / WAV / M4A, etc.), verify macOS alert style with a built-in Send test notification button, and click any OS alert to bring Matou forward to the exact session card.
Network egress status: Live footer indicator checks network egress posture without blocking terminal responsiveness.
5. Workspace kanban board

Track tasks across Ready, Running, Blocked, and Done with compact cards showing title and session count, updated via drag-and-drop.
6. Automatic session recovery, full-content search & one-click session loading

- Automatic session recovery: Persists workspaces, tasks, tabs, splits, working directories, Git worktrees, segmented terminal journals, and every agent's session binding. After a restart or unexpected exit, Matou automatically restores your full working state instead of making you rebuild terminals by hand.
- Session content search: Press
Cmd + F(Ctrl + Fon Windows) inside any card to search across live output and long terminal history with match navigation; search by title, path, branch, or conversation content in the DAG view and project session browser to find where any decision happened. - One-click session loading & seamless Markdown history: Skip copying session IDs or typing
--resumeflags — browse existing local Claude Code, Codex, Antigravity, and DSH conversations grouped by project (with virtualized fast history scrolling and synced renamed titles) and load any of them straight into a card in one click. Inside a card, scroll up seamlessly into full Markdown-rendered conversation history above the live terminal. - External file drag-and-drop: Drag files from Finder or Windows Explorer directly into a card to insert quoted paths and focus the terminal immediately.
Download
- Download the latest release for your platform from Releases (macOS Apple Silicon:
Matou-<version>-mac-arm64.dmg; Windows x64:Matou-<version>-win-x64.exe). - On macOS, open the DMG and drag 码头 into Applications (if macOS blocks the first launch, allow it under System Settings → Privacy & Security → Open Anyway). On Windows, run the installer (if SmartScreen warns on first launch, choose More info → Run anyway).
- Install and sign in to whichever agent CLIs you plan to use (Claude Code, Codex, Antigravity, DSH). In-app update notifications alert you when newer builds are available.
Build from source
Requires stable Rust & Cargo, Python 3.12+, Zig 0.17.0, Git, and curl. macOS requires Xcode Command Line Tools; Windows requires Visual Studio C++ build tools and the Windows SDK. Tooling and packaging scripts use Node.js 22.16+ and pnpm 10.17.1 (zero npm dependencies); Python account sidecar tests and builds use uv.
Prepare the pinned GPUI and libghostty-vt libraries, fetch locked crates, and build (Apple Silicon example):
python3 apps/native/scripts/prepare-gpui.py
python3 apps/native/terminal/scripts/build-libs.py --target aarch64-apple-darwin
cargo fetch --manifest-path apps/native/Cargo.toml --locked
pnpm build:native
Use --target x86_64-apple-darwin on Intel Macs, or python with x86_64-pc-windows-msvc / aarch64-pc-windows-msvc on Windows. See the native workspace guide for platform details.
Common commands
| Command | Purpose |
|---|---|
pnpm test |
Run identifier checks, tooling tests, Python sidecar tests, and Rust workspace tests on macOS |
pnpm test:native |
Run Rust workspace tests on macOS or Windows (build debug runtime first) |
pnpm accounts:build |
Build the local Claude accounts sidecar |
pnpm router:build |
Build the patched Go model router sidecar |
pnpm package:mac |
Package signed macOS DMG and ZIP releases |
pnpm package:win --model-router <dir> |
Build Windows x64 / ARM64 installer or portable ZIP |
pnpm install:mac --source <abs-path.app> |
Safely update /Applications/码头.app after quitting Matou |
See the release guide for signing and update feed configuration.
Project layout & privacy
apps/native/
├── desktop/ GPUI native desktop UI and terminal rendering
├── runtime/ Session host, platform PTYs, multi-agent hooks, context optimizer & mt / mt-foreman
├── core/ Domain model, SQLite metadata and segmented journal
├── terminal/ libghostty-vt Rust bindings and patches
└── packaging/ Icons, signing entitlements and Finder quick action
tooling/claude-accounts/ Python Claude accounts sidecar
tooling/model-router/ Go model router build & verification scripts
tooling/packaging/ Native macOS & Windows packagers
docs/ Product specs, architecture and release guides
- Local-first data: Workspace metadata lives in local SQLite, terminal output in segmented journals, and account credentials / provider API keys remain strictly on disk. Matou only makes explicit utility requests (update checks, account usage refreshes, manual model discovery, and egress checks); conversation traffic always flows from your agent CLIs directly to your chosen providers.
- Archive: The legacy Electron codebase is preserved at Git tag
archive/electron-0.2-final.
FAQ
Which platforms are supported? Source builds target macOS (Apple Silicon & Intel) and Windows (x64 & ARM64). Check Releases for currently published prebuilt installers.
How is Matou different from other AI terminal managers?
Instead of just wrapping tabs or worktrees in a sidebar, Matou combines multi-agent side-by-side sessions, multi-provider & multi-account live hot-swap, built-in zero-config dispatch, a zero-MCP context & KV-cache optimizer, three synchronized views (cards / DAG / kanban), and mt cross-card control in a single native app.
Does it support both English and Chinese? Yes. The UI follows your OS language automatically and supports manual switching in settings / menu. See #4.
Feedback
- Open an issue for bugs or feature ideas.
- For recovery, fork, notification, or multi-window reports, include reproduction steps, OS version, and shareable demo data.
- Join the user feedback QQ group 454249629, or scan the QR code below:

License
Released under the GNU General Public License v3.0. You are free to use, modify, and redistribute it; derivative works must be released under the same license.
If Matou saves you time juggling multiple AI coding agents, a ⭐ is appreciated.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…