✅ spec-kitty init IS fully non-interactive when all required options are provided via command-line arguments.
spec-kitty init <project-name> \
--ai <agents> \
--script <type> \
--mission <mission> \
[--force] \
[--no-git] \
[--ignore-agent-tools]
Option A: New project directory
spec-kitty init my-project
Option B: Current directory
spec-kitty init .
# or
spec-kitty init --here
--ai)Syntax: Comma-separated list of agent keys (no spaces)
--ai codex
--ai claude,codex
--ai claude,codex,cursor,windsurf
--ai copilot,gemini,qwen
Valid agent keys:
| Key | Agent Name |
|—–|————|
| codex | Codex CLI (OpenAI) |
| claude | Claude Code |
| gemini | Gemini CLI |
| cursor | Cursor |
| qwen | Qwen Code |
| opencode | opencode |
| windsurf | Windsurf |
| kilocode | Kilo Code |
| auggie | Auggie CLI (Augment Code) |
| roo | Roo Code |
| copilot | GitHub Copilot |
| q | Amazon Q Developer CLI |
Case-sensitive: Use lowercase exactly as shown
--script)Valid values: sh or ps
--script sh # POSIX shell (bash/zsh) - for Mac/Linux
--script ps # PowerShell - for Windows
Auto-detection: If omitted and not TTY:
pssh--mission)Valid values: software-dev or research
--mission software-dev # Software Dev Kitty (default)
--mission research # Deep Research Kitty
Auto-selection: If omitted and not TTY, defaults to software-dev
| Flag | Purpose | Default |
|---|---|---|
--force |
Skip confirmation when directory not empty | Off (will prompt) |
--no-git |
Skip git repository initialization | Off (initializes git) |
--ignore-agent-tools |
Skip verification that agent CLIs are installed | Off (checks tools) |
--skip-tls |
Skip SSL/TLS verification (not recommended) | Off |
--debug |
Show verbose diagnostic output | Off |
--github-token |
GitHub API token for template download | Uses GH_TOKEN env var |
spec-kitty init my-project \
--ai codex \
--script sh \
--mission software-dev
spec-kitty init . \
--ai claude,codex,cursor \
--script sh \
--mission research \
--force
spec-kitty init --here \
--ai windsurf \
--script sh \
--mission software-dev \
--force
# In non-interactive environment (CI/CD):
spec-kitty init my-project --ai codex
# Auto-selects: --script sh (or ps on Windows), --mission software-dev
spec-kitty init . \
--ai claude \
--script sh \
--mission software-dev \
--force \
--ignore-agent-tools \
--no-git
spec-kitty init my-project \
--ai codex,claude,gemini,cursor,qwen,opencode,windsurf,kilocode,auggie,roo,copilot,q \
--script sh \
--mission software-dev
Triggered when:
--ai, --script, or --mission optionsPresents:
--force)Triggered when:
Behavior:
--force missing and dir not empty)# GitHub Actions example
- name: Initialize Spec Kitty
run: |
spec-kitty init . \
--ai codex \
--script sh \
--mission software-dev \
--force \
--no-git
# Docker/script example
#!/bin/bash
spec-kitty init /app/project \
--ai claude,codex \
--script sh \
--mission software-dev \
--ignore-agent-tools
When you specify agents with --ai, spec-kitty creates:
--ai codex:.codex/prompts/spec-kitty.*.md (13 command files).kittify/AGENTS.md (auto-loaded by Codex)--ai claude:.claude/commands/spec-kitty.*.md (13 command files).kittify/AGENTS.mdCLAUDE.md → symlink to .kittify/AGENTS.md--ai cursor:.cursor/commands/spec-kitty.*.md (13 command files).kittify/AGENTS.md.cursorrules → symlink to .kittify/AGENTS.md (legacy).cursor/rules/AGENTS.md → symlink to .kittify/AGENTS.md (modern)--ai windsurf:.windsurf/workflows/spec-kitty.*.md (13 workflow files).kittify/AGENTS.md.windsurfrules → symlink to .kittify/AGENTS.md (legacy).windsurf/rules/AGENTS.md → symlink to .kittify/AGENTS.md (modern)--ai roo:.roo/commands/spec-kitty.*.md (13 command files).kittify/AGENTS.md.roorules → symlink to .kittify/AGENTS.md (legacy).roo/rules/AGENTS.md → symlink to .kittify/AGENTS.md (modern)--ai gemini:.gemini/commands/spec-kitty.*.toml (13 command files in TOML format).kittify/AGENTS.mdGEMINI.md → symlink to .kittify/AGENTS.md--ai copilot:.github/prompts/spec-kitty.*.prompt.md (13 prompt files).kittify/AGENTS.md.github/copilot-instructions.md → symlink to .kittify/AGENTS.md--ai kilocode:.kilocode/workflows/spec-kitty.*.md (13 workflow files).kittify/AGENTS.md.kilocoderules → symlink to .kittify/AGENTS.md--ai opencode:.opencode/command/spec-kitty.*.md (13 command files).kittify/AGENTS.md--ai auggie:.augment/commands/spec-kitty.*.md (13 command files).kittify/AGENTS.md.augmentrules → symlink to .kittify/AGENTS.md (assumed)--ai qwen:.qwen/commands/spec-kitty.*.toml (13 command files in TOML format).kittify/AGENTS.md--ai q:.amazonq/prompts/spec-kitty.*.md (13 prompt files).kittify/AGENTS.md.kittify/ directory structure.kittify/AGENTS.md (master copy).kittify/templates/ (command templates).kittify/scripts/ (helper scripts).kittify/memory/ (for constitution, etc.)All agent-specific context files are symlinks to .kittify/AGENTS.md:
ls -l CLAUDE.md
# lrwxr-xr-x CLAUDE.md -> .kittify/AGENTS.md
Benefit: Single source of truth, updates to AGENTS.md instantly affect all agents
All agent-specific context files are copies of .kittify/AGENTS.md:
ls CLAUDE.md
# -rw-r--r-- CLAUDE.md
Tradeoff: Multiple copies, need to update each if editing manually
Recommended: Edit .kittify/AGENTS.md and run spec-kitty init --here --force to refresh
After non-interactive init, verify with:
# Check what was created
ls -la | grep -E "^(l|-).*AGENTS|rules$"
# Check command files for specific agent
ls .codex/prompts/ # Codex
ls .claude/commands/ # Claude
ls .cursor/commands/ # Cursor
ls .gemini/commands/ # Gemini (TOML)
# ERROR
spec-kitty init proj --ai CODEX
# CORRECT (lowercase)
spec-kitty init proj --ai codex
Valid keys are lowercase: codex, claude, gemini, cursor, qwen, opencode, windsurf, kilocode, auggie, roo, copilot, q
# ERROR
spec-kitty init proj --script bash
# CORRECT
spec-kitty init proj --script sh
Valid values: sh or ps
# ERROR
spec-kitty init proj --mission dev
# CORRECT
spec-kitty init proj --mission software-dev
Valid values: software-dev or research
This happens when initializing in non-empty directory without --force:
# Add --force to skip prompt
spec-kitty init . --ai codex --force
spec-kitty init my-project --ai codex
spec-kitty init my-project \
--ai codex,claude,cursor \
--script sh \
--mission research \
--force \
--no-git \
--ignore-agent-tools \
--debug
spec-kitty init . --ai codex --force
# or
spec-kitty init --here --ai codex --force
Can also be set via environment:
GH_TOKEN or GITHUB_TOKEN - GitHub API token (instead of --github-token)SPECIFY_TEMPLATE_REPO - Override template source (e.g., myorg/custom-templates)| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error (invalid args, missing tools, directory conflict, etc.) |
Use in scripts:
if spec-kitty init my-project --ai codex --script sh; then
echo "Init succeeded"
else
echo "Init failed with code $?"
fi
#!/bin/bash
# Automated project setup script
PROJECT_NAME="$1"
AI_AGENTS="${2:-codex}" # Default to codex
spec-kitty init "$PROJECT_NAME" \
--ai "$AI_AGENTS" \
--script sh \
--mission software-dev \
--ignore-agent-tools || exit 1
cd "$PROJECT_NAME"
echo "Project initialized successfully!"
Usage:
./setup-project.sh my-new-project codex
./setup-project.sh another-project "claude,codex,cursor"