Component-first Swarm TUI refactor playground.
Current scope is a backend-connected Home page + Chat demo page:
- live workspace state from
swarmd /command system (/workspace,/workspaces,/model,/auth,/keybinds,/reload,/help)/headercommand to toggle chat header visibility (on|off|toggle|status)/themescommand for hot-swapping full UI theme colors (list|set|next|prev|status|create|edit|delete|slots)- custom themes with persistence (
/themes create,/themes edit,/themes delete) - codex auth key update from inside TUI
- model selection + thinking updates from inside TUI
- backend providers include
codex,google,copilot,fireworks, andopenrouter(exaremains search-only) - fuzzy workspace tree scan with
#<n>pick shortcuts - centered prompt card, quick action row, hint/tip lines, recent session list
Press Enter on a non-empty home prompt to open a dedicated Chat demo page with:
- streamed assistant responses
- unified timeline (chat + tool stream in one flow)
- tool stream states (pending/running/completed) inline with messages
- bash spinner demo (
⋮ ⋰ ⋯ ⋱) - context meter in sidebar
- bottom input + model presets row
- bottom swarm bar with tabs
- workspace sidebar (path/workspace/git), hidden on narrow terminals
Default theme is Nord (mapped from Swarm's nord.json) with 20 built-in themes including crimson.
Install from a GitHub release:
- Download the versioned
swarm-<version>-linux-amd64.tar.gzrelease asset from GitHub Releases. - Extract it.
- Install it with:
./swarmsetup --artifact-root /path/to/extracted/swarm-<version>-linux-amd64That installs the real Swarm runtime layout and launchers so the user can type swarm and open the installed app.
After install, launch Swarm with:
swarmOther common commands:
swarm --desktop
swarm server on
swarm server status
swarm server off
swarm dev
swarmdevLaunchers are installed into ${XDG_BIN_HOME:-$HOME/.local/bin} and point at installed runtime artifacts under ${XDG_DATA_HOME:-$HOME/.local/share}/swarm/{bin,libexec,share}.
swarm # open the main app
swarm --desktop # open the desktop app
swarm server on # start backend without opening UI
swarm server status # show backend status
swarm server off # stop backend
swarm dev # open the dev lane
swarmdev # dev aliasBy default:
swarmuses the main lane backend athttp://127.0.0.1:7781swarm dev/swarmdevuse the dev lane backend athttp://127.0.0.1:7782swarm --desktopuses desktop port5555swarm dev --desktopuses desktop port5556
You can also override the backend target directly:
SWARMD_URL=http://127.0.0.1:7782 SWARMD_TOKEN=<token> swarm devInstalled files live under:
${XDG_BIN_HOME:-$HOME/.local/bin}for launchers${XDG_DATA_HOME:-$HOME/.local/share}/swarm/{bin,libexec,share}for runtime files${XDG_STATE_HOME:-$HOME/.local/state}/swarm/...for runtime state
Use /mouse on and /mouse off at runtime to toggle mouse capture without restarting.
When mouse capture is enabled, use your terminal's selection modifier (typically Shift+drag) to select/copy text.
Ctrl+C: quitEnteron Home with prompt text: open Chat demo pageEnteron Home with/command: execute command in-placeEnteron Home with/...and palette visible: runs selected command immediately- type
/on Home: open command palette suggestions above the prompt Tabon Home with/...: autocomplete selected commandUp/Downon Home with/...: navigate command suggestions/sessionson Home: open sessions modal/authon Home: open auth manager modal- in auth modal:
Enteron provider opens that provider's auth flow; forcopilotit opens a chooser forcopilot login,gh auth, or direct GitHub token - in auth modal:
nadd token/API key,oadd OAuth or provider login flow,eedit,aset active,ddelete,rrefresh,llogin/method chooser - in auth modal:
/provider search,fcredential search,Tabfocus switch,Escclose Escin Chat page: return to Home- type
/in Chat: open command palette suggestions above the chat input Enterin Chat with prompt text: replay demo with new promptEnterin Chat with/...and palette visible: runs selected command immediatelyEnterin Chat with/command: execute slash command in chat (for example/header off)gin Chat: open/close full diff gallery (10 variants)j/korUp/Downin diff gallery: scroll- mouse wheel in Chat: scroll timeline; in diff gallery: scroll diff rows
[/]in Chat: switch swarm bar tab highlightUp/Downorj/k: select recent sessionEnter: mock open selected session- type text: edit prompt line
Backspace: delete prompt charsCtrl+U: clear prompt- click a recent session row: select it
- click workspace chips in the top bar: switch active workspace
- click top-bar objects (
git,agents,plan,mode,sessions): mock panel actions Ctrl+Ron Home: hot reload home state from backend/headeron Home: toggle chat header visibility for new chat sessions/mouseon Home/Chat: toggle mouse capture (/mouse statusfor current state)/themeson Home/Chat: open theme modal (live preview while moving selection)/themes create <id> [from <theme>]: create a persistent custom theme/themes edit <id> <slot> <#RRGGBB>: modify custom theme colors/themes delete <id>: remove a custom theme/themes slots: list editable color slots- in themes modal:
Up/Down(orj/k) live preview,Enterapply,Esccancel/revert preview /keybindson Home/Chat: open keybind manager modal- in keybinds modal:
Enteredit selected, press any key to bind,Esccancel/close,rreset selected,Shift+Rreset all F8: toggle mouse capture- Chat focus strip is centered and fixed:
[a:...] [m:...] [t:...] - Context usage is shown separately at the bottom-right:
used:limit(for example0:400.0k)
- Use
swarm dev infoto print lane listen/url/state/log metadata. - Use
swarmdev infoas shorthand for dev lane metadata. swarm devandswarmdevlaunch the installed dev-lane runtime; userebuild devto refresh it from the current branch.swarmandswarmdevrefuse to launch when the installed runtime is missing (no silent fallback to source builds).- Lane occupancy/port records are written to user state (
${XDG_STATE_HOME:-~/.local/state}/swarm/ports/swarmd-main.env,${XDG_STATE_HOME:-~/.local/state}/swarm/ports/swarmd-dev.env).
swarmtui now persists UI settings through the daemon-backed /v1/ui/settings API backed by Pebble.
There is no local swarmtui.json file anymore.
Current settings include:
chat.show_headerchat.thinking_tagschat.tool_streaminput.mouse_enabledinput.keybindsui.themeui.custom_themesswarming.titleswarming.status
SWARMTUI_THEME overrides ui.theme for that process only.