# _terminal

URL: /kida/api/environment/filters/_terminal/
Section: filters
Description: Terminal style, layout, and data-rendering filters for Kida templates.

Provides ANSI color/decoration filters, layout helpers (pad, table, tree),
and data-display filters (badge, bar, kv, syntax) for terminal-mode output.

All style filters return ``Styled`` strings. The ``make_terminal_filters``
factory produces a filter dict with closures bound to the caller's
color/unicode capabilities.

---

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

Open LLM text
(/kida/api/environment/filters/_terminal/index.txt)

Share with AI

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

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

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

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

Module

#
`environment.filters._terminal`

Terminal style, layout, and data-rendering filters for Kida templates.

Provides ANSI color/decoration filters, layout helpers (pad, table, tree),
and data-display filters (badge, bar, kv, syntax) for terminal-mode output.

All style filters return`Styled` strings. The `make_terminal_filters`
factory produces a filter dict with closures bound to the caller's
color/unicode capabilities.

1Function

## Functions

`make_terminal_filters`

3

`dict[str, Any]`

▼

Build terminal filter dict with closures bound to capability flags.

`def make_terminal_filters(color: bool = True, unicode: bool = True, color_depth: str | None = None) -> dict[str, Any]`

##### Parameters

Name
Type
Description

`color`
`bool`

Whether ANSI color codes should be emitted.

Default:`True`

`unicode`
`bool`

Whether Unicode box-drawing / icon characters are available.

Default:`True`

`color_depth`
`str | None`

Terminal color depth:`"none"`, `"basic"`, `"256"`, or `"truecolor"`. When provided, `fg()` and `bg()` degrade gracefully — e.g. RGB values are mapped to the nearest 256-color or basic-16 code when the terminal doesn't support truecolor. If None, falls back to `"truecolor"`when color is True.

Default:`None`

##### Returns

`dict[str, Any]`
