skillfed

questo

A library of extensible and modular CLI prompt elements

questo v0.4.2 91.3K downloads/30d#13,519 on PyPI6
Permissive license MIT Active released

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 questo

uv

uv add questo

poetry

poetry add questo

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

CLI prompt libraryterminal input elementsinteractive CLI promptscustomizable terminal UItext input and selectionevent loop CLIterminal prompt toolkit
interactive-cliterminal-ui

More Terminals packages