Skip to main content

griphTUI

Minimal and ergonomic Clack-style terminal UI primitives for Python CLIs/TUIs.

PyPI - Version PyPI - Downloads

Install

uv add griphtui

The basics

GriphTUI is heavily inspired by Clack, and follows many of the same basic principles.

You'll probably want to begin with an intro:

import griphtui as gtui

gtui.intro("The grand survey")

...after which you can employ a range of primitives to prompt the user:

# section header
gtui.section("Let's talk about trains")

# text input
gtui.text("What's your favorite train?")

# select
gtui.select(
    "Can this train drift?",
    [("Probably", "probably"), ("Definitely", "definitely")]
)

# multiselect
gtui.multiselect(
    "Which of the following applies to your favorite train?",
    [
        ("I wish it could drift", "wish", True), # toggled on by default
        ("I'm sad that it can't drift", "sadness", False),
        ("It's really nice that it can drift", "happiness", False)
    ]
)

# multiselect with rules
gtui.multiselect(
    "Pick your stack",
    [
        gtui.Option("Core", "core"),
        gtui.Option("Analytics", "analytics", requires={"core"}),
        gtui.Option("Legacy mode", "legacy", excludes={"core"}),
    ]
)

# spinners
with gtui.spinner("Preparing for ethical dilemmas...") as s:
    time.sleep(1)
    s.update("Installing drift capabilities...")
    time.sleep(1)
    s.update("Updating Terms of Use...")
    time.sleep(1)
    s.done("Drift ready")  # leaves a [+] success line on exit
    # on exception, s.fail("message") leaves a [!] error line instead

# status messages
gtui.warn("Aristoteles disliked this") # info, step, success, warn or error

Finally, wrap up with an outro:

gtui.outro("That's all, folks!")

There's a bit more available, eg. input validation. See the example if you want to dive deeper.

API

Function Purpose
intro(title) / outro(msg) / section(title) frames
note(message, title=...) multi-line block (e.g. a confirmation summary)
text(label, default="") single-line input
password(label, mask="·") masked input; mask="" hides length entirely
confirm(label, default=True) y/n prompt
select(label, options) single-choice picker; Option(..., disabled=True) skips navigation
multiselect(label, options) multi-choice picker with optional requires / excludes rules; Option(..., disabled=True) is un-toggleable
spinner(label) threaded spinner context manager; .done() / .fail() leave a final status line
info / step / success / warn / error prefixed status lines

All prompts accept an optional console= kwarg if you want to inject your own Rich Console, and an optional description= that prints a dim line under the label.

When multiselect() rules are used, referenced option values must be unique.

Platforms

Linux, macOS, and Windows (uses msvcrt for raw input on Windows, termios/tty elsewhere).

Metadata

Release files for griphtui 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for griphtui 0.3.1
File Size Uploaded
griphtui-0.3.1.tar.gz 31.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for griphtui 0.3.1
File Interpreter ABI Platform
griphtui-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 55.7 kB

Release files / griphtui-0.3.1.tar.gz

Download URL griphtui-0.3.1.tar.gz
Size 31.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f9472db85f62e3051b5159b08d6bc11b72c63fd41c934b00e08ea8a0f76a710f
BLAKE2b-256 checksum
How to use checksums
c8bf7114d6ebded9c5bf68e7350cb27a02665d0ade56e3f26d48b350bf225772
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / griphtui-0.3.1-py3-none-any.whl

Download URL griphtui-0.3.1-py3-none-any.whl
Size 24.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
82db94d7afb10730d678d8d52f0faad90ac9160cf4291e1009fdcc3816198771
BLAKE2b-256 checksum
How to use checksums
f2f25edc33a145e4d081247fdded134874d490a06ae0215b77084b3b8dabf69f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.1

2 release 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