Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ It's repetitive. It's inconsistent. And you haven't written a single line of *re

| Feature | What it does |
|---|---|
| **Intent-based templates** | Backend API (FastAPI / Flask / Django), CLI Application (Typer / Click / Argparse) |
| **Intent-based templates** | Backend API (FastAPI / Flask / Django), CLI Application (Typer / Click / Argparse), Automation Tool |
| **Extras system** | Opt-in ruff, pytest, Docker, GitHub Actions — installed and wired automatically |
| **Dependency installation** | `uv add` runs automatically with the right packages for your choices |
| **Git + uv** | Optionally runs `git init`, `uv init`, and `uv venv` |
Expand Down Expand Up @@ -90,8 +90,9 @@ Spawn rejects names with spaces or special characters, and tells you immediately
```
1 Backend API
2 CLI Application
3 Automation Tool

Choose Template [1-2]: 1
Choose Template [1-3]: 1
```

**Step 3 — Additional prompts** *(template-dependent)*
Expand Down Expand Up @@ -247,6 +248,31 @@ uv run python -m src.main greet

---

### `[3]` Automation Tool

Best for: scheduled jobs, data pipelines, reporting systems, integration automation.

```
my-automation/
├── src/
│ ├── workflows/
│ ├── tasks/
│ ├── integrations/
│ ├── utils/
│ └── main.py
├── logs/
├── tests/
├── .env.example
└── README.md
```

```bash
cd my-automation
uv run python -m src.main
```

---

## Other Commands

### `spawn doctor`
Expand Down Expand Up @@ -289,7 +315,7 @@ spawn doctor ./path/to/project

```bash
spawn version
# → Spawn v0.4.0
# → Spawn v0.5.0
```

### Publish to GitHub
Expand Down Expand Up @@ -324,7 +350,7 @@ All tests should pass. If they don't, please [open an issue](https://github.com/
- [x] **Extras system** — ruff, pytest, Docker, GitHub Actions installed automatically (v0.3.0)
- [x] **Dependency installation** — `uv add` runs automatically after generation (v0.3.0)
- [x] **CLI Application intent** — Typer, Click, Argparse with Utility/Interactive sub-types (v0.4.0)
- [ ] **Automation Tool intent** — scripting and scheduling scaffold (v0.5.0)
- [x] **Automation Tool intent** — workflow-based automation with logging, tasks, and integrations (v0.5.0)
- [ ] **AI Chatbot intent** — LLM-integrated chat app scaffold (v0.6.0)
- [ ] **AI Agent intent** — tool-calling agent scaffold (v0.7.0)
- [ ] **RAG System intent** — retrieval-augmented generation scaffold (v0.8.0)
Expand Down
6 changes: 5 additions & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Entry point: `spawn.cli.app:main` (defined in `pyproject.toml` as `[project.scri

```
src/spawn/
├── __init__.py # __version__ via importlib.metadata, fallback "0.4.0"
├── __init__.py # __version__ via importlib.metadata, fallback "0.5.0"
├── cli/
│ ├── app.py # Typer app: create, version, doctor commands
│ └── prompts.py # Interactive prompts; derives menu from registry
Expand All @@ -47,6 +47,9 @@ src/spawn/
│ ├── cli_application/
│ │ ├── __init__.py # CLITemplate (dispatches by framework + cli_type)
│ │ └── content.py # All framework × cli_type content strings
│ ├── automation/
│ │ ├── __init__.py # AutomationTemplate
│ │ └── content.py # Workflow, task, logger, test, README content strings
│ ├── python_script/ # Reserved — not in active menu
│ ├── data_science/ # Reserved — not in active menu
│ └── ml_project/ # Reserved — not in active menu
Expand Down Expand Up @@ -133,6 +136,7 @@ Each template lives in its own subdirectory with an `__init__.py` (class) and `c
|---|---|---|---|
| `backend-api` | `BackendAPITemplate` | fastapi, flask, django | ruff, pytest, docker, github-actions |
| `cli` | `CLITemplate` | typer, click, argparse | ruff, pytest, github-actions |
| `automation` | `AutomationTemplate` | none | ruff, pytest, github-actions |

`get_template(slug)` returns a default-constructed instance. `instantiate_template(config)` forwards `framework`, `extras`, and `cli_type` from `ProjectConfig` to templates whose constructors accept them, using signature introspection.

Expand Down
23 changes: 23 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,29 @@
All notable changes to Spawn are documented here.
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## v0.5.0 — 2026

### New Features

- **Automation Tool intent** — generates a workflow-based automation project
with `src/workflows/`, `src/tasks/`, `src/integrations/`, `src/utils/`,
`logs/`, and a working example that runs immediately
- **Logging out of the box** — every generated project includes a `setup_logger()`
utility and writes to `logs/app.log` with no manual configuration required
- **Working example workflow** — `load_sample_data → generate_report → log output`
runs on first `uv run python -m src.main` without modification
- **`.env.example`** — pre-wired environment config template included in every
generated project
- **Automation extras** — opt-in `ruff`, `pytest`, `github-actions`;
installed and wired automatically

### Internal

- Registry expanded to three active templates: `backend-api`, `cli`, `automation`
- No new fields added to `ProjectConfig` or `TemplateMetadata` — automation
uses the existing `extras` field; prompt flow adapts automatically via guards
- Version bumped to `0.5.0`

## v0.4.0 — June 2026

### New Features
Expand Down
70 changes: 67 additions & 3 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Creates a new project directory from a template, writes starter files, installs
| Step | Prompt | When shown |
|---|---|---|
| 1 | `Project Name` | Always |
| 2 | Template list → `Choose Template [1-2]` | Always |
| 2 | Template list → `Choose Template [1-3]` | Always |
| 3 | CLI Type list → `Choose CLI Type [1-2]` | Only for CLI Application |
| 4 | Framework list → `Choose Framework [1-N]` | Only for templates with frameworks |
| 5 | Extras list → `Extras` | Only for templates with extras |
Expand Down Expand Up @@ -48,6 +48,7 @@ Templates are displayed as a numbered list. The current registry order:
|---|---|---|
| `1` | `backend-api` | Backend API — production-ready FastAPI, Flask, or Django |
| `2` | `cli` | CLI Application — Typer, Click, or Argparse with Utility or Interactive type |
| `3` | `automation` | Automation Tool — workflow-based automation with logging and tasks |

**Invalid input error (exact):**
```
Expand Down Expand Up @@ -297,6 +298,69 @@ my-cli/

---

### Automation Tool intent

Automation Tool has no framework or type selection. After picking template 3,
only extras and Git are prompted.

#### Extras selection

```
1 ruff
2 pytest
3 github-actions

Enter numbers separated by commas, or press Enter to skip
Extras []:
```

| Extra | What it adds |
|---|---|
| `ruff` | Installs `ruff`; appends `[tool.ruff]` to `pyproject.toml` |
| `pytest` | Installs `pytest`; appends `[tool.pytest.ini_options]` to `pyproject.toml` |
| `github-actions` | Writes `.github/workflows/ci.yml` with ruff + pytest steps |

#### Generated project structure

```
my-automation/
├── src/
│ ├── __init__.py
│ ├── workflows/
│ │ ├── __init__.py
│ │ └── report_workflow.py
│ ├── tasks/
│ │ ├── __init__.py
│ │ ├── data_task.py
│ │ └── report_task.py
│ ├── integrations/
│ │ └── __init__.py
│ ├── utils/
│ │ ├── __init__.py
│ │ └── logger.py
│ └── main.py
├── logs/
│ └── .gitkeep
├── tests/
│ ├── __init__.py
│ └── test_automation.py
├── .env.example
├── .spawn/
│ └── meta.json
├── .gitignore
├── README.md
└── pyproject.toml
```

#### Next steps

```
cd my-automation
uv run python -m src.main
```

---

### `.spawn/meta.json`

Every generated project receives a `.spawn/meta.json` file:
Expand All @@ -305,7 +369,7 @@ Every generated project receives a `.spawn/meta.json` file:
{
"intent": "backend-api",
"framework": "fastapi",
"spawn_version": "0.4.0"
"spawn_version": "0.5.0"
}
```

Expand Down Expand Up @@ -379,7 +443,7 @@ Prints the installed package version.
**Output (exact):**

```
Spawn v0.4.0
Spawn v0.5.0
```

---
Expand Down
10 changes: 6 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ $ spawn create
```
1 Backend API
2 CLI Application
3 Automation Tool

Choose Template [1-2]: 2
Choose Template [1-3]: 2

1 utility
2 interactive
Expand Down Expand Up @@ -79,8 +80,9 @@ $ spawn create
```
1 Backend API
2 CLI Application
3 Automation Tool

Choose Template [1-2]: 1
Choose Template [1-3]: 1

1 fastapi
2 flask
Expand Down Expand Up @@ -163,7 +165,7 @@ spawn version
```

```
Spawn v0.4.0
Spawn v0.5.0
```

```bash
Expand All @@ -185,4 +187,4 @@ spawn doctor

- Learn all commands → [commands.md](commands.md)
- Understand how Spawn works → [architecture.md](architecture.md)
- See what's changed → [changelog.md](changelog.md)
- See what's changed → [changelog.md](changelog.md)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "spawn"
version = "0.4.0"
version = "0.5.0"
description = "Spawn a ready-to-use Python project in seconds"
readme = "README.md"
requires-python = ">=3.12"
Expand Down
2 changes: 1 addition & 1 deletion src/spawn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
try:
__version__ = version("spawn")
except PackageNotFoundError:
__version__ = "0.4.0"
__version__ = "0.5.0"
8 changes: 8 additions & 0 deletions src/spawn/core/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# from spawn.templates.ml_project import MLProjectTemplate
from spawn.templates.backend_api import BackendAPITemplate
from spawn.templates.cli_application import CLITemplate
from spawn.templates.automation import AutomationTemplate
from spawn.templates.base import BaseTemplate


Expand Down Expand Up @@ -45,6 +46,13 @@ class TemplateMetadata:
available_extras=["ruff", "pytest", "github-actions"],
available_cli_types=["utility", "interactive"],
),
"automation": TemplateMetadata(
slug="automation",
display_name="Automation Tool",
description="Workflow-based automation with logging, tasks, and integrations",
template_class=AutomationTemplate,
available_extras=["ruff", "pytest", "github-actions"],
),
}


Expand Down
Loading
Loading