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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lazy_cuh-0.1.0a5.tar.gz.
File metadata
- Download URL: lazy_cuh-0.1.0a5.tar.gz
- Upload date:
- Size: 104.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dc1a7347e3d4d7eae506684f4629353d9b6f5e7c085e554943a30c65bb4f902
|
|
| MD5 |
57583ccd56e5fbc732f46a7c6ec0fcc8
|
|
| BLAKE2b-256 |
2ddf68e4a4f66013e47ac695b82ddaf7743b7480456ec6eecdc2733be5978d0a
|
Provenance
The following attestation bundles were made for lazy_cuh-0.1.0a5.tar.gz:
Publisher:
release.yml on janthmueller/lazy-cuh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lazy_cuh-0.1.0a5.tar.gz -
Subject digest:
5dc1a7347e3d4d7eae506684f4629353d9b6f5e7c085e554943a30c65bb4f902 - Sigstore transparency entry: 2107120663
- Sigstore integration time:
-
Permalink:
janthmueller/lazy-cuh@1679614aa34b3fe44a417bd74d6baf8b58a0a64d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/janthmueller
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1679614aa34b3fe44a417bd74d6baf8b58a0a64d -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file lazy_cuh-0.1.0a5-py3-none-any.whl.
File metadata
- Download URL: lazy_cuh-0.1.0a5-py3-none-any.whl
- Upload date:
- Size: 100.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5cfb779d8f99492ff205014af6b9f48dfc430d4a03f8b31db848c3b744f5259
|
|
| MD5 |
79ce4845f6a320cfc838c42439f5cae3
|
|
| BLAKE2b-256 |
f613f795622b2ef87b8849061ef36821714430d1ad7147013d0bec80f84110e2
|
Provenance
The following attestation bundles were made for lazy_cuh-0.1.0a5-py3-none-any.whl:
Publisher:
release.yml on janthmueller/lazy-cuh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lazy_cuh-0.1.0a5-py3-none-any.whl -
Subject digest:
f5cfb779d8f99492ff205014af6b9f48dfc430d4a03f8b31db848c3b744f5259 - Sigstore transparency entry: 2107120712
- Sigstore integration time:
-
Permalink:
janthmueller/lazy-cuh@1679614aa34b3fe44a417bd74d6baf8b58a0a64d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/janthmueller
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1679614aa34b3fe44a417bd74d6baf8b58a0a64d -
Trigger Event:
workflow_run
-
Statement type: