Repository navigation
v0.2.0: unattended worktree lifecycle
This release adds explicit unattended worktree creation and removal for an orchestrator. The existing human command and VS Code workflow remain unchanged.
Pin and contract
- Source commit:
9b0610857bd4f82921401512a0ab428c5e0f7463 - Version identifier:
0.2.0 - Final CLI/config/JSON contract
- Implementation PR #8
- Tracking issue #2
This is the current stable release. The previous human-workflow baseline remains available at v0.1.0. The implementation was merged through PR #8; PR #9 sets the stable executable version and documents pinned installation.
Preserve everyday usage
Continue using mkwt <branch> with the existing repository-local Bash config, configured setup, fetching, plain-path stdout, and VS Code settings. The literal branch names create and remove also retain their legacy behavior unless automation flags are supplied.
Automation interface
mkwt create \
--repo /srv/repos/project \
--path /srv/workspaces/run-123/claude \
--commit FULL_COMMIT_SHA \
--detach \
--config /etc/orchestrator/mkwt.conf \
--non-interactive \
--json
mkwt remove \
--repo /srv/repos/project \
--path /srv/workspaces/run-123/claude \
--non-interactive \
--json
mkwt --version --jsonUse an external server config with literal settings:
SYMLINKS=""
WORKTREE_ENV=""
POST_CREATE_HOOK=""
OPEN_IN_VSCODE="never"Automation requires Bash 4.4+ and Git 2.48+; those requirements do not change the legacy workflow. Unattended config is data, not executable Bash, and requires setup actions to be disabled. Automation suppresses Git hooks, filters, fsmonitor, automatic maintenance, and lazy fetching. Git LFS pointer files remain pointers. The orchestrator owns fetching, locking, further workspace preparation, inspection, and retention.
Dirty worktrees include staged/unstaged changes, untracked files, and ignored files. Explicit --force permits discarding them; branches are preserved. Main checkouts, unrelated or mismatched worktrees, locked worktrees, symlink targets, and stale registrations remain protected. Repeated removal succeeds with the distinct status already_absent.
With --json, stdout is one schema-version-1 object and diagnostics go to stderr. Success, including already_absent, exits 0. Errors and partial creation failures exit 1 with stable codes and surviving-resource details. The full contract lists all fields and error codes.
Install without replacing your daily command
git clone --branch v0.2.0 --depth 1 https://github.com/EdoMon93/mkwt.git mkwt-v0.2.0
cd mkwt-v0.2.0
MKWT_INSTALL_DIR="$PWD/release-bin" ./setup.sh
./release-bin/mkwt --version --jsonThe attached standalone mkwt executable embeds the source revision and can also be installed to a chosen directory. Its version metadata remains available without a source checkout. Install from the tagged Git checkout when using setup.sh; source archives without Git metadata report an unknown revision.
Validation
Bash syntax and diff checks passed. All 23 automation integration tests and the four existing VS Code/config tests passed. Tests cover same-SHA detached worktrees, closed stdin, missing/invalid configuration and commits, path collisions including races, failures after registration and during partial-clone checkout without fetching, safe/forced/repeated removal, branch preservation, wrong-repository and replaced-Gitfile refusal, path escaping, bare and SHA-256 repositories, legacy reserved branch names/VS Code, and installed revision metadata after source removal. GitHub Actions runs both suites.
Rollback
The existing v0.1.0 tag is unchanged. From a clean mkwt source checkout:
git fetch origin tag v0.1.0
git switch --detach v0.1.0
./setup.sh