Skip to content
marcrdgzPublic

About

⚡ High-performance terminal multiplexer & AI CLI agent orchestrator

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

🕷️ Kumo

蜘蛛 — spider in Japanese.

Kumo is a terminal multiplexer that weaves your AI agents together into a single web 🕸️. Every pane is a live terminal, every AI CLI you run (opencode, claude, codex, …) is a thread in that web, and the sidebar keeps you aware of what each agent is doing at a glance — because a spider always knows what's happening in its web. ✨

Built in Rust 🦀 with a single TUI frontend on ratatui, real terminal emulation from libghostty-vt (Ghostty's headless terminal core), and portable-pty for PTY management. 🧵

And it's featherweight 🪶: while you work, kumo itself idles at ~0.7% CPU and ~6 MB of memory — the real cost is whatever you run inside its panes, not the multiplexer.

📖 Documentation: marcrdgz.github.io/kumo

✨ Features

  • 🖥️ Real terminal emulation — each pane is a genuine VT/xterm emulator (vendored Ghostty). Shells, TUIs, and full-screen apps behave exactly like in a native terminal: cursor, colors, scrollback, the works. 🎨
  • 🧩 Split panes, tabs & sessions — binary split tree (vertical/horizontal), mouse-drag resizing, zoom 🔍, tabs per session, multiple independent sessions and git worktrees.
  • 🤖 AI CLI panes — spawn a dedicated pane running your AI CLI with one keystroke, or just run opencode / claude / codex … in any shell pane: kumo auto-detects the agent process and weaves it into the sidebar. 🕸️
  • 🔵🟠🟢⚪ Agent status at a glance — the sidebar shows each agent's workspace and CLI name with a status dot: blue = working, orange = blocked (waiting for approval), green = done (finished while you weren't looking), gray = idle. Detected from the live terminal buffer (not the viewport), so it stays accurate even while you scroll. Lifecycle detection is per-agent — see Agents. ⚡
  • 🔔 Agent notifications — when an agent blocks (waiting for approval) or finishes, kumo raises a transient toast in every attached viewer (click to jump to the pane) and plays a distinct chime per event. Blocked agents float to the top of the agent list (with a filled ◉ dot and · blocked hint) and their pane glows orange, even without focus; leader+i jumps through the agents that need you. Tune the corner with [notifications] position, mute with [notifications] sound = false. 🔔
  • 📋 Selection & copy-mode — drag to select in any pane, even inside apps that own the mouse (opencode's TUI, vim, less), or use vi-style copy-mode with search (leader+y, leader+/). ✂️
  • 🕹️ Orchestration — kumo agent wait/prompt/read and kumo pane wait-output let scripts and agents drive any pane and wait without polling, with a stable --json API.
  • 💾 Detach & survive reboots — the daemon keeps panes running while detached, restarts in place on kumo update, and restores sessions, screens and agent conversations after a reboot.
  • 🐣 Plain-tty identity — panes present as a plain xterm-256color (no mouse capabilities advertised), so apps don't hijack the mouse and selection always works. 🧤
  • 📂 Workspace-aware — kumo opens in the directory you launch it from, and new panes follow the focused pane's working directory. 🗂️

📦 Install

CLI (recommended) — the kumo binary (daemon + TUI + control CLI in one), via the cargo-dist installer generated by the release pipeline:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/marcrdgz/kumo/releases/latest/download/kumo-installer.sh | sh

Desktop app — installed separately from its Kumo-<arch>.dmg on the release page (macOS). The app manages the whole install: if the kumo CLI is missing or outdated it offers to install/update it, and it can self-update from a newer .dmg — all from inside its interface.

Nightly — rolling build of main (macOS ARM + Linux x86_64; the full target matrix can be built on demand via a manual workflow dispatch):

kumo update --nightly

From source (development) — needs Zig 0.16.x on PATH (see Requirements below):

cargo install --path app/kumo --locked
# or: make install

🔄 Updating

The desktop app is the "smart" interface for updates: on launch it checks both the kumo CLI and the desktop app against the latest release, installs the CLI automatically when it's missing, and shows a one-click banner when either is outdated.

The TUI keeps its own kumo update for the CLI:

kumo update            # update to the latest stable release
kumo update --nightly  # update to the latest nightly build
kumo update --check    # report availability (exit 0 = up to date, 1 = update)

At startup kumo checks (at most once per day for stable, every 6 h for nightly) for a newer release and, if one exists, shows a banner at the top-right with a red ✕ to dismiss it. Disable the check with update-check = false in the config or by setting KUMO_NO_UPDATE=1.

⚙️ Configuration

Kumo reads ~/.config/kumo/config.toml and reloads it automatically when it changes:

# ~/.config/kumo/config.toml
ai-cmd = "claude --model sonnet"
theme = "tokyo-night"

[keymap]
leader = "ctrl+b"

# Leader bindings are remappable: override a stock key or add a new one.
[keymap.bindings]
s = "split-vertical"   # now leader+s splits vertically

Every key — terminal, theme, sidebar, status bar, notifications, worktrees, persistence — is in the configuration reference, which also has an interactive config builder.

🤖 Agents

Kumo auto-detects supported AI CLIs running inside a pane and lists them in the sidebar. Lifecycle rules are bundled for opencode, claude, codex, gemini, qwen, aider, cody, swe and coco, and may be replaced or extended from ~/.config/kumo/agent-detection/*.toml. When no explicit marker matches, a pane reads unknown instead of a guessed state; kumo agent explain PANE shows the evidence behind a state.

Install the bundled orchestration skill in your agent with kumo agent skill --output PATH (or MENU → settings → agents) — see Orchestration.

🛠️ Requirements

  • 🦀 Rust toolchain (cargo) — to build from source
  • ⚡ Zig 0.16.x on PATH — build.rs compiles the vendored libghostty-vt library at build time
  • 🍎 macOS with Xcode ≥ 26.5: build with DEVELOPER_DIR=/Library/Developer/CommandLineTools (the Makefile sets it)
  • 🐙 GitHub CLI (gh, authenticated) — only for maintainers publishing releases, and for the status bar's github widget; not required to use or update kumo

⌨️ Keybindings

Press the leader (Ctrl+B), then a key. leader+? opens a searchable command palette with every binding.

Keys Action
v / - Split vertically / horizontally
h j k l · H J K L Move focus · resize
z · x · Tab Zoom · close pane · cycle panes
a Spawn an AI CLI pane
t · n / p · 1–9 New tab · next / previous tab · jump to tab
c · ] / [ · Alt+1–9 New session · next / previous session · jump to session
y · / Copy-mode · search the scrollback
i · b · f Agent inbox · toggle sidebar · filter sidebar
d Detach (the daemon keeps running)

Every binding is remappable in [keymap.bindings]; the full table with action ids is in Keybindings. The MENU button in the status bar opens config, settings, reload, keybinds and detach.

🗺️ Roadmap

0.8 is the 1.0 release candidate: stable wire protocol and --json API, sessions that survive a reboot, and a written compatibility policy. 1.0 freezes it; plugins follow in 2.0. See ROADMAP.md for the details.

▶️ Run

kumo                       # 🏠 attach to the daemon (starts it if needed)
kumo attach                # 🧷 attach to the running daemon
kumo new ~/proyecto        # 🆕 start a fresh session in the daemon
kumo ~/proyecto            # 🗂️ same as `kumo new ~/proyecto` (back-compat)
kumo daemon ~/proyecto     # 🐞 run the headless daemon in the foreground
kumo ls                    # 📋 list the daemon's sessions (* = active)
kumo kill                  # 🛑 stop the daemon and end its sessions
kumo --version             # ℹ️ prints the version and channel (stable / nightly / dev)

During development: cargo run -p kumo or make run. 🧑‍💻

🔁 Detach / re-attach

leader+d (or MENU → detach) detaches this terminal; the daemon keeps running in the background, owning your panes, their processes, and their agents. Re-attach from any terminal with kumo or kumo attach, and everything is exactly where you left it.

  • The daemon auto-stops when the last session closes — no lingering process.
  • kumo new always starts a fresh session; it never attaches to an existing one.
  • The socket is owner-only and the daemon refuses connections from other users.
  • Sessions survive a reboot: layout, working directories, screens and agent conversations come back (see Detach & re-attach).

🗂️ Project layout

Cargo.toml              📄 virtual workspace (kumo, kumo-core, kumo-protocol)
app/kumo/               🕸️ the single `kumo` binary — daemon + TUI + control CLI + update
  build.rs                🏗️ compiles the vendored libghostty-vt (Zig)
  src/main.rs             dispatcher: `kumo daemon` | TUI | control CLI | `kumo update`
  src/daemon/             the headless daemon: PTYs, terminal emulators, layout tree, agents
    app.rs                  sessions/panes, layout tree, PTYs, agents
    pane.rs                 🪟 Pane = PTY + libghostty-vt terminal
    vt.rs                   🔌 FFI bindings to libghostty-vt
    pty.rs                  🔧 portable-pty wrapper
    agents/                 🔍 per-agent lifecycle detection + bundled rules
  src/cli/                the client — TUI (all chrome), control CLI
    client_view.rs          geometry, input, mouse, overlays (rendering in client_view/)
crates/kumo-core/       📦 shared logic — config, layout, themes, updates, worktrees
crates/kumo-protocol/   🔌 the pure wire protocol (Command/DaemonEvent)
docs/                   📖 documentation site (Next.js + Fumadocs)
vendor/libghostty-vt/   📚 vendored Ghostty terminal emulator (Zig + C headers)

The native desktop client (kumo-desktop) lives in a separate repository and depends only on kumo-protocol. Architecture notes are in ARCHITECTURE.md.


🕸️ A spider always knows what's happening in its web.

About

⚡ High-performance terminal multiplexer & AI CLI agent orchestrator

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages