questo
A library of extensible and modular CLI prompt elements
What it is and what it does
Questo is a library for building interactive CLI prompts and selections in Python. It differs from higher-level prompt libraries by exposing the underlying state machine, event loop, and rendering functions, giving you direct control over how keypresses are handled and how elements appear on screen. You provide your own event loop (typically using python-yakh for key capture), update the element's state in response to each keypress, and render the result—this architecture lets you integrate prompts seamlessly into existing terminal applications or add custom behavior without fighting against library abstractions.
The library includes two main elements: Prompt for text input with completion and cursor navigation support, and Select for single or multi-select lists with filtering and pagination. Both are built on a consistent pattern of state dataclasses, key handlers, and renderer functions. Dependencies are minimal—just python-yakh for cross-platform key input and rich for terminal rendering—making it lightweight to add to existing projects.
Use it for:
- Build interactive CLI tools that need text input or menu selection without being locked into a single prompt library's design.
- Integrate custom terminal UI elements into existing event-driven applications by controlling the render loop yourself.
- Create terminal UIs with non-standard appearance or behavior by providing custom renderer and key-handler functions.
- Add pagination and filtering to large option lists in interactive selection prompts.
- Prototype or test CLI interactions by manipulating state directly without running a full event loop.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Questo provides modular, extensible CLI prompt elements (text input and list selection) that expose internal state and rendering for full customization within your own event loop.
Yes, if you need customizable CLI prompts and are comfortable managing your own event loop. The low install friction, active maintenance, permissive license, and no known vulnerabilities make it a safe choice. Not ideal if you want a batteries-included prompt library that handles the event loop for you—consider it when you need fine-grained control over terminal interaction.
Install
questo on PyPI
pip
pip install questouv
uv add questopoetry
poetry add questoInstalling questo
Before you install
Low friction: pure Python wheel with only two runtime dependencies (python-yakh and rich). Active maintenance with recent commits and no known vulnerabilities.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install questo
from yakh import get_key
from questo import prompt
p = prompt.Prompt()
p.state = prompt.PromptState(title="Your name?")
with p.displayed():
while True:
key = get_key()
p.state = prompt.key_handler(p.state, key)
if p.state.exit or p.state.abort:
break
print(p.result)
Requires a terminal that supports raw key input; python-yakh handles platform-specific key capture.
Verify before relying
- Whether custom renderers can integrate with rich markup beyond the built-in examples shown.
- Performance characteristics when handling large option lists in Select elements.
- Exact behavior of pagination and filtering in Select with edge cases.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0.0,>=3.7.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — python-yakh, rich |
| Maintenance | actively maintained — 257 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 91,347/month — #13,519 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: questo-0.4.2-py3-none-any.whl
Keywords: python
Tags
More Terminals packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
richRich renders styled text, tables, progress…
permissive · top 100 on PyPI
coloramaColorama makes ANSI escape sequences for…
permissive · top 100 on PyPI
wcwidthMeasures the displayed width of Unicode strings…
permissive · top 1,000 on PyPI
ptyprocessRun a subprocess in a pseudo terminal (pty) and…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
beaupyBeauPy provides interactive CLI…
permissive · top 15,000 on PyPI
prompthub-pyFetches prompt templates from Prompt Hub or…
permissive · top 15,000 on PyPI
ascii-colorsUnified terminal UI library providing colored…
permissive · top 15,000 on PyPI
nxploraNX is a terminal CLI that connects to the…
unclear · top 15,000 on PyPI
dynamicpromptsGenerates varied text prompts for image…
permissive · top 15,000 on PyPI
sphinx-promptSphinx Prompt is a Sphinx extension that…
permissive · top 5,000 on PyPI
pastelPastel adds colored text output to terminal…
permissive · top 5,000 on PyPI
pickpick provides a Python library to create…
permissive · top 15,000 on PyPI
simple-colorsAdds colored and styled text output to terminal…
unclear · top 15,000 on PyPI
click-promptclick-prompt adds interactive prompts to Click…
permissive · top 15,000 on PyPI