Documentation › Installation
Requirements
- Claude Code
- Python 3.8+ (stdlib only)
sh, which on Windows means Git Bash. Claude Code on Windows needs it anyway.- git (the review phase reads
git diff)
Install Into a Project
Clone once, then install into as many projects as you like:
git clone https://github.com/ba3a/specloop.git ~/tools/specloop
~/tools/specloop/install.sh ~/code/my-project
On Windows (cmd or PowerShell):
install.cmd C:\code\my-project
Then start a new Claude Code session in that project. Hooks are loaded at session start.
What the Installer Does
- copies the kit into
<project>/.claude/specloop/(see Files and ownership); - creates
config.jsonand tries to detect the test command (Gradle, Maven, npm, pytest, Go, Cargo, .NET); - installs the slash commands into
.claude/commands/(see Commands); - installs the subagent definitions
specloop-planner.md,specloop-implementer.md,specloop-reviewer.mdandspecloop-orchestrator.mdinto.claude/agents/, replacing the shipped ones on every run and leaving your own files there alone; - merges the hooks into
.claude/settings.jsonand leaves your other settings and hooks alone; - if the project is in a git work tree and
.gitignoreis writable, keeps a marked# >>> specloopblock in.gitignore. The block ignores the installed kit, the runtime state, the installed slash commands and the installed subagent definitions.config.jsonandoverrides/stay tracked so the team can share them. Re-running the installer rewrites the block, and--uninstallremoves it.
Installer Options
| Option | Meaning |
|---|---|
--test-command "<cmd>" |
Command that must pass to leave implement (overrides detection). |
--scope project|local |
project (default) writes hooks to .claude/settings.json, which you commit and share with your team. local writes them to .claude/settings.local.json, which stays personal. |
--prefix <p> |
Slash command prefix, default sl-. Use --prefix "" for plain /spec, /go, … |
--force |
Recreate config.json from scratch. |
--no-gitignore |
Don’t touch .gitignore. |
--uninstall [--keep-config] |
Remove specloop: kit, commands, subagent definitions, hooks. Other settings are kept. |
Updating
cd ~/tools/specloop && git pull
./install.sh ~/code/my-project
An update replaces the engine, launcher, defaults.json and the shipped phases/ and presets/. Your config.json, config.local.json and overrides/ are never touched. Instead of doing this by hand, you can let specloop check for updates and apply them.
An override written for 0.2.0 or earlier may still send a review to {run_dir}/review.md or a replan request to {run_dir}/replan.md. The gate no longer reads those files, so the phase would never pass. /sl-go prints a warning naming each such file in use. Change it to {review_file} for a review and {attempt_dir}/replan.md for a replan request (see Review attempts).
Git Worktrees
The kit is git-ignored, so a new git worktree does not get it. Run the installer once per worktree. If the project commits its hook settings, a worktree without the kit has the hooks but no run.sh: each hook fails with exit code 127, which Claude Code reports as a hook error and otherwise ignores, so nothing is enforced there.
To run a feature in a native worktree (claude -w), install the kit there and set feature.branchMode to "current" in the worktree’s config.json or config.local.json. The run then commits its steps on the worktree’s own branch and creates no specloop/ branch. See Branch.
Uninstall
~/tools/specloop/install.sh ~/code/my-project --uninstall
This removes the kit, the hooks, the slash commands and the subagent definitions in .claude/agents/ that the installer recorded in manifest.json. Your own files in .claude/commands/ and .claude/agents/ stay.
See Also
- How it works: what the installed files are and who owns them.
- Configuration: the configuration files the installer creates.
- Updates: let specloop check for and apply updates.