Skip to content

Inquirer Textual

Versatile library for terminal user input in Python

Introduction

The goal of this Python library is to make user input simple, using a versatile set of prompts.

Under the hood, this library uses the sophisticated Textual TUI framework, which means you get:

  • Rich prompts
  • Inline or fullscreen prompts
  • Mouse support
  • Themes

Example

Example

The Python code for the example above:

from inquirer_textual import prompts

if __name__ == '__main__':
    result = prompts.checkbox("Planets:", choices=[
        'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'
    ])
    print(result)

With uv you can run the example out of the box:

uv run --with inquirer-textual checkbox.py

Installation

Create and activate a virtual environment (for example with uv), and then install this package:

pip install inquirer-textual

Design principles

  • Keep simple things simple: High-level prompts API for getting user input
  • Inquirer-like syntax: API similar to many other Inquirer libraries
  • Single dependency: The Textual TUI framework