Search docs

Guides

Bring your own structure

Use the interactive Custom Structure flow to describe a project layout.

Bring Your Own Structure#

None of the eight templates above fit? Custom Structure shows up as the last option in the same spawn create picker — it's not a separate command, just a different path through the same flow.

Paste any of three text formats — Unix tree output, a Markdown list, or plain indented hierarchy — and Spawn parses it, previews the detected folders and files, then creates the structure with the same Git and uv setup as every other template.

text
spawn create
# → Custom Structure
text
Paste your project structure.
Supported formats: Tree (├──/└──), Markdown list (- item), Indented hierarchy
Finish with Ctrl+D (Ctrl+Z then Enter on Windows)

app/
├── api/
├── services/
└── tests/
README.md
.gitignore
^Z

Detected
Folders : 4
Files   : 2

Initialize Git? [Y/n]: Y
Initialize uv? [Y/n]: Y
Dependencies (comma separated, optional): fastapi, uvicorn

? Optional Setup (space to toggle, enter to confirm)
 ● Ruff
 ● Pytest
 ○ Pre-commit
 ○ Dockerfile
 ○ Mypy

Additional ignore patterns (optional, comma separated): data/, *.csv

Proceed? [Y/n]: Y

What Spawn does automatically when it sees these files:

  • README.md — generated with your project name, a structure tree, and setup instructions (not left empty)
  • .gitignore — populated with Python defaults (.venv/, __pycache__/, .pytest_cache/, .mypy_cache/, .ruff_cache/, etc.) plus any patterns you added, deduplicated

The Dependencies prompt (shown only when uv is enabled) installs packages immediately via uv add.

The Optional Setup menu installs dev tools via uv add --dev and generates their config files: ruff.toml, tests/__init__.py, .pre-commit-config.yaml, Dockerfile, and/or [tool.mypy] in pyproject.toml.

Custom Structure is interactive-only in v1.2.0.

ESC