lattice is a tmux-backed, tabbed interface for running and managing coding agents (codex, claude, etc.) on your own machine or VPS.
Design goals:
- top tab bar with per-instance tabs
- keyboard-first controls
- clean boxed panels with modern color theme
lattice is agent-first, but keeps runtime complexity low by using tmux for PTY/session durability.
sshdhandles remote accesslatticehandles agent discovery, tabs, summaries, and controlstmuxhandles durable sessions and attach/detach behavior
- Auto-detects installed agent CLIs in
PATH(currently:codex,claude,aider,gemini,opencode) plus custom agents via config - Detects running agent sessions from tmux
- Spawn wizard: choose agent, navigate filesystem, create directories, clone from URL, or type a path directly
- Dashboard with instance list + summary panel showing state, PR number, CI status, branch, uptime, path, and dev server URL
- Tabbed interface with per-instance tabs and split view for side-by-side monitoring
- Tracks GitHub PR state and CI checks for agent branches (background polling)
- PR workflow: create PRs, merge PRs, fix failing CI — all from the TUI
- Git worktree support: isolate each agent in its own worktree branch
- Dev server management: auto-start companion dev servers, parse and display localhost URLs
- Startup commands: run setup commands (e.g.
pnpm install) before agent launch - Agent permissions: configure per-agent bypass flags
- Configurable theme, notifications (sound on completion), and refresh interval
- Title injection: agents write task titles to temp files for display in the TUI
- Build:
cargo build --release- Run:
./target/release/lattice- Inside the app:
- go to the dashboard tab
- select
New Instancein the list and pressenter - choose agent, then navigate folders (
.., directories,Create directory here..., andUse <path>) and pressenterto create - select an instance and press
enterto jump in - detach from tmux normally (
Ctrl-b d) and return to the manager
Use a dedicated user so SSH lands directly in the manager UI.
Example (/etc/ssh/sshd_config.d/lattice.conf):
Match User agentops
ForceCommand /usr/local/bin/lattice
PermitTTY yes
X11Forwarding no
AllowTcpForwarding no
Reload SSH:
sudo systemctl reload sshdThen connect:
ssh agentops@your-vpsup/down(orj/k): move selection in listsleft/right(orh/l,tab): switch tabs1-9: jump directly to instance tab by numbers/d: return to dashboard tabr: refreshq: quit
n: open spawn wizard (new instance)enteron an instance: attach to selected/current instancex: stop selected/current instancet: open a terminal split inside the instance's tmux session
enterin agent step: confirm agent selection1-9: select agent by number and advanceenterin path step:- on
Use <path>: create instance in that directory - on
..or a directory: navigate - on
Create directory here...: switch to directory-name input
- on
.: use current directory/: type a path directly+: create new directoryg: clone from git URL-/backspace: go to parent directory~: jump to home directorypgup/pgdn: faster scrolling in long directory lists
p: create PR (no PR) / merge PR (PR open)o: open PR in browserf: ask instance to fix failing CI checks
v: enter split selection modev(in split mode): add another panec: remove last paneenter: launch split view (requires 2+ panes)esc: cancel split selection
R: start or restart the dev server for the selected instanceD: stop the dev server for the selected instanceO: open the detected dev server URL in the browser
enteron settings row: open settings editor- Settings sub-views: startup commands, dev servers, agent permissions
- Boolean settings toggle on
enter, text settings open an inline editor