返回资讯中心
外部精选
软件工程
#开发者实时流

Show HN: Unterm – A pure-Rust terminal for humans and AI agents

If Unterm is useful to you, a ⭐ on GitHub helps other people find it.

Hacker News 最新zhitong452026/10/21 · 25 天前30 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

If Unterm is useful to you, a ⭐ on GitHub helps other people find it.

Cross-platform terminal (macOS / Linux / Windows) built on Unterm's native next-core terminal engine, with one design bet: the terminal itself is controllable from the outside by any AI agent over MCP. Claude Code, Codex, Gemini CLI, Cursor, Aider, your own scripts — they all get the same JSON-RPC surface (152 authenticated methods plus auth.login) to spawn shells, run commands, read pane state, capture screenshots, record sessions, and run the Agent Cockpit. (Theme, language and unterm.conf are not on MCP; they are set through Web Settings, unterm-cli, or the file.)

Since v0.68 the terminal is also something an orchestrator can govern rather than merely call: it publishes what it can do and how dangerous each capability is, works under leases that expire and cannot be replayed, keeps agents inside workspaces that cannot see each other, and can hand you an evidence bundle for a task that somebody who was not there can verify.

Since v0.55 the relationship runs both ways: agents drive the terminal from outside, and the terminal is an Agent Cockpit for the agents running inside it — live per-pane agent state, a waiting-first Inbox, fleets of N agents on one task in N isolated git worktrees, and a Review page to diff / merge / roll back what they produced.

The other 2026 terminals each pick a different side: Warp embeds AI inside a closed cloud (Oz), Ghostty stays out of your way and lets you bring your own tools, iTerm2 is Mac-only. Unterm picks the third side — terminal as MCP-controllable surface, deliberately keep AI generation out of the terminal, let external agents grip it through the API, and give the human one cockpit to run them all from.

The GUI and terminal runtime now use Unterm's native next-core engine. The repository still carries selected upstream components and attribution where they remain dependencies, but WezTerm mux/window state is no longer the product kernel.

Run Claude Code, Codex, Gemini CLI, or Aider in any pane and Unterm sees them — no configuration, no wrapper. Five pillars, all local:

unterm-cli agent status # who's running where, in what state unterm-cli agent inbox # who's waiting for you unterm-cli agent enable-hooks # exact state via official hooks (merge-only, backed up) unterm-cli fleet launch --agents claude,codex "fix the flaky auth test" unterm-cli review verify --fleet <id> --member 1 # run the member's validation unterm-cli review list && unterm-cli review open # ranked diffs in the browser

Full docs: unterm.app/docs/agent-cockpit.

Pre-built artifacts are published on GitHub Releases:

https://github.com/zhitongblog/unterm/releases

Double-click Unterm-macos-<version>.dmg, then drag Unterm.app onto the Applications shortcut. The DMG is signed with a Developer ID and Apple- notarized, so Gatekeeper opens it on first launch without warnings.

Finder integration is bundled in the DMG. After the first launch, Finder's right-click menu can show Open in Unterm for folders and files; if macOS doesn't refresh the extension immediately, run Repair Finder Integration.app from the DMG once.

sudo apt install ./unterm-<version>.deb unterm

Other distros — use the AppImage:

chmod +x Unterm-<version>-x86_64.AppImage ./Unterm-<version>-x86_64.AppImage

Windows

Run the MSI installer; it places unterm.exe in Program Files\Unterm and creates a Start Menu shortcut.

v0.68 — A terminal something else can govern. Unterm now hosts CLI agents as sessions rather than shelling out and waiting for an exit code (agent_session.*: what it said, what it asked to run, how it ended, with your own task ids carried through untouched). It can lease a browser from Unzoo and be leased from in turn — terminal.manifest publishes what this terminal can do and how dangerous each family is, taken from the same table the gateway refuses by. Approvals can finally be answered: Settings shows what an agent is waiting on, with "allow once / for this task / always". Workspaces are roots that cannot see each other, and a shell that cds out stops being inside. The audit trail is hash-chained, so an edit to it disagrees with the next line. unterm-cli provider | scope | artifact | evidence | system — 46 new MCP methods (149 total at the time; 152 today).

v0.57 — Fleet verification loop + new brand mark. Review now verifies each fleet member automatically (Cargo / Go / npm / pnpm / yarn / Python / Maven / Gradle / .NET inferred, or your own command), ranks members by verification and change size, gates squash-merge on a passing run (audited force override), and retries failed members in their existing worktree without losing work — review.verify / fleet.retry over MCP + CLI. The sidebar gains repository-grouped navigation with always-on fuzzy search. Every logo surface moves to the new command-loop mark.

v0.55 — Agent Cockpit. The terminal now sees the agents inside it: live per-pane state with tab badges and a cross-window tally, the waiting-first Agent Inbox (Ctrl+Shift+A), fleets running one task across N agents in N isolated worktrees, and a Review page with checkpoints, diffs, rollback, and squash-merge. 12 new MCP methods, 3 new CLI families.

v0.54 — 2.8× faster cold start (~780ms → ~280ms) via five startup-path wins, and no more CPU core burned on Windows output floods (~91% → ~4%); MCP stays responsive mid-flood.

v0.53 — Composer + Git panel. A prompt queue (Ctrl+Shift+J) that runs batched prompts into an agent pane with smart auto-advance through confirmation prompts, and a read-only Git status panel (Ctrl+Shift+G).

v0.52 — More agents out of the box. Kimi Code CLI and Trae Agent join the baked manifest (7 agent CLIs total); reworked per-frame paint paths; steadier Windows clipboard and window sizing.

Documentation

The full Unterm docs live at https://unterm.app/docs/:

This README is the short version. The site is the long version.

GPU-accelerated rendering on all three platforms through wgpu: Metal on macOS, Direct3D 12 on Windows and Vulkan on Linux. If the hardware path fails, Unterm tries OpenGL, then the same two in software (WARP on Windows), and on Windows finally Vulkan — so a machine with no usable graphics driver still opens a window. UNTERM_GPU_BACKEND=dx12|vulkan|gl|metal pins one backend.

Pictures in the terminal — the kitty graphics protocol, iTerm2 inline images (OSC 1337 File=) and sixel, so chafa, img2sixel, viu, timg and unterm-cli imgcat show the image itself. Pictures scroll with their text, stay in the scrollback, are clipped at pane edges and keep to the screen (main or alternate) they were drawn on. screen.images / unterm-cli session images list them for agents.

MCP server on 127.0.0.1:<auto-port> (default 19876) — line-delimited JSON-RPC over TCP, loopback-only and auth-token gated. It exposes 152 authenticated methods plus auth.login; meta.surface (or unterm-cli reference) returns the authoritative live inventory in one call.

Agent Cockpit — per-pane agent state, waiting-first Inbox, worktree fleets, checkpoint + review. See the section above.

Governed agent work — one gateway every door goes through (MCP, CLI, brain, workflow, raw PTY write), capability leases with expiry and replay protection, workspaces that cannot see each other, a hash-chained audit trail, and evidence bundles somebody else can verify. An agent cannot drive a browser around the front door: raw CDP, Playwright, Puppeteer and Selenium are refused inside a managed session, with the supported path named in the refusal.

Web Settings UI on 127.0.0.1:<auto-port> (default 19877) — open in any browser via unterm-cli settings open or the Settings (Web) item in the ▼ menu. Tailwind-styled SPA, supports all 9 languages, keyboard + mouse.

Proxy management — reads macOS System Preferences / Windows registry / GNOME gsettings / proxy environment variables, and falls back to common local ports. ~/.unterm/proxy.json also persists manual HTTP/SOCKS URLs, no_proxy, named nodes, rotation, and Clash/mihomo controller settings.

Region screenshots from the status bar (left-click excludes the Unterm window, right-click includes it). PNG lands on disk under ~/.unterm/screenshots/, on the system image clipboard, and the path on the text clipboard. Over MCP, capture.screen, capture.window and capture.select (a rectangle) work on macOS and Windows; on Linux they currently return "not implemented on this platform yet". capture.scrollback and capture.clipboard work everywhere.

Scrolling (long) screenshots, both directions: capture.scrollback re-renders a pane's entire history into one tall PNG headlessly (exact fonts/theme, streaming-encoded, works while occluded); capture.window_scroll long-shots another app's window by synthesizing wheel events and stitching frames via row-hash matching with sticky-header/footer detection (macOS). Both also in the ▼ menu and unterm-cli screenshot --scrollback / --scroll-app.

Session recording → markdown with OSC 133 block segmentation and built-in redaction (GitHub tokens / KEY=value / 40+ char hex/base64 patterns are masked). Recordings are stored in the project directory under <cwd>/.unterm/sessions/<date>/<tab>-<time>.md, or in ~/.unterm/sessions/_orphan/ when no writable project context.

Right-click in the terminal pastes — every time, with or without a selection, and in every pane, including mouse-aware programs such as vim or Claude Code (the click is not passed to them). Copying is done by selecting: releasing the button puts the selection on the clipboard. On macOS a plain Ctrl+click counts as a right-click; the middle button pastes too. On the tab strip, right-click opens the tab context menu (new tab, split, rename, move, close) instead — chrome right-clicks never fall through to paste.

Quick menu on the tab bar's ▼ button, with live key chords from the binding table:

New Tab / Split Right

Directory Jump (cd current pane or open in new tab) / File Tree

Git Panel / Toggle Left Tab Strip

Find / Command Palette

Toggle Session Recording / Export Current Session / Scrollback Long Screenshot

Settings (Web), plus the version/website row

One unified top bar instead of a separate title bar, with buttons that follow the desktop: traffic lights on macOS, Fluent caption buttons (with Snap Layouts on Windows 11) on Windows, GNOME-style round buttons on Linux.

Identity profiles

Bind a window to a coherent developer identity — GitHub PAT, AWS keys, npm token, git author, SSH keys — all in one shot. New window for a different identity. The chip in the tab bar tells you which one you're in. Secrets live in the OS-native vault (Keychain / Credential Manager / Secret Service), never in ~/.unterm/.

unterm-cli profile create "Work — Acme" unterm-cli profile set-secret "Work" GITHUB_TOKEN unterm-cli profile spawn "Work" # → new window bound to Work unterm-cli profile set-default "Work" # plain unterm now binds to Work unterm-cli profile import # scans gh/aws/npm/ssh/docker/gcloud/netrc

for existing credentials, read-only

Inside a profile-bound shell:

$ env | grep UNTERM_PROFILE UNTERM_PROFILE=work-acme

GITHUB_TOKEN, GIT_AUTHOR_NAME, AWS_*, etc. all set from the profile

Full docs: unterm.app/docs/profiles.

Every running Unterm process is one instance with a NATO-phonetic name: alpha, bravo, charlie, … zulu. The first window claims alpha, the second bravo, etc. When all 26 are taken at once, the next one wraps to alpha2. Names are easy to pronounce and AI agents handle them right — no UUIDs, no ports in your head.

Each GUI instance writes its metadata (mcp_port, http_port, auth_token, pid, started_at, version, platform) to ~/.unterm/instances/<name>.json. Agents that need to drive a specific instance enumerate that directory and pick by id, cwd, or title.

The headless Core writes core.json to its platform data directory — %LOCALAPPDATA%\Unterm on Windows, ~/.local/share/Unterm on Linux, ~/Library/Application Support/Unterm on macOS — not to ~/.unterm. (UNTERM_STATE_

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →