prompt_toolkit
Library for building powerful interactive command lines in Python
Decision gist · record as of 2026-08-14
Yes. prompt_toolkit is production-stable, actively maintained, has minimal install friction, carries a permissive license, and is a top-1000 package with no known vulnerabilities. Install it if you need to build an interactive command-line application beyond what the standard library's input() offers.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: single pure-Python runtime dependency (wcwidth), wheel distribution available, actively maintained with a release 19 days ago, and marked production-stable.
License · maintenance · safety
permissive license (permissive) — Permissive BSD license allows commercial and private use with minimal restrictions.
last release 2026-07-26 (19 days) · last repo commit 2026-07-26 · 10,552 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 235,750,388 downloads/mo, #170 on PyPI
Alternatives
Verify before relying
pip install prompt_toolkit
from prompt_toolkit import prompt
answer = prompt('Give me some input: ')
print('You said: %s' % answer)- Whether Pygments is an optional or required dependency (described as a dependency but not listed in runtime deps).
- Performance characteristics under heavy concurrent use or with very large input buffers.
What it is and what it does
prompt_toolkit is a pure-Python library for building interactive command-line interfaces with rich input handling. It provides syntax highlighting, multi-line editing, code completion, and Vi/Emacs key bindings—functioning as a modern replacement for GNU readline while offering significantly more features. The library handles Unicode and wide characters well, supports mouse input, auto-suggestions, and bracketed paste, and runs on Linux, macOS, FreeBSD, OpenBSD, and Windows.
Developers use it to build interactive shells, REPLs, and command-line tools that need sophisticated input editing and user feedback. It has minimal dependencies (only wcwidth at runtime), no global state, and is designed for composability and reusability. The library is actively maintained, production-stable, and widely adopted in the Python ecosystem.
Use it for
- Building interactive Python shells or REPLs with syntax highlighting and code completion.
- Creating command-line tools that need Vi or Emacs-style text editing and search.
- Implementing auto-suggestion and history features in terminal applications.
- Handling multi-line input with proper cursor control and text selection.
- Supporting international input, including Unicode and double-width characters in terminal UIs.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
prompt_toolkit is production-stable, actively maintained, has minimal install friction, carries a permissive license, and is a top-1000 package with no known vulnerabilities. Install it if you need to build an interactive command-line application beyond what the standard library's input() offers.
Install
prompt-toolkit on PyPI
Before you install
Low friction: single pure-Python runtime dependency (wcwidth), wheel distribution available, actively maintained with a release 19 days ago, and marked production-stable.
Requires Python 3.10 or later.
License in practice
Permissive BSD license allows commercial and private use with minimal restrictions.
Quickstart
pip install prompt_toolkit
from prompt_toolkit import prompt
answer = prompt('Give me some input: ')
print('You said: %s' % answer)
Verify before relying
- Whether Pygments is an optional or required dependency (described as a dependency but not listed in runtime deps).
- Performance characteristics under heavy concurrent use or with very large input buffers.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagewcwidth |
| Maintenance | Actively maintained 19 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 235,750,388 / month, #170 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Free Threading :: 3 - StableTopic :: Software Development |
Evidence: prompt_toolkit-3.0.53-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “command line autocomplete”
- prompt_toolkitprompt_toolkit is a Python library for building interactive…
- typed-argument-parserA typed, modern replacement for Python's argparse that uses class…
- argcompleteProvides bash and zsh tab completion for Python applications using…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also pyvim · ptpython · pyrepl · inquirerpy · fancycompleter · bpython · tabcompleter · ipython-pygments-lexers · gnureadline · Logbook