You have Spec Kit installed and want to upgrade to the latest version to get new features, bug fixes, or updated slash commands. This guide covers both upgrading the CLI tool and updating your project files.
| What to Upgrade | Command | When to Use |
|---|---|---|
| CLI Tool Only | uv tool install writekit-cli --force --from git+https://github.com/hskksk/spec-writing-kit.git |
Get latest CLI features without touching project files |
| Project Files | writekit init --here --force --ai <your-agent> |
Update slash commands, templates, and scripts in your project |
| Both | Run CLI upgrade, then project update | Recommended for major version updates |
The CLI tool (writekit) is separate from your project files. Upgrade it to get the latest features and bug fixes.
uv tool installuv tool install writekit-cli --force --from git+https://github.com/hskksk/spec-writing-kit.git
uvx commandsNo upgrade needed—uvx always fetches the latest version. Just run your commands as normal:
uvx --from git+https://github.com/hskksk/spec-writing-kit.git writekit init --here --ai copilot
writekit check
This shows installed tools and confirms the CLI is working.
When Spec Kit releases new features (like new slash commands or updated templates), you need to refresh your project’s Spec Kit files.
Running writekit init --here --force will update:
.claude/commands/, .github/prompts/, etc.).writekit/scripts/).writekit/templates/).writekit/memory/) - ⚠️ See warnings belowThese files are never touched by the upgrade—the template packages don’t even contain them:
specs/001-my-feature/spec.md, etc.) - CONFIRMED SAFEspecs/001-my-feature/plan.md, tasks.md, etc.) - CONFIRMED SAFEThe specs/ directory is completely excluded from template packages and will never be modified during upgrades.
Run this inside your project directory:
writekit init --here --force --ai <your-agent>
Replace <your-agent> with your AI assistant. Refer to this list of Supported AI Agents
Example:
writekit init --here --force --ai copilot
--force flagWithout --force, the CLI warns you and asks for confirmation:
Warning: Current directory is not empty (25 items)
Template files will be merged with existing content and may overwrite existing files
Proceed? [y/N]
With --force, it skips the confirmation and proceeds immediately.
Important: Your specs/ directory is always safe. The --force flag only affects template files (commands, scripts, templates, memory). Your feature specifications, plans, and tasks in specs/ are never included in upgrade packages and cannot be overwritten.
Known issue: writekit init --here --force currently overwrites .writekit/memory/constitution.md with the default template, erasing any customizations you made.
Workaround:
# 1. Back up your constitution before upgrading
cp .writekit/memory/constitution.md .writekit/memory/constitution-backup.md
# 2. Run the upgrade
writekit init --here --force --ai copilot
# 3. Restore your customized constitution
mv .writekit/memory/constitution-backup.md .writekit/memory/constitution.md
Or use git to restore it:
# After upgrade, restore from git history
git restore .writekit/memory/constitution.md
If you customized any templates in .writekit/templates/, the upgrade will overwrite them. Back them up first:
# Back up custom templates
cp -r .writekit/templates .writekit/templates-backup
# After upgrade, merge your changes back manually
Some IDE-based agents (like Kilo Code, Windsurf) may show duplicate slash commands after upgrading—both old and new versions appear.
Solution: Manually delete the old command files from your agent’s folder.
Example for Kilo Code:
# Navigate to the agent's commands folder
cd .kilocode/rules/
# List files and identify duplicates
ls -la
# Delete old versions (example filenames - yours may differ)
rm writekit.specify-old.md
rm writekit.plan-v1.md
Restart your IDE to refresh the command list.
# Upgrade CLI (if using persistent install)
uv tool install writekit-cli --force --from git+https://github.com/hskksk/spec-writing-kit.git
# Update project files to get new commands
writekit init --here --force --ai copilot
# Restore your constitution if customized
git restore .writekit/memory/constitution.md
# 1. Back up customizations
cp .writekit/memory/constitution.md /tmp/constitution-backup.md
cp -r .writekit/templates /tmp/templates-backup
# 2. Upgrade CLI
uv tool install writekit-cli --force --from git+https://github.com/hskksk/spec-writing-kit.git
# 3. Update project
writekit init --here --force --ai copilot
# 4. Restore customizations
mv /tmp/constitution-backup.md .writekit/memory/constitution.md
# Manually merge template changes if needed
This happens with IDE-based agents (Kilo Code, Windsurf, Roo Code, etc.).
# Find the agent folder (example: .kilocode/rules/)
cd .kilocode/rules/
# List all files
ls -la
# Delete old command files
rm writekit.old-command-name.md
# Restart your IDE
If you initialized your project with --no-git, you can still upgrade:
# Manually back up files you customized
cp .writekit/memory/constitution.md /tmp/constitution-backup.md
# Run upgrade
writekit init --here --force --ai copilot --no-git
# Restore customizations
mv /tmp/constitution-backup.md .writekit/memory/constitution.md
The --no-git flag skips git initialization but doesn’t affect file updates.
--no-git FlagThe --no-git flag tells Spec Kit to skip git repository initialization. This is useful when:
During initial setup:
writekit init my-project --ai copilot --no-git
During upgrade:
writekit init --here --force --ai copilot --no-git
--no-git does NOT do❌ Does NOT prevent file updates ❌ Does NOT skip slash command installation ❌ Does NOT affect template merging
It only skips running git init and creating the initial commit.
If you use --no-git, you’ll need to manage feature directories manually:
Set the WRITEKIT_FEATURE environment variable before using planning commands:
# Bash/Zsh
export WRITEKIT_FEATURE="001-my-feature"
# PowerShell
$env:WRITEKIT_FEATURE = "001-my-feature"
This tells Spec Kit which feature directory to use when creating specs, plans, and tasks.
Why this matters: Without git, Spec Kit can’t detect your current branch name to determine the active feature. The environment variable provides that context manually.
Cause: Agent didn’t reload the command files.
Fix:
For CLI-based agents, verify files exist:
ls -la .claude/commands/ # Claude Code
ls -la .gemini/commands/ # Gemini
ls -la .cursor/commands/ # Cursor
CODEX_HOME environment variableFix: Restore from git or backup:
# If you committed before upgrading
git restore .writekit/memory/constitution.md
# If you backed up manually
cp /tmp/constitution-backup.md .writekit/memory/constitution.md
Prevention: Always commit or back up constitution.md before upgrading.
Full warning message:
Warning: Current directory is not empty (25 items)
Template files will be merged with existing content and may overwrite existing files
Do you want to continue? [y/N]
What this means:
This warning appears when you run writekit init --here (or writekit init .) in a directory that already has files. It’s telling you:
.claude/, .writekit/, etc.), they’ll be replaced with the new versionsWhat gets overwritten:
Only Spec Kit infrastructure files:
.claude/commands/, .github/prompts/, etc.).writekit/scripts/.writekit/templates/.writekit/memory/ (including constitution)What stays untouched:
specs/ directory (specifications, plans, tasks).git/ directory and git historyHow to respond:
y and press Enter - Proceed with the merge (recommended if upgrading)n and press Enter - Cancel the operationUse --force flag - Skip this confirmation entirely:
writekit init --here --force --ai copilot
When you see this warning:
Prevention tip: Before upgrading, commit or back up your .writekit/memory/constitution.md if you customized it.
Verify the installation:
# Check installed tools
uv tool list
# Should show writekit-cli
# Verify path
which writekit
# Should point to the uv tool installation directory
If not found, reinstall:
uv tool uninstall writekit-cli
uv tool install writekit-cli --from git+https://github.com/hskksk/spec-writing-kit.git
Short answer: No, you only run writekit init once per project (or when upgrading).
Explanation:
The writekit CLI tool is used for:
writekit init to bootstrap Spec Kit in your projectwritekit init --here --force to update templates and commandswritekit check to verify tool installationOnce you’ve run writekit init, the slash commands (like /writekit.specify, /writekit.plan, etc.) are permanently installed in your project’s agent folder (.claude/, .github/prompts/, etc.). Your AI assistant reads these command files directly—no need to run writekit again.
If your agent isn’t recognizing slash commands:
Verify command files exist:
# For GitHub Copilot
ls -la .github/prompts/
# For Claude
ls -la .claude/commands/
Restart your IDE/editor completely (not just reload window)
Check you’re in the correct directory where you ran writekit init
For some agents, you may need to reload the workspace or clear cache
Related issue: If Copilot can’t open local files or uses PowerShell commands unexpectedly, this is typically an IDE context issue, not related to specify. Try:
Spec Kit follows semantic versioning for major releases. The CLI and project files are designed to be compatible within the same major version.
Best practice: Keep both CLI and project files in sync by upgrading both together during major version changes.
After upgrading:
/writekit.constitution or another command to verify everything works