CLI Reference
The specify command is the CLI tool for initializing and managing Spec Kit projects.
Commands
| Command | Description |
|---|---|
specify init | Initialize a new project from the latest template |
specify check | Verify installed tools |
specify init
Creates a new Spec Kit project with all templates, scripts, and agent configuration.
Usage
bash
specify init <project-name> [options]Arguments
| Argument | Description |
|---|---|
<project-name> | Directory name for the new project. Use . for current directory. Optional if using --here. |
Options
| Option | Default | Description |
|---|---|---|
--ai <agent> | (prompt) | AI assistant to configure. See supported agents. |
--here | false | Initialize in current directory instead of creating a new one |
--force | false | Skip confirmation when merging into non-empty directory |
--gitlab-token <token> | $GL_TOKEN | GitLab API token for template downloads |
--ai-commands-dir <path> | (none) | Custom commands directory (required with --ai generic) |
--ai-skills | false | Install Prompt.MD templates as agent skills |
--script <variant> | sh | Script variant: sh (bash/zsh) or ps (PowerShell) |
--no-git | false | Skip git repository initialization |
--ignore-agent-tools | false | Skip checks for AI agent CLI tools |
--skip-tls | false | Skip SSL/TLS verification |
--debug | false | Enable detailed debug output |
Examples
bash
# New project with Claude (recommended)
specify init my-project --ai claude
# Existing project
specify init . --ai claude
specify init --here --ai claude
# Force merge into non-empty directory
specify init . --force --ai claude
# With GitLab token (self-hosted instances)
specify init my-project --ai claude --gitlab-token glpat-xxxxxxxxxxxx
# With agent skills
specify init my-project --ai claude --ai-skills
# PowerShell scripts for Windows
specify init my-project --ai claude --script ps
# Skip git initialization
specify init my-project --ai claude --no-git
# Custom/unsupported agent
specify init my-project --ai generic --ai-commands-dir .myagent/commands/
# Debug mode
specify init my-project --ai claude --debugspecify check
Checks for installed tools and reports their status.
bash
specify checkChecks for: git, claude, gemini, code/code-insiders, cursor-agent, windsurf, qwen, opencode, codex, shai, qodercli
Environment Variables
| Variable | Description |
|---|---|
GL_TOKEN / GITLAB_TOKEN | GitLab API token. Used for template downloads and issue creation. |
SPECIFY_FEATURE | Override feature detection for non-Git repos. Set to the feature directory name (e.g., 001-photo-albums). |
SPECKIT_GITLAB_HOST | Custom GitLab hostname (default: gitlab.com). For self-hosted instances. |
SPECKIT_GITLAB_PROJECT_ID | Custom GitLab project ID (default: maistik-studio%2Ftools%2Fspec-kit). URL-encoded group/project. |