Overview
Thespecify init command bootstraps a new project with the GitHub Spec Kit framework. It downloads the latest template from the Spec Kit repository, extracts it to your project directory, and configures it for your chosen AI assistant.
Usage
Arguments
Name for your new project directory. Use
. or --here to initialize in the current directory.Options
AI Assistant Configuration
AI assistant to use for the project. Available options:
claude— Claude Code CLIgemini— Gemini CLIcopilot— GitHub Copilot (default)cursor-agent— Cursor CLIqwen— Qwen Code CLIopencode— opencode CLIcodex— Codex CLIwindsurf— Windsurf IDEkilocode— Kilo Code IDEauggie— Auggie CLIcodebuddy— CodeBuddy CLIqodercli— Qoder CLIq— Amazon Q Developer CLIamp— Amp CLIshai— SHAI CLIagy— Antigravity IDEbob— IBM Bob IDEroo— Roo Code IDEgeneric— Custom agent (requires--ai-commands-dir)
Custom directory for agent command files. Required when using
--ai generic. Example: .myagent/commands/Install Prompt.MD templates as agent skills following the agentskills.io specification. Skills are installed to the agent-specific skills directory (e.g.,
.claude/skills/ for Claude).When enabled:- Command templates are converted to skills with enhanced descriptions
- Skills include metadata following agentskills.io format
- On new projects, extracted command files are removed (skills replace commands)
- On existing projects (
--here), existing commands are preserved
--ai to be specified.Location Options
Initialize the project in the current directory instead of creating a new directory. Template files will be merged with existing content.If the current directory is not empty, you’ll be prompted for confirmation unless
--force is specified.Skip confirmation when using
--here in a non-empty directory. Template files will overwrite existing files with the same names.Script Configuration
Script type to use:
sh— POSIX Shell (bash/zsh) for Unix-like systemsps— PowerShell for Windows
ps on Windows and sh on Unix-like systems. You can choose interactively if running in a terminal.Git Configuration
Skip git repository initialization. By default, Specify will:
- Initialize a new git repository (if git is available)
- Add all files to staging
- Create an initial commit
Tool Validation
Skip checks for AI agent CLI tools. Useful when:
- The agent is IDE-based (doesn’t have a CLI)
- You want to set up the project structure before installing the agent
- You’re using a custom workflow
Network Options
Skip SSL/TLS verification when downloading templates. Not recommended except for debugging network issues in controlled environments.
GitHub personal access token for API requests. Increases rate limits from 60/hour (unauthenticated) to 5,000/hour (authenticated).Can also be set via environment variables:
GH_TOKENGITHUB_TOKEN
Debugging
Show verbose diagnostic output for network and extraction failures. Displays:
- Python version and platform information
- Current working directory
- Extended error messages with response bodies
- Detailed extraction logs
Examples
Basic Usage
Create a new project with interactive AI selection:Specific AI Assistant
Create a project configured for Claude Code:Initialize in Current Directory
Add Spec Kit to an existing project:Force Overwrite
Initialize in a non-empty directory without confirmation:Without Git
Skip git repository initialization:Custom Agent
Use an unsupported agent with custom command directory:With Agent Skills
Install agent skills instead of command files:Custom Script Type
Force a specific script type:With Authentication
Use a GitHub token for higher rate limits:Debug Mode
Troubleshoot initialization issues:What Happens During Initialization
Theinit command performs the following steps:
- Tool Checks — Verifies git is available (unless
--no-git) - AI Selection — Prompts for AI assistant if not specified
- Script Selection — Chooses script type based on platform
- Download Template — Fetches the latest release from GitHub
- Extract Files — Unpacks template to project directory
- Configure Agent — Sets up AI assistant-specific files
- Set Permissions — Makes scripts executable (Unix-like systems)
- Initialize Constitution — Copies constitution template to memory
- Install Skills — Converts commands to skills (if
--ai-skills) - Initialize Git — Creates repository and initial commit (unless
--no-git)
Post-Initialization
After successful initialization, you’ll see:- Success Summary — Tree view of completed steps
- Security Notice — Reminder about agent folder credentials
- Next Steps — Suggested workflow commands
- Enhancement Commands — Optional quality improvement tools
Next Steps Example
Troubleshooting
Rate Limiting
If you encounter rate limit errors:Agent CLI Not Found
If you see an agent detection error:- Install the required CLI tool
- Use
--ignore-agent-toolsto skip the check
Directory Already Exists
If the project directory exists:- Choose a different project name
- Remove the existing directory
- Use
--hereto merge with current directory
Git Initialization Failed
If git initialization fails, you can initialize manually:Special Considerations
Codex CLI Setup
When using--ai codex, you must set the CODEX_HOME environment variable:
Generic Agent Setup
For generic agents, the placeholder.speckit/commands/ directory is renamed to your specified --ai-commands-dir path:
Merge Behavior with —here
When using--here in an existing directory:
- Directories are merged (not replaced)
- Files with the same name are overwritten
.vscode/settings.jsonis merged (special case)- Constitution file is preserved if it exists
Related Commands
specify check— Verify tool installation before initspecify version— Check CLI and template versionsspecify extension add— Install extensions after init