# _init

URL: /pounce/api/_init/
Section: api
Description: ``pounce init`` — scaffold a minimal pounce project in the current directory.

Drops three files and refuses to overwrite without ``--force``:

- ``app.py`` — vanilla ASGI "hello from pounce" (no framework)
- ``pounce.toml`` — commented template of every ``ServerConfig`` default,
  generated via `build_toml_template`()
- ``.gitignore`` — the three lines every Python project needs

See ``docs/design/init-scope.md`` for why this is vanilla-only.

---

> For a complete page index, fetch /pounce/llms.txt.

Open LLM text
(/pounce/api/_init/index.txt)

Share with AI

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

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

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

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

Module

#
`_init`

`pounce init`— scaffold a minimal pounce project in the current directory.

Drops three files and refuses to overwrite without`--force`:

- `app.py`— vanilla ASGI "hello from pounce" (no framework)

- `pounce.toml` — commented template of every `ServerConfig`default,
generated via`build_toml_template`()

- `.gitignore`— the three lines every Python project needs

See`docs/design/init-scope.md`for why this is vanilla-only.

1Class2Functions

## Classes

`InitError`

1

▼

Raised when the scaffold cannot be written (e.g. file collisions).

Bases:

`Exception`

Raised when the scaffold cannot be written (e.g. file collisions).

#### Methods

Internal Methods
1

▼

`__init__`

2

▼

`def __init__(self, message: str, *, colliding: list[str] | None = None) -> None`

##### Parameters

Name
Type
Description

`message`
`—`

`colliding`
`—`

Default:`None`

## Functions

`_existing_files`

1

`list[str]`

▼

Return scaffold filenames that already exist in *directory*.

`def _existing_files(directory: Path) -> list[str]`

##### Parameters

Name
Type
Description

`directory`
`Path`

##### Returns

`list[str]`

`run_init`

2

`list[Path]`

▼

Write the scaffold into *directory*.

`def run_init(directory: Path, *, force: bool = False) -> list[Path]`

##### Parameters

Name
Type
Description

`directory`
`Path`

Target directory (must exist).

`force`
`bool`

Overwrite existing scaffold files if True.

Default:`False`

##### Returns

`list[Path]`
