# templates

URL: /milo-cli/api/milo/templates/
Section: milo
Description: Built-in templates and template environment factory.

---

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

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

Share with AI

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

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

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

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

Module

#
`templates`

Built-in templates and template environment factory.

1Function

## Functions

`get_env`

3

`Any`

▼

Create a kida Environment with the built-in template loader.

**Returns a kida …

`def get_env(*, theme: dict | None = None, enable_capture: bool = False, **kwargs: Any) -> Any`

Create a kida Environment with the built-in template loader.

Returns a kida Environment with a chained loader:
user templates -> milo built-in templates -> kida components.

##### Parameters

Name
Type
Description

`theme`
`dict | None`

Optional dict of`{name: ThemeStyle}` overrides. When autoescape is `"terminal"` (the default), a `style` filter and `theme`global are registered automatically. Pass a custom dict to override the default palette.

Default:`None`

`enable_capture`
`bool`

Forward to kida as`enable_capture`. When `True`, renders made under :func:`kida.captured_render` populate a :class:`~kida.RenderCapture` exposing per-block output, content keys, and changed-from data — the building blocks for :class:`~kida.FreezeCache` / :class:`~kida.RenderManifest` static site flows. Off by default to keep compile cost identical to kida's own default. **kwargs: Forwarded to `kida.Environment`.

Default:`False`

`**kwargs`
`Any`

##### Returns

`Any`
