--- id: pyrepl version: "0.11.5" license: MIT X11 style license_treatment: permissive maintenance: active --- # pyrepl — A library for building flexible command line interfaces License: permissive · Maintenance: active · Downloads: 1.1M/mo ## What it is and what it does pyrepl is a readline replacement written entirely in Python, designed to provide a more interactive command-line editing experience than the standard readline library. It offers multi-line editing, incremental history search, completion with option display, and a substantial set of emacs-mode keybindings. The package includes no global state, allowing multiple independent readers to coexist without history interference, and is built to integrate into application event loops without hogging control. The library ships with a `pythoni` script that provides an enhanced Python top-level REPL. It has been actively developed since 2010 and is currently maintained, supporting Python 3.8 through 3.12 across Windows and POSIX systems. Use it for: - Building custom Python REPLs or interactive shells with readline-like editing and history - Integrating line-editing capabilities into CLI applications without external readline dependencies - Creating multi-line command editors with emacs keybindings in pure Python environments - Running Python interactively with enhanced editing via the included pythoni script - Embedding multiple independent command readers in a single application ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyrepl is a pure-Python readline-like library that provides interactive command-line editing with history, completion, and emacs-mode keybindings for building flexible CLI interfaces. Yes, if you need readline-like editing in a pure-Python CLI tool or REPL. Low install friction, no dependencies, permissive license, and active maintenance make it a straightforward choice. The lack of external system dependencies is a significant advantage for portability. Not necessary if you are satisfied with standard readline or if you need features the fact sheet does not document. ## Install pip install pyrepl uv add pyrepl poetry add pyrepl ## Installing pyrepl Before you install: Low friction install with no runtime dependencies. Actively maintained as of 2026-08-02, with recent release activity. Supports Python 3.8 through 3.12. License in practice: MIT X11 style permissive license allows use in most projects without significant restriction. Quickstart: pip install pyrepl from pyrepl.console import InteractiveConsole console = InteractiveConsole() console.interact() Requires Python 3.8 or newer. Verify before relying: - Exact scope of readline emacs-mode keybindings supported (description says 'fairly large subset' but does not enumerate) - Whether the package integrates into existing event loops or requires its own control flow - Performance characteristics with large histories or completion datasets ## Package facts - License: MIT X11 style (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags readline alternative python, interactive command line editing, python repl with history, terminal input library, emacs keybindings cli, command completion python, line editing pure python, cli-interaction, repl-enhancement [View on SkillFed](https://skillfed.io/packages/pyrepl) · [View on PyPI](https://pypi.org/project/pyrepl/)