Skip to content

CLI Reference

The specify command is the CLI tool for initializing and managing Spec Kit projects.

Commands

CommandDescription
specify initInitialize a new project from the latest template
specify checkVerify 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

ArgumentDescription
<project-name>Directory name for the new project. Use . for current directory. Optional if using --here.

Options

OptionDefaultDescription
--ai <agent>(prompt)AI assistant to configure. See supported agents.
--herefalseInitialize in current directory instead of creating a new one
--forcefalseSkip confirmation when merging into non-empty directory
--gitlab-token <token>$GL_TOKENGitLab API token for template downloads
--ai-commands-dir <path>(none)Custom commands directory (required with --ai generic)
--ai-skillsfalseInstall Prompt.MD templates as agent skills
--script <variant>shScript variant: sh (bash/zsh) or ps (PowerShell)
--no-gitfalseSkip git repository initialization
--ignore-agent-toolsfalseSkip checks for AI agent CLI tools
--skip-tlsfalseSkip SSL/TLS verification
--debugfalseEnable 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 --debug

specify check

Checks for installed tools and reports their status.

bash
specify check

Checks for: git, claude, gemini, code/code-insiders, cursor-agent, windsurf, qwen, opencode, codex, shai, qodercli

Environment Variables

VariableDescription
GL_TOKEN / GITLAB_TOKENGitLab API token. Used for template downloads and issue creation.
SPECIFY_FEATUREOverride feature detection for non-Git repos. Set to the feature directory name (e.g., 001-photo-albums).
SPECKIT_GITLAB_HOSTCustom GitLab hostname (default: gitlab.com). For self-hosted instances.
SPECKIT_GITLAB_PROJECT_IDCustom GitLab project ID (default: maistik-studio%2Ftools%2Fspec-kit). URL-encoded group/project.

Released under the MIT License.