$npx skillfedfor your agent

pexpect

Pexpect allows easy control of interactive console applications.

With conditionsPyPI Software DevelopmentReleased Nov 2023200.8M downloads / moISC licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pexpect-4.9.0-py2.py3-none-any.whl
v4.9.0 · released 2023-11-25 · 1 runtime deps: ptyprocess

Yes, if you need to automate interactive console applications on Unix-like systems. Pexpect is stable, widely used (top 1000 on PyPI), has no known vulnerabilities, and carries a permissive license. The aging maintenance status is a minor concern but not a blocker for established use cases; monitor the repository if you depend on active development.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Unix-like system (Linux, macOS, BSD) for full functionality; pty module is not available on Windows, though some features (pattern matching on file descriptors) work there.
  • Low install friction with a single pure-Python runtime dependency (ptyprocess).
  • Maintenance status is aging—last release was in 2023 and no commits since April 2025—but the package is marked Production/Stable and remains actively used across the ecosystem.

License · maintenance · safety

ISC license (permissive) — Licensed under the ISC License (permissive), which allows commercial and private use with minimal restrictions, making it safe to incorporate into proprietary projects.

last release 2023-11-25 (993 days) · last repo commit 2025-04-11 · 2,847 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 200,755,644 downloads/mo, #206 on PyPI

Verify before relying

pip install pexpect

import pexpect
child = pexpect.spawn('ssh user@host')
child.expect('password:')
child.sendline('mypassword')
child.interact()
  • Whether the aging maintenance status (last release Nov 2023, no commits since Apr 2025) signals planned maintenance or abandonment.
  • Current compatibility with modern Python versions beyond what classifiers indicate.
Same gist for agents: .md · .json

What it is and what it does

Pexpect is a pure-Python library that lets you spawn child processes (like ssh, ftp, or telnet) and interact with them programmatically as if you were typing at a terminal. You send commands, wait for expected patterns in the output, and respond dynamically—all from Python code. It's modeled after Don Libes' Expect tool but written entirely in Python.

The package is typically used to automate interactive applications, duplicate software installations across servers, run automated tests against interactive tools, or handle any scenario where you need to script interaction with a program that expects human input. Its main dependency is ptyprocess, a lightweight wrapper around Unix pseudo-terminals. Most features require a Unix-like system (Linux, macOS, BSD); Windows support is partial.

Use it for

  • Automate SSH logins and remote command execution with password or key-based authentication.
  • Script FTP or SFTP file transfers that require interactive authentication.
  • Run automated testing against interactive CLI tools or setup wizards.
  • Duplicate software package installations across multiple servers by automating interactive setup prompts.
  • Control telnet or other legacy interactive protocols from Python without manual intervention.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to automate interactive console applications on Unix-like systems.

Pexpect is stable, widely used (top 1000 on PyPI), has no known vulnerabilities, and carries a permissive license. The aging maintenance status is a minor concern but not a blocker for established use cases; monitor the repository if you depend on active development.

Install

pexpect on PyPI

Before you install

Low install friction with a single pure-Python runtime dependency (ptyprocess). Maintenance status is aging—last release was in 2023 and no commits since April 2025—but the package is marked Production/Stable and remains actively used across the ecosystem.

Requires Unix-like system (Linux, macOS, BSD) for full functionality; pty module is not available on Windows, though some features (pattern matching on file descriptors) work there.

License in practice

Licensed under the ISC License (permissive), which allows commercial and private use with minimal restrictions, making it safe to incorporate into proprietary projects.

Quickstart

pip install pexpect

import pexpect
child = pexpect.spawn('ssh user@host')
child.expect('password:')
child.sendline('mypassword')
child.interact()

Verify before relying

  • Whether the aging maintenance status (last release Nov 2023, no commits since Apr 2025) signals planned maintenance or abandonment.
  • Current compatibility with modern Python versions beyond what classifiers indicate.

Package facts

LicenseISC license permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
ptyprocess
MaintenanceAging 993 days since the last release
Last repo commit
First released
Downloads200,755,644 / month, #206 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: ISC License (ISCL)Operating System :: MacOS :: MacOS XOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTopic :: SystemTopic :: System :: Archiving :: PackagingTopic :: System :: Installation/SetupTopic :: System :: ShellsTopic :: System :: Software DistributionTopic :: Terminals

Evidence: pexpect-4.9.0-py2.py3-none-any.whl

Tags

Capabilities
automate interactive terminal applicationscontrol child processes with expect patternsssh ftp telnet automationinteractive console application controlspawn and respond to subprocess outputterminal interaction automationexpect-like pattern matching
Topics
terminal-automationsubprocess-controlexpect-pattern-matching

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 › “automate interactive terminal applications”

  • pexpectPexpect spawns and controls interactive console applications by…
  • ptyprocessRun a subprocess in a pseudo terminal (pty) and interact with its…
  • curtsiesCurtsies provides a Python library for building interactive terminal…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

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.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

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.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

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.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

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.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

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.

permissive licensepure Python
323.3Mdownloads / mo

See also delegator.py · paramiko-expect · pexpect-serial · ptyprocess · pywinpty · types-pexpect · pairmux · mozprocess · dockerpty · tendo