A terminal-native execution workbench for parallel agent development.
面向并行 Agent 开发的终端原生执行工作台
Stop juggling terminals. Run multiple coding agents across multiple git worktrees
without losing control of context, dependencies, and handoff.
不再在终端间疲于奔命。在多个 Git worktree 上并行运行多个编码 Agent,
同时保持上下文、依赖关系与交接的完全可控。
简体中文 · Quick Start · Features · Architecture · Releases
export-1781454821790.mp4
Launch. Observe. Orchestrate.
Running multiple agents across multiple worktrees quickly turns your terminal into a control tower with no radar:
- Ownership fades — several agents run, but it is unclear who owns which task.
- Dependencies break silently — one agent finishes, the next never starts.
- State scatters — worktrees evolve, but the task-to-branch map drifts.
- Handoff fails — when you switch sessions, context is lost and you start over.
focus does not replace your agents. It gives them a shared execution system.
◆ Worktree-native execution
Each phase runs in its own isolated git worktree. Branches stay clean, context stays local.
◇ Agent-neutral orchestration
Plug in the agents you already trust. No lock-in to a single model or vendor.
▣ Phase-driven DAG
Humans steer at the phase level; agents schedule their own steps. Dependencies flow automatically.
◉ Shared context protocol
Agents read and write the same state through MCP. No manual handover between sessions.
◆ Agent Store
focus detects the agents you already have — Claude, Codex, Kimi, OpenCode, Gemini — and lets you enable, register, or discover more.
◇ Trellis-aware context
Optional integration with Trellis gives every worktree durable specs, PRDs, workflow state, and handoff journals.
▣ Structured handoff
Session summaries capture progress, blockers, and decisions so the next agent or human can continue without starting over.
◉ Terminal-native TUI
Built for the shell. Fast, keyboard-driven, no browser required.
# Install
go install github.com/RollingTheRock/Focus-tui/cmd/focus@latest
# Run inside a git repository
cd your-project
focusfocus launches with a live dashboard. Press Tab to move focus between the DAG, worktree list, and detail panes. Press ? to see the help overlay, and S to open the Agent Store.
focus does not replace your agents. It does not pick winners between models, vendors, or interfaces.
The Agent Store scans your system for the agent binaries you already use — Claude Code, Codex, Kimi CLI, OpenCode, Gemini CLI, and more — and lets you enable, disable, or register custom agents. Recommended agents come with one-line install hints, never bundled.
If you use Trellis, focus keeps every worktree’s specs, PRDs, workflow state, and handoff journals in sync. Agents start from structured intent, not conversational memory.
You choose the best tool for the moment. focus keeps the system coherent.
While focus stays agent-neutral, the author's daily driver is Kimi Code. focus includes a first-class integration layer for Kimi Code: the .kimi/hooks/session-start.py hook automatically injects the current Trellis task context into every Kimi Code session, so the agent starts from structured intent rather than an empty workspace.
graph LR
A[ADR / Plan] --> B[Phase DAG]
B --> C[Worktree]
C --> D[Agent Session]
D --> E[MCP Shared State]
E --> B
focus treats the worktree as the execution container, the DAG as the source of truth, and MCP as the shared context protocol. Agents run in their native terminals; focus coordinates them.
For the full architecture, see docs/architecture/.
| Method | Command |
|---|---|
| Go install | go install github.com/RollingTheRock/Focus-tui/cmd/focus@latest |
| Release binary | Download from GitHub Releases |
| Build from source | git clone https://github.com/RollingTheRock/Focus-tui.git && cd focus-tui && go build ./cmd/focus |
Requirements
- Go 1.25+
- Unix-like terminal environment recommended
- macOS / Linux
focus keeps project state in a .focus/ directory inside your repository and user-level preferences in ~/.config/focus/config.yaml.
# ~/.config/focus/config.yaml
agent:
external_terminal: true # launch agents in an external terminal
terminal_emulator: kitty # auto-detected if left empty
research_provider: kimi
architecture_provider: claude
coding_provider: "codex,kimi,claude"
editor:
command: nvim~/.config/focus/config.yaml— editor, theme, MCP transport, store backend..focus/focus.db— SQLite database for tasks, sessions, and worktree context (default).
See docs/architecture/ for the full architecture and protocol documentation.
- Human sovereign — humans own decisions; agents execute.
- Agent native — multi-agent parallelism is the default, not an afterthought.
- Structure first — ADR → Plan → Task → Session is operational scaffolding.
- Terminal realism — real engineering happens in shell, git, worktree, and scripts.
- Auditable execution — progress must be inspectable, reproducible, and reversible.
If you only need a single-agent chat surface, focus may feel heavy.
If you are running multi-worktree, multi-agent, parallel software execution and need control instead of terminal chaos, focus is built for you.
- Kimi Code — the author's preferred terminal-native coding agent.
focusships aSessionStarthook that injects Trellis context into every Kimi Code session. - Trellis — durable specs, PRDs, workflow state, and handoff journals for every worktree. Optional but recommended.
docs/architecture/— system design and protocols.docs/adr/— architecture decision records.docs/plans/— migration plans (currently no active plans; historical plans archived).docs/releases/— release notes and process.
