Skip to content

Reading

Appearance

Text size

Bookmarks

    No bookmarks yet. Use “Bookmark chapter” or “Bookmark this section” while reading.

    Your data

    Saved only in this browser on this device. It is not synced to other devices or sent anywhere.

    Chapter 6 of 22 · about 1 min

    6. Adding Spec Kit to a project

    Learning aidTwo starting points

    A brand-new project

    specify init users-microservicespec-driven-development/users-microservice/new
    • 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 --hereusers-app/your files+ Spec Kit files
    • adds Spec Kit files to your project folder
    • files may be merged/overwritten Commit your work to Git first
    Both paths run specify init. A new project gets its own folder; an existing one gets Spec Kit files added among yours, which is why the guide says to commit first.

    6.1 A brand-new project

    Terminal window
    cd ~/Documents/spec-driven-development
    specify init users-microservice

    This creates a new folder called users-microservice. It will ask you:

    1. Which AI agent? (Copilot, Claude, Gemini, Cursor, Codex, ...). Use the arrow keys and press Enter.
    2. Which script type? sh (Mac/Linux), ps (PowerShell, Windows), or py (Python).

    You can skip the questions by passing flags:

    Terminal window
    specify init users-microservice --integration copilot --script sh

    Then:

    Terminal window
    cd users-microservice
    ls -a # the folders start with "." so they are hidden without -a

    6.2 An existing project (brownfield)

    Go into your project folder and initialize here:

    Terminal window
    cd users-app
    specify 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:

    • --force skips the "not empty" confirmation
    • --non-interactive means 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

    Terminal window
    specify integration list # what's available
    specify integration install claude # add another agent
    specify integration use claude # make it the default
    specify integration switch cursor # replace the default with another
    specify integration status # what's installed

    6.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:

    Terminal window
    specify extension add git
    specify extension list

    (The official docs also mention bundled extensions such as bug and assess, plus specify extension search to discover more.)