pexpect-cli

Automate interactive terminal applications using persistent pexpect sessions.

25|4|Updated Jan 12, 2026
One-click install
npx skills add https://github.com/Mic92/mics-skills --skill pexpect-cli-mic92
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pexpect-cli
Source: https://github.com/Mic92/mics-skills/tree/main/skills/pexpect-cli
Command: npx skills add https://github.com/Mic92/mics-skills --skill pexpect-cli-mic92

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows for the automation of interactive terminal applications, such as SSH, database clients, or debuggers, by managing their input and output streams programmatically.

Core Features & Use Cases

  • Persistent Sessions: Maintain interactive sessions across multiple commands.
  • Programmatic Control: Send commands and receive output from child processes.
  • Use Case: Automate SSH logins and execute a series of commands on a remote server without manual intervention.

Quick Start

Start a new persistent pexpect session for automating interactive terminal applications.

Frequently Asked Questions about pexpect-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate interactive terminal applications like SSH or database clients?

You can automate interactive terminal applications by using a managed pexpect session to control their input and output streams programmatically. This maintains persistent sessions, allowing you to send commands and parse output from child processes like SSH without manual intervention.

What is the best way to execute a series of commands on a remote server without manual intervention?

The best way to execute remote commands without manual intervention is to establish a persistent pexpect session. This programmatically manages SSH logins and controls the interactive child process to execute sequential commands and parse the resulting output.

Can I maintain persistent interactive sessions across multiple commands in a script?

Yes, you can maintain persistent interactive sessions across multiple commands. The Skill manages persistent pexpect sessions, keeping the child process active so you can programmatically send sequential inputs and receive outputs throughout the script's execution.

Does pexpect work with debuggers that require user input during execution?

Yes, pexpect works with debuggers that require user input. It automates interactive terminal applications by managing persistent sessions, facilitating programmatic control over debuggers by sending input commands and parsing their output streams.

When do I need to use pexpect for terminal scripting instead of standard subprocesses?

You need to use pexpect for terminal scripting when automating interactive applications like SSH or database clients that require dynamic user input. Standard subprocesses cannot easily manage persistent interactive input and output streams, whereas pexpect maintains these sessions programmatically.