Getting started

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
richer-prompt demo

Quickstart

Every prompt follows 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.

from richer_prompt import Select

# Reusable prompt instance
prompt = Select("Select a color:", choices=["Red", "Green", "Blue"])
answer = prompt()

# One-off prompt
answer = Select.ask("Select a color:", choices=["Red", "Green", "Blue"])
select Select a color: 1. Red 2. Green 3. Blue ↑↓ to navigate · Enter to select

See more examples and other prompt types in Prompts, or jump to the API Reference for the full reference.