This guide gets TW from a fresh checkout to one isolated agent task. For a zero-risk product preview with fictional data, use the demo guide instead.
For the macOS Dashboard and local sessions:
- macOS
- Git
- tmux
- Node.js 20 or newer
- at least one CLI coding agent, such as
codexorclaude
brew install git tmux node
git --version
tmux -V
node --versionFor an SSH target, install the same runtime dependencies and tw on that host.
Download the latest DMG from GitHub Releases, move tw-dashboard into Applications, and open it:
open -a tw-dashboardThe app bundles the matching Dashboard-side CLI code but still expects a local Node.js runtime. If a repository is stored under Desktop, Documents, or Downloads, macOS may ask for folder access when TW first reads its Git metadata.
git clone https://github.com/Sskift/tmux-worktree.git
cd tmux-worktree
npm install
npm run build
npm link
tw setup
tw doctortw doctor should report Git, tmux, Node.js, and configuration status. Run it again after changing a machine's runtime.
The shortest path does not require a config file:
tw codex /Users/me/code/myapp improve-searchTW creates a branch and worktree beneath ~/.tmux-worktree/worktrees, starts one managed tmux session, and runs codex in that worktree. Replace codex with the installed agent command you prefer.
Use a different base branch when needed:
tw claude /Users/me/code/myapp fix-auth --branch developList and reattach later:
tw ls
tw attach <session-name>Create ~/.tmux-worktree.json:
{
"projects": {
"myapp": "/Users/me/code/myapp",
"backend": {
"path": "/Users/me/code/backend",
"branch": "develop"
}
},
"worktreeBase": "/Users/me/.tmux-worktree/worktrees"
}Now the project name is enough:
tw codex myapp improve-search
tw claude backend fix-authThe Dashboard reads the same project catalog. Click New worktree, select the project, base branch, and detected agent, then create the task.
The remote machine needs Git, tmux, Node.js 20+, and a compatible tw installation. Start with a normal SSH configuration and confirm that non-interactive login works.
tw host add \
--id build-mac \
--host builder.example.com \
--user alice \
--json
tw host probe build-mac --jsonOr open Settings → Connections → Hosts → Add host. A successful probe separates SSH reachability, tmux availability, and TW lifecycle compatibility so a missing remote dependency is not mistaken for a network outage.
Remote project paths are resolved on the remote host. Install tw there and give it a ~/.tmux-worktree.json containing that host's repository paths.
Open Automations → Manage, or use the CLI:
tw automation create \
--name weekday-review \
--project myapp \
--cmd codex \
--instruction "Review the current branch and summarize the highest-risk changes" \
--schedule "0 9 * * 1-5" \
--timezone Asia/ShanghaiThe current scheduler runs inside the Dashboard process. Keep the Dashboard running for scheduled triggers. Manual runs are always available from the Automation panel.
TW Mobile is currently a device-test build from this repository, not a signed production release.
-
Build the APK:
npm run verify:android
-
Install
mobile/android/app/build/outputs/apk/debug/app-debug.apkon the test device. -
In the Dashboard, open Settings → Connections → Relay.
-
Configure the explicit self-hosted Relay profile shown by the app, start the Host connector, and create a one-time pairing link or QR.
-
Enroll the phone and confirm that the device appears under Connected mobile devices.
Use HTTPS/WSS with trusted certificates for any network beyond a local development environment. The current self-hosted profile is intended for machines you control, not unrelated tenants.
The Feishu bridge uses lark-cli profiles for bot credentials and authorization. Secrets stay in lark-cli; TW stores only the selected non-sensitive profile name and binding state.
- Configure and validate a
lark-clibot profile. - Open Settings → Integrations in the Dashboard.
- Select the profile and start the bridge.
- Bind one authorized group conversation to one exact local managed session.
- Mention the bot in that group to steer the session; use the Dashboard's controlled takeover flow before returning local input ownership.
Feishu binding currently targets local managed sessions. Do not describe a remote session name as equivalent to an exact local terminal-control target.
tw doctor
tw codex <project-or-path> <task-name>
tw ls
tw agents ls --json
tw worktree prune --dry-runBefore deleting a task and its worktree, inspect uncommitted changes. tw rm <session> --worktree refuses dirty worktrees unless force is explicitly requested.
Next: take the product tour, understand the security model, or open troubleshooting.