Chapter 6 of 22 · about 1 min
6. Adding Spec Kit to a project
A brand-new project
specify init users-microservice- creates a new folder called users-microservice
- asks: Which AI agent? Which script type?
- or pass --integration and --script
- hidden: names start with "."
An existing project
specify init --here- adds Spec Kit files to your project folder
- files may be merged/overwritten Commit your work to Git first
6.1 A brand-new project
cd ~/Documents/spec-driven-developmentspecify init users-microserviceThis creates a new folder called users-microservice. It will ask you:
- Which AI agent? (Copilot, Claude, Gemini, Cursor, Codex, ...). Use the arrow keys and press Enter.
- Which script type?
sh(Mac/Linux),ps(PowerShell, Windows), orpy(Python).
You can skip the questions by passing flags:
specify init users-microservice --integration copilot --script shThen:
cd users-microservicels -a # the folders start with "." so they are hidden without -a6.2 An existing project (brownfield)
Go into your project folder and initialize here:
cd users-appspecify init --here(Many tutorials, including your course, use specify init ., which does the same thing.)
It warns: "Current directory is not empty… files may be merged/overwritten. Continue?" Type y.
Commit your work to Git first so you can undo anything unexpected.
Useful flags:
--forceskips the "not empty" confirmation--non-interactivemeans no prompts at all (for CI or scripts)--integration claude(or another agent) picks the agent up front
6.3 Switching or adding AI agents later
specify integration list # what's availablespecify integration install claude # add another agentspecify integration use claude # make it the defaultspecify integration switch cursor # replace the default with anotherspecify integration status # what's installed6.4 Extensions (optional add-ons)
Spec Kit's core stays small, and extras come as extensions. Your course installs the Git extension, which automatically creates and switches to a Git branch for each feature:
specify extension add gitspecify extension list(The official docs also mention bundled extensions such as bug and assess, plus specify extension search to discover more.)