Search docs

Guides

Creating projects

Generate a Python project from an interactive or explicit configuration.

4. Your first project#

Option A — Backend API (FastAPI)#

bash
spawn create
text
Project Name: my-api

? Choose a template (Use arrow keys)
 » Backend API
   CLI Application
   ...

? Choose a framework (Use arrow keys)
 » fastapi
   flask
   django

? Select extras (space to toggle, enter to confirm)
 ○ ruff
 ○ pytest
 ○ docker
 ○ github-actions

? Choose a license (Use arrow keys)
 » MIT
   None

Initialize Git? [Y/n]: Y
Also generate CLAUDE.md for Claude Code? [y/N]: N
text
╭────── ✨ Project Created Successfully ──────╮
│                                              │
│  Project      my-api                         │
│  Template     Backend API                    │
│  Git          ✓ Enabled                      │
│  UV           ✓ Initialized                  │
│  Virtual Env  ✓ Created                      │
│                                              │
│  Next Steps                                  │
│    cd my-api                                 │
│    uv run uvicorn app.main:app --reload      │
│                                              │
╰──────────────────────────────────────────────╯
bash
cd my-api
uv run uvicorn app.main:app --reload
# GET http://localhost:8000/ → {"status": "running"}

Option B — CLI Application (Typer, utility)#

bash
spawn create
text
Project Name: my-cli

? Choose a template (Use arrow keys)
   Backend API
 » CLI Application
   ...

? Choose CLI Type (Use arrow keys)
 » utility
   interactive

? Choose a framework (Use arrow keys)
 » typer
   click
   argparse

? Select extras (space to toggle, enter to confirm)
 ○ ruff
 ○ pytest
 ○ github-actions

? Choose a license (Use arrow keys)
 » MIT
   None

Initialize Git? [Y/n]: Y
Also generate CLAUDE.md for Claude Code? [y/N]: N
bash
cd my-cli
uv run python -m src.main hello

Option C — Non-interactive (zero prompts)#

bash
spawn create --name my-api --template backend-api --framework fastapi --extras ruff,pytest --license mit --no-git

Or from a JSON config file:

json
{
  "name": "my-api",
  "template": "backend-api",
  "framework": "fastapi",
  "extras": ["ruff", "pytest"],
  "license": "mit",
  "git": false,
  "uv": true
}
bash
spawn create --config spawn.json

Use --dry-run to validate and print the config without creating any files:

bash
spawn create --name my-api --template backend-api --dry-run
# ✓ Config valid
# ProjectConfig(name='my-api', template='backend-api', ...)
ESC