Chan is a supercharged terminal emulator, free and open source. It is scriptable from the shell as well as from the keyboard and the mouse. It works the same locally and on remote machines. It has a multiplexer of its own and also speaks tmux control mode (tmux -CC). A remote devserver is reached over any TCP tunnel you already have (an ssh port forward, a VM, a container) or through a chan gateway, an always-on deployment you host yourself. Around the terminal it turns any directory into a workspace: search, a Markdown editor with diagrams and slide decks, a file browser, a graph of the project, and teams of coding agents in named tabs. Nothing is an online service: the desktop app, the headless devserver and the gateway all build from this repository.
Download binaries from chan.app or build locally using the Makefile here. The user manual is at chan.app/manual.
Contributors and agents: start at .agents/README.md; the practical guide is CONTRIBUTING.md.
- docs/extensions.md - how Chan uses extensions and how to build one.
- docs/config-reference.md - every persisted configuration file and field.
The architecture is documented next to the code it describes. design.md is the whole-system reference: the layers of the product, the components, the runtime shapes (local, a devserver over a tunnel, a devserver through a gateway) and the invariants. Each crate or surface below carries its own design of record.
Core:
- crates/chan - the CLI binary: dispatch, process lifecycle, service supervision, self-upgrade.
- crates/chan-workspace - the core: filesystem gates, workspace registry, search, graph, state placement, locking.
- crates/chan-server - the serving layer: per-tenant HTTP/WS, SPA embed, MCP host, devserver builder.
- crates/chan-library - the host: workspace and terminal tenants under one server, the window registry, terminal sessions, tmux connections.
- crates/chan-shell -
cs: the control-socket wire contract and the client that speaks it. - crates/chan-llm - the MCP tool sandbox exposed to external agent CLIs.
- crates/chan-systemd - the systemd boundary: notify, watchdog, fdstore, unit render and classification.
- crates/chan-tmux - the tmux control-mode protocol: stream framing, notifications, commands, layouts.
- crates/chan-report - repository reports: the walker, the JSONL schema, the COCOMO model.
- crates/fetch-models - build-only helper that produces the embedded-model tarball.
Desktop and web:
- desktop - the Tauri shell: windows, exact-origin trust, native IPC.
- web/packages/workspace-app/src - the web frontend: the SPAs and how each is served, the color system.
- web/packages/workspace-app/src/editor - the CM6 editor surface.
- web/packages/launcher - the launcher SPA and its three-surface serving.
Tunnel:
- crates/chan-tunnel-proto - the shared wire contracts.
- crates/chan-tunnel-client - the dial-side client embedded by
chan devserver. - crates/chan-wireguard - the in-process WireGuard peer and TCP stack the devserver's dial can run through.
- crates/chan-tunnel-server - the terminator embedded by the gateway.
- crates/chan-revtunnel - reverse port forwarding from a devserver to the connected desktop (
cs tunnel); distinct from the gateway tunnel.
Gateway (separate Cargo workspace; the self-hosted account, sign-in, and proxy surface):
- gateway - the whole-gateway reference: publication, account and desktop lifecycles, control and data planes, entry, and isolation.
- gateway/crates/identity - sign-in, PATs, discovery, desktop entry: the public account surface (gw.{domain}).
- gateway/crates/profile - the authoritative user store.
- gateway/crates/devserver-proxy - the public data-plane edge for tunneled devservers ({proxy}.proxy.{domain}).
- gateway/crates/devserver-control - the fleet control plane: proxy directory, admission, kill routing.
- gateway/crates/gateway-common - the contracts the gateway services share.
- gateway/crates/admin - the operator CLI.