Use this file to discover Exa products, pricing, evaluations, comparisons, use cases, agent interfaces, and technical documentation before exploring further.
Python TUI libraries build interactive interfaces that run inside a terminal, from single prompts to full-screen applications. A framework draws widgets with text characters and reads keyboard and mouse input from the terminal. These libraries let command-line tools and developer utilities offer menus, forms, and dashboards without a graphical window.
Popularity
Rich has the most monthly downloads in this comparison, at 575.1M, a count that covers all its terminal output formatting.
def read_user_variable(var_name: str, default_value, prompts=None, prefix: str = ""):
"""Prompt user for variable and return the entered value or given default.
:param str var_name: Variable of the context to query the user
:param default_value: Value that will be returned if no input happens
"""
question = (
prompts[var_name]
if prompts and var_name in prompts and prompts[var_name]
else var_name
)
while True:
variable = Prompt.ask(f"{prefix}{question}", default=default_value)
if variable is not None:
break
return variable
prompt_toolkit
Builds interactive prompts and full-screen terminal applications.
Downloads / mo
225.0M
Stars
10.6K
Last release
3.0.53
License
BSD-3-Clause
Strengths
Supports Emacs and Vi editing.Offer familiar Emacs or Vi key bindings in terminal inputs.
Uses asyncio natively.Run terminal applications on Python’s asyncio event loop.
Limitations
Pygments supplies language highlighting.Add Pygments, a syntax-highlighting library, for its ready-made language lexers.
Existing async apps need run_async.Call run_async() inside applications that already use asyncio.
def _ask_autodetect() -> bool:
"""Keyboard select: auto-detect URLs from the diff, or enter them manually.
Falls back to a y/n prompt when there's no TTY or InquirerPy is missing.
"""
if sys.stdin.isatty():
try:
from InquirerPy import inquirer
from InquirerPy.base.control import Choice
return inquirer.select(
message="How should we pick the URLs to test?",
choices=[
Choice(value=True, name="Automagic detection (based on the git diff)"),
Choice(value=False, name="Enter URLs manually"),
],
default=True,
).execute()
except Exception:
pass
return Confirm.ask(
"Auto-detect URLs to test from the git diff?", default=False
)
Blessed
Provides a well-documented interface for making terminal apps.
def ask_options(text, options):
res = inquirer.prompt(
[
inquirer.List(
"result",
carousel=True,
message=text,
choices=options,
)
], theme=inquirer.themes.load_theme_from_dict({ "List": { "selection_color": "underline", "selection_cursor": "►" } })
)
if res is None:
# Ctrl+C exit(1)
return res["result"]
FAQ
Textual suits full-screen terminal applications built from nested widgets and CSS layouts. prompt_toolkit suits interactive prompts with Emacs or Vi key bindings. Questionary suits command-line tools that need a few user prompts.
Rich renders rich text, tables, progress bars, syntax highlighting, and Markdown in the terminal.
Textual builds terminal interfaces from nested widgets arranged in vertical, horizontal, and grid layouts. Its message handlers can call asynchronous APIs.
Questionary builds command-line user prompts in Python.
For coding agents
Found your TUI library? Help your agent use it.
Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.