Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

lazy-cuh

lazy-cuh is an experimental Python framework for building lazygit-style terminal user interfaces on top of Textual.

It provides reusable building blocks for terminal apps that need pane-based navigation, compact key hints, modal flows, and list/tree content that behaves consistently.

Status

Pre-alpha. The package is useful for experimentation and early dogfooding, but APIs are expected to change before a stable release.

Features

  • bordered panels with numbered titles and tabs
  • vim-like item navigation and optional line numbers
  • reusable list, tree, text, and option-style views
  • contextual keybars and expandable help hints
  • confirm, input, info, and notice models
  • action, command, and keybinding primitives
  • clear separation between app state, rendering, navigation, viewport, and Textual widget adapters

Installation

pip install lazy-cuh

Pre-release versions may need:

pip install --pre lazy-cuh

Quick Example

from rich.text import Text

import lazy_cuh as lc

items = (
    lc.core.NavigableItem(id="panels", label=Text("Composable panels and tabs")),
    lc.core.NavigableItem(id="navigation", label=Text("Vim-style item navigation")),
    lc.core.NavigableItem(id="keybars", label=Text("Context-aware keybars")),
)

view = lc.view.ListViewModel(
    items=items,
    cursor_index=1,
    spec=lc.view.ListViewSpec(
        width=60,
        line_numbers=lc.layout.LineNumberSpec(lc.layout.LineNumberMode.RELATIVE),
    ),
)

for line in view.rendered_lines():
    print(line.plain)

Examples

After installing from source, run the interactive demo:

uv run lazy-cuh-demo

Focused examples are also available:

uv run lazy-cuh-example-app-shell
uv run lazy-cuh-example-text-wrap
uv run lazy-cuh-example-help-modal
uv run lazy-cuh-example-help-keybar
uv run lazy-cuh-example-options

Documentation

The documentation lives in docs/ and is built with Astro Starlight. Start with the quick start for a minimal view, then use the app-structure guide for the recommended full-app composition path. The docs also cover lists, trees, panels, keybars, modals, and Textual adapters.

Development

For local development:

uv sync --extra dev --extra release
uv run pytest
uv run pyright
uv run ruff check .

Nix users can enter the packaged development shell with:

nix develop

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lazy_cuh-0.1.0a4.tar.gz (99.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazy_cuh-0.1.0a4-py3-none-any.whl (95.6 kB view details)

Uploaded Python 3

File details

Details for the file lazy_cuh-0.1.0a4.tar.gz.

File metadata

  • Download URL: lazy_cuh-0.1.0a4.tar.gz
  • Upload date:
  • Size: 99.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lazy_cuh-0.1.0a4.tar.gz
Algorithm Hash digest
SHA256 805ed857259a44db367fb202a67f97459903b5663e6c8ec9bd3845090dcc92f7
MD5 5e0854a1f3398407bc94cf494fe5760e
BLAKE2b-256 dbe37dec8465ef9e8d75200dc6276cdfaf555998a4e78b51fc09ecf35c0d2d8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazy_cuh-0.1.0a4.tar.gz:

Publisher: release.yml on janthmueller/lazy-cuh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lazy_cuh-0.1.0a4-py3-none-any.whl.

File metadata

  • Download URL: lazy_cuh-0.1.0a4-py3-none-any.whl
  • Upload date:
  • Size: 95.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lazy_cuh-0.1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 ea55e5f23fea4b40ba88ef7f51a61ede3c9e3d752232cc03e0b7cfeed9ebe0b7
MD5 2ddaf0a9c33d26a530ff780924dae5ee
BLAKE2b-256 fa7afe83b41ce63b0dd029c653385d6ae0c7792713533e76e132e4ae1fe35e23

See more details on using hashes here.

Provenance

The following attestation bundles were made for lazy_cuh-0.1.0a4-py3-none-any.whl:

Publisher: release.yml on janthmueller/lazy-cuh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0a4 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page