Status badges
kwt agent-hook install
Writes working, approval, input, or done onto each pane so terminal front ends flag sessions that need you. Preview config edits first with --dry-run.
One Go binary and local daemon for parallel AI-assisted development: isolated Git worktrees and plain folders, tmux and Rex sessions, live coding-agent status and reboot-safe conversation recovery (Claude Code, Codex, Antigravity), safe pull-request checkouts, and reviewed OpenSSH connections across machines. Use the built-in dashboard and JSON CLI directly, or embed it in front ends and Go tools.
brew install kenn-io/tap/kwt
go install go.kenn.io/kwt/cmd/kwt@latest
kwt
Single Go binary. Prebuilt macOS, Linux, and Windows archives with checksums are on GitHub Releases. Needs Git 2.20+ and tmux 2.1+ (tmux 3.0+ for pane mode and conversation restore). See all install options.
Run parallel branches and coding agents without them editing the same files. kwt creates isolated Git worktrees, handles bare-container repositories, registers plain non-Git folders as workspaces, and lists every project in one live dashboard.
tmux -L kwt), separate from personal sessions. Imported pull requests stay inert until you review and attach.--no-launch to skip tmux.--agent.Install kwt's hooks once to track live agent status across tmux panes. When a machine reboots or tmux crashes, kwt session restore rebuilds your windows, pane layouts, and running Claude Code, Codex, and Antigravity CLI (agy) conversations.
$ kwt agent-hook install --dry-run
claude ~/.claude/settings.json would install
codex ~/.codex/hooks.json would install
agy ~/.gemini/settings.json would install
$ kwt agent-hook install
# after a reboot or tmux kill-server:
$ kwt session restore --all --continue
restored kwt-wt-widget-fix-flaky-status (2 windows, 3 panes, resumed codex + claude)
Status badges
kwt agent-hook installWrites working, approval, input, or done onto each pane so terminal front ends flag sessions that need you. Preview config edits first with --dry-run.
Reboot recovery
kwt session restoreRebuilds saved tmux windows, pane geometry, working directories, and Claude Code, Codex, or agy conversations. Without hooks, run kwt session snapshot while tmux and the agents are running so kwt records their panes before shutdown.
Resume mid-turn
--continueAsks Codex and Claude Code to pick up turns interrupted when tmux stopped, skipping turns that were waiting for your approval or input.
Rex bridge
kwt rexLists Rex terminals, attaches from an ordinary terminal, opens new windows, and controls tiled splits and floating layers locally or over REX_SERVER.
Workspaces often live on build boxes, dev servers, and laptops at the same time. kwt resolves OpenSSH configuration into reviewed routes, holds generation-bound connection leases, browses remote folders, and syncs advisory worktree state across machines.
$ kwt ssh resolve build.example.com --json
$ kwt ssh lease build.example.com --host-key-policy review --connection 2 --json
connected route verified · master #2 leased · prompts streamed as NDJSON
$ kwt ssh exec build.example.com -- kwt list --json
$ kwt sync status
widget fix/flaky-status laptop (clean) · build-box (ahead 2, modified 1)
Reviewed routes
kwt ssh resolve and leaseResolves ssh -G routes with direct and ProxyJump hops, streams structured host-key review and Tailscale SSH browser-auth prompts, and runs ssh exec and ssh copy.
Scale and Windows
Pass --connection 1..15 to open extra masters past server MaxSessions limits, override --compression or --forward-agent, and lease connections on native Win32-OpenSSH without WSL.
Fleet awareness
kwt syncRuns a loopback hub (kwt sync serve) that you expose over private HTTPS so the dashboard shows remote-only branches, differing commits, and where dirty files were last seen across your machines.
Remote discovery
kwt workspace browseLists child folders and Git roots on local or SSH-hosted machines as JSON without registering anything, so front ends can pick projects on remote hosts safely.
Scripts and agents drive every operation over JSON with structured error codes and generation checks. Untrusted branches and contributor pull requests start inert: hooks, filters, file copies, setup commands, and tmux stay off until you review and open them.
$ kwt add -b fix/flaky-status --no-launch
$ kwt exec fix/flaky-status -- go test ./internal/status
ok go.kenn.io/kwt/internal/status 1.204s
$ kwt changes "$(kwt get fix/flaky-status)" --json
{
"worktree": { "repository": "github.com/acme/widget", "generation": "9f3c…" },
"changes": { "state": "modified", "summary": { "modified": 1, "untracked": 0 },
"files": [{ "path": "internal/status/poll.go", "worktree": "modified" }] }
}
$ kwt remove -b fix/flaky-status
removal stopped: the worktree has local changes # commit first, or pass --force
Generation-checked JSON
kwt list and kwt changesEvery worktree carries a generation ID that changes if the path is recreated. Guard reads and mutations with --expected-generation and branch on structured error codes.
Pull requests
kwt pr import and attachImports a GitHub PR into an inert checkout wired to push back to the contributor's branch. kwt pr attach runs it on a dedicated tmux socket and strips kwt-managed credentials.
Safe cleanup
kwt remove and kwt pruneStops when a checkout is dirty, locked by Git (printing Git's lock reason and unlock command), or in use by a live shell or agent (listing blocking PIDs). Preview policies with --dry-run.
Self-repair
kwt doctor --fixDetects broken Git backlinks, moved repositories, and registry drift without changing anything. --fix applies only unambiguous repairs and rescans.
An on-demand local daemon coordinates inventory, cross-process locks, repository trust, and SSH leases on each machine. Ghosthub embeds kwt as its workspace backend across local and SSH hosts, and any script, editor, or Go app can build on the same interfaces.
kwt or kwt tui. Manage every local repo, folder workspace, and remote fleet host.go.kenn.io/kwt for inventory, removal, inspection, and SSH; go.kenn.io/kwt/worktree for locked Git worktrees and warm spares.kwt open --start-session, kwt rex control, and kwt ssh lease --json for custom front ends.Follow the 10-step guide from registering a project to restoring agent sessions, leasing SSH routes, and embedding kwt. Every documentation page is also served as Markdown with a .md URL and indexed in llms.txt.