Early preview

Open issues as workspaces.

A GitHub Action posts an “Open workspace” link on every new issue. Click it — Worktree creates an isolated git worktree on your machine and opens it in your editor. No extra clone. No context switching.

GitHub Action posts this comment automatically on every new issue
centy-io/centy-daemonIssue #31
Cannot close issue - "No issue found" error despite file existing
Opened 2 hours ago by @bluedotiya
W
worktree-botcommented just now
bot

A workspace is ready for this issue.

Open workspace
terminal
$ worktree open
✓ Fetching issue #31
✓ Creating worktree ~/worktrees/centy-daemon/issue-31
✓ Opening VS Code

How it works

Set up once. Works for every issue.

Set up once

/01

Install Worktree

Install the daemon with cargo, then run the setup wizard to register the URL handler and pick your editor.

cargo install worktree-io
worktree setup
/02

Add GitHub Action

Add a four-line workflow to your repo. Every new issue gets an "Open workspace" comment from that point on.

.github/workflows/worktree.yml

Every issue

/03

Issue opens

The action triggers and posts an "Open workspace" link as a comment. Nothing for you to do.

worktree-io/comment-action@v1
/04

Click the link

One click opens this page, which wakes up Worktree running on your machine. No terminal. No manual steps.

worktree://open?...
/05

Workspace opens

The daemon creates a local worktree directory and opens it in your configured editor. Instantly.

code . · idea . · nvim .

Why Worktree?

Stop juggling branches. Start shipping.

Zero context switching

Each issue gets its own isolated worktree. Bounce between three issues in flight — no stashing, no conflicts, no lost state.

One click from GitHub

No terminal dance. The GitHub Action posts an “Open workspace” button on every issue — click it, and your editor opens on the right code.

Main stays pristine

Work never touches your main branch until you're ready to PR. Each worktree is fully isolated — merge when it's done, delete when it's not.

Auto-setup on open

Hooks run scripts before and after your editor launches — install deps, set env vars, spin up services. The workspace is ready before you type a line.

Editor agnostic

Your editor. Your rules.

Worktree reads a config file to decide which editor to launch. Any command that opens a directory works. Chain commands, set env vars, do whatever you need.

Cursorcursor .
VS Codecode .
Zedzed .
Sublime Textsubl .
Neovimnvim .
Vimvim .
Alacrittyalacritty --working-directory .
Kittykitty --directory .
WezTermwezterm start --cwd .
iTerm2open -a iTerm .
Warpopen -a Warp .
Ghosttyopen -a Ghostty .
Windows Terminalwt -d .
Customopen -a 'My Editor' .

Get started

Install Worktree

macOS
$ cargo install worktree-io

Requires Rust / Cargo — or download a binary directly above.

Apple Silicon .tar.gzIntel Mac
Linux
$ cargo install worktree-io

Requires Rust / Cargo — or download a binary directly above.

x86_64 .tar.gzARM64
Windows
$ cargo install worktree-io

Requires Rust / Cargo — or download a binary directly above.

Download .zip
after
Run the setup wizard
$ worktree setup

Registers the worktree:// URL scheme and lets you choose your editor. You can also configure hooks to run scripts when a workspace opens.

Integrations

One step. Done.

Drop Worktree into your pipeline. It posts an “Open workspace” link on every new issue or work item — no secrets, no config.

GitHub Actions

.github/workflows/worktree.yml
name: Worktree
on:
  issues:
    types: [opened]

jobs:
  comment:
    runs-on: ubuntu-latest
    permissions:
      issues: write
    steps:
      - uses: worktree-io/comment-action@v1

Commit this file to .github/workflows/ in your repo. GitHub runs it automatically on every new issue.

Azure DevOps

azure-pipelines.yml
steps:
  - task: WorktreeComment@1

Add to your pipeline, then connect it via a Work item created service hook in your ADO project settings. The task reads System.WorkItemId automatically.

Jira

.env
JIRA_HOST=your-org.atlassian.net
[email protected]
JIRA_API_TOKEN=your-api-token
GITHUB_OWNER=your-org
GITHUB_REPO=your-repo

Deploy jira-comment-webhook with these env vars, then add an Issue Created webhook trigger in Jira Automation pointing at your server.

Configuration

Run scripts when a workspace opens.

The [hooks] section in your config file lets you run bash scripts before and after the editor launches. Variables are injected with Mustache syntax.

pre:openruns first
editorlaunches
post:openruns after

Config snippet

~/.config/worktree/config.toml
[hooks]
"pre:open"  = "npm install"
"post:open" = "echo ready"

A non-zero exit code from either hook shows a warning but does not stop the workspace from opening.

Available variables

{{owner}}GitHub username or org that owns the repo
{{repo}}Repository name
{{issue}}Issue number
{{branch}}Branch name, e.g. issue-42
{{worktree}}Absolute path to the worktree directory
Tip

Use pre:open to install dependencies or configure git before the editor launches:

[hooks]
"pre:open" = "npm install"