Setup, checks, layout and rules, for working on this repo.
agent-worktree runs on Bun, which mise installs for it. With mise installed:
git clone https://github.com/cniska/agent-worktree.git
cd agent-worktree
mise trust && mise install
bin/agent-worktree create <name>mise installinstalls actionlint, Bun and the dependencies, and thebun installits postinstall runs calls thepreparescript, which pointscore.hooksPathat.githooks/. Only in the clone, never in a worktree, does it putagent-worktreein~/.bun/binwithbun link, so removing a worktree never leaves the command pointing at a deleted checkout. Add~/.bun/binto yourPATHif it is not there yet.bin/agent-worktree create <name>makes a task worktree and runs the repository's own.worktree-hooks/setupin it, which installs the same way without linking the CLI.bin/agent-worktreefinds Bun through mise in$MISE_DATA_DIR, or~/.local/share/misewhen that is unset, never throughXDG_DATA_HOME, so a test or command that pointsXDG_DATA_HOMEat a scratch directory still runs the CLI;scripts/source-launcher.test.ts, in the check, holds this. If you setXDG_DATA_HOMEfor your whole shell, setMISE_DATA_DIRto where mise keeps its installs..githooks/holds the commit-subject, format and no-comments gates.
bun run checkruns the lint (oxlint,oxfmt --check, and actionlint over.github/workflows/at the versionmise.tomlpins), the typecheck, knip (an export, file or dependency nothing uses) and the tests, and.githooks/pre-commit.d/checkruns it before each commit.bun run acceptanceproves the criteria inSPEC.mdthrough the CLI alone, asAGENTS.mddescribes. Each test gets 20 seconds rather than Bun's default 5, since one drives git and the CLI dozens of times and acreatewith a remote also reads and fetches it.scripts/build-compiled.sh <outfile>compiles the CLI into one executable that needs no Bun, the binary a release ships.scripts/smoke.sh <executable> <version>is the release's smoke test: the executable prints the version, then runscreateandremoveon a made-up worktree name in a scratch repository; the release runs it on each build and on each registry install.scripts/release.sh patch|minor|majorbumps the version and tags it;.github/workflows/release.ymlbuilds the tag into a GitHub release, the npm packages and a Homebrew repin, as Releasing says.bun run formatformats the TypeScript insrc/,acceptance/andscripts/with oxfmt, and the format gate runs it before each commit and stages what it changes in the staged files.npm/agent-worktreeis the npm package's launcher, a POSIX shell scriptscripts/build-npm.tsfills with the release builds;scripts/launcher.test.ts, in the check, runs it over the layoutsnpmandbuninstall, with no runtime onPATH..github/workflows/check.ymlruns the check and the acceptance suite on each push and pull request, andcommits.ymlandno-comments.ymlrun the gates.
- The plugin lives in
plugin/, apart from the repository root, so the CLI'sbin/stays off thePATHClaude Code gives a plugin. src/README.mdmaps the modules and the boundaries between them.
AGENTS.md holds the repository's rules, and SPEC.md states what must hold.