Interactive prompts with Rich
Project description
richer-prompt
Beautiful, Rich-native interactive prompts for Python.
richer-prompt provides interactive terminal prompts built on top of Rich.
Visit the documentation: richer-prompt.readthedocs.io
richer-prompt is designed for applications that already use rich and want interactive
prompts that integrate naturally with the rest of their terminal output.
Instead of introducing a separate rendering system or requiring a full TUI framework,
it extends the rich experience with beautiful, composable prompts.
- Focused: provides high-quality interactive prompts without requiring a full TUI framework.
- Rich-native: designed to blend seamlessly with
rich's rendering, colors, and layout. - Beautiful by default: polished prompts inspired by Claude Code without manual styling.
- Fully typed: modern type hints for better editor support and safer code.
Installation
You can install richer-prompt from PyPI with pip or your favorite package manager:
pip install richer-prompt
uv add richer-prompt
Demo
To check if richer-prompt was installed correctly, and to see a quick demo of its capabilities,
run the following from the command line:
python -m richer_prompt
Quickstart
[!TIP] See the documentation for the full guide and API reference.
Every prompt shares the same API as
rich.prompt.Prompt:
call an instance for a reusable prompt, or use the .ask() class method for a one-off prompt.
Use Choice objects to add labels and descriptions to the options:
from richer_prompt import Choice, Select, Tabs
# One-off prompt
Select.ask("Select a color:", choices=["Red", "Green", "Blue"])
# Reusable prompt instance
confirm_action = Tabs(
"Do you want to continue?",
choices=[
Choice(value=False, label="No"),
Choice(value=True, label="Yes", description="This action cannot be undone"),
]
)
confirm_action()
richer-prompt provides four prompt types: Select, MultiSelect, Tabs, and Form.
Development
The development environment requires uv installed. Makefile has useful commands for development:
$ make help
Usage: make <COMMAND>
Commands:
setup Install dependencies and pre-commit hooks
tests Run tests with pytest
pre-commit Run pre-commit checks on all files
help Show this help message
Documentation
The documentation files are located in docs/ directory and written with Sphinx.
$ make -C docs help
Usage: make <COMMAND>
Commands:
demo Generate demo GIF
build Build Sphinx docs
serve Serve Sphinx docs locally with live reload
clean Remove build artifacts
help Show this help message
Notes:
- Generated HTML output is written to
docs/_build/html(ignore by Git). - The demo GIF records the current terminal and this is not exactly reproduced.
Project details
Release history Release notifications | RSS feed
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 richer_prompt-0.3.0.tar.gz.
File metadata
- Download URL: richer_prompt-0.3.0.tar.gz
- Upload date:
- Size: 136.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d6e68f01a39f6d8b5af4624eedd3ac20785109b63f02134deb25f4c5f6c3e45
|
|
| MD5 |
1350567dcd4877d7a4c458ae9c32d51e
|
|
| BLAKE2b-256 |
42e4d07ece6fb013148b3eb60b8d67565202b32fce0edd25fbb6a77de1507aa3
|
Provenance
The following attestation bundles were made for richer_prompt-0.3.0.tar.gz:
Publisher:
test-build-release.yaml on gabriel-msilva/richer-prompt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
richer_prompt-0.3.0.tar.gz -
Subject digest:
6d6e68f01a39f6d8b5af4624eedd3ac20785109b63f02134deb25f4c5f6c3e45 - Sigstore transparency entry: 2215596554
- Sigstore integration time:
-
Permalink:
gabriel-msilva/richer-prompt@44094baa67c117d37944c9de7a2aff505a76b1f3 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/gabriel-msilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-build-release.yaml@44094baa67c117d37944c9de7a2aff505a76b1f3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file richer_prompt-0.3.0-py3-none-any.whl.
File metadata
- Download URL: richer_prompt-0.3.0-py3-none-any.whl
- Upload date:
- Size: 23.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90b28f016714b787cef34f9fa9380314308a1a610f49cae20f926fa344636ed5
|
|
| MD5 |
219bb328aec426797b420ae66d50a727
|
|
| BLAKE2b-256 |
ff56e84780f285b7eb0eabb602870f6f9df9062f4227ce7d21e286cbda8f456b
|
Provenance
The following attestation bundles were made for richer_prompt-0.3.0-py3-none-any.whl:
Publisher:
test-build-release.yaml on gabriel-msilva/richer-prompt
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
richer_prompt-0.3.0-py3-none-any.whl -
Subject digest:
90b28f016714b787cef34f9fa9380314308a1a610f49cae20f926fa344636ed5 - Sigstore transparency entry: 2215596653
- Sigstore integration time:
-
Permalink:
gabriel-msilva/richer-prompt@44094baa67c117d37944c9de7a2aff505a76b1f3 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/gabriel-msilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-build-release.yaml@44094baa67c117d37944c9de7a2aff505a76b1f3 -
Trigger Event:
push
-
Statement type: