Worktree Management

Worktree Management

Track git worktrees across multiple machines with fuzzy alias matching.

Worktree Fields

FieldDescription
nameDisplay name (required)
machine_idHostname of the machine
pathAbsolute path to worktree
remote_originGit remote URL
branchCurrent branch
aliasShort alias for quick lookup

Creating Worktrees

{
  "name": "create_worktree",
  "arguments": {
    "name": "CaseMgr Main",
    "machine_id": "dev-laptop",
    "path": "/home/user/projects/casemgr",
    "remote_origin": "git@github.com:user/casemgr.git",
    "branch": "main",
    "alias": "cm"
  }
}

Fuzzy Alias Matching

Use get_worktree_by_alias with fuzzy matching (Jaro distance) to find worktrees even with partial or misspelled aliases.

Linking to Cases

{
  "name": "assign_worktree_to_case",
  "arguments": {
    "worktree_id": "#25:0",
    "case_id": "#1:0"
  }
}