# _scaffold

URL: /milo-cli/api/milo/_scaffold/
Section: _scaffold
Description: Project scaffolding for `milo new`.

Templates live under ``default/`` and are copied with ``{{name}}`` substitution.
No template engine — a plain ``str.replace`` keeps scaffolding zero-dep and
auditable.

---

> For a complete page index, fetch /milo-cli/llms.txt.

Open LLM text
(/milo-cli/api/milo/_scaffold/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2F_scaffold%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2F_scaffold%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2F_scaffold%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2F_scaffold%2Findex.txt)

Module

#
`_scaffold`

Project scaffolding for`milo new`.

Templates live under`default/` and are copied with `{{name}}`substitution.
No template engine — a plain`str.replace`keeps scaffolding zero-dep and
auditable.

1Class1Function

## Classes

`ScaffoldError`

0

▼

Raised when a scaffold cannot be created.

Raised when a scaffold cannot be created.

## Functions

`scaffold`

2

`Path`

▼

Create a new milo CLI project at ``target_dir / name``.

`def scaffold(name: str, target_dir: Path) -> Path`

##### Parameters

Name
Type
Description

`name`
`str`

Project name. Must match`^[a-z][a-z0-9_]*$`so it works both as a directory name and as a Python identifier.

`target_dir`
`Path`

Parent directory in which the project dir is created.

##### Returns

`Path`
