# terminal

URL: /kida/api/terminal/
Section: terminal
Description: Kida terminal components.

Provides a FileSystemLoader for terminal component templates, and a convenience
function to create a terminal-configured Environment.

Live rendering::

    from kida.terminal import terminal_env, LiveRenderer, Spinner

    env = terminal_env()
    tpl = env.from_string(template_str, name="live")

    with LiveRenderer(tpl) as live:
        live.update(status="building")
        time.sleep(1)
        live.update(status="done")

Progressive streaming::

    from kida.terminal import terminal_env, stream_to_terminal

    stream_to_terminal(template, context, delay=0.03)

---

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

Open LLM text
(/kida/api/terminal/index.txt)

Share with AI

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

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

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

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

Module

#
`terminal`

Kida terminal components.

Provides a FileSystemLoader for terminal component templates, and a convenience
function to create a terminal-configured Environment.

Live rendering::

```
from kida.terminal import terminal_env, LiveRenderer, Spinner

env = terminal_env()
tpl = env.from_string(template_str, name="live")

with LiveRenderer(tpl) as live:
    live.update(status="building")
    time.sleep(1)
    live.update(status="done")
```

Progressive streaming::

```
from kida.terminal import terminal_env, stream_to_terminal

stream_to_terminal(template, context, delay=0.03)
```

1Function

## Functions

`terminal_env`

1

`Environment`

▼

Create an Environment pre-configured for terminal output.

Convenience wrapper …

`def terminal_env(**kwargs) -> Environment`

Create an Environment pre-configured for terminal output.

Convenience wrapper that sets autoescape="terminal" and adds a
loader for the built-in terminal component templates.

All keyword arguments are passed to Environment, including:
ambiguous_width: Override character width for ambiguous Unicode
symbols (1=narrow, 2=wide). Auto-detected if not specified.

##### Parameters

Name
Type
Description

`**kwargs`
`—`

##### Returns

`Environment`
