shell-use

Automate terminal sessions and assert outputs against expected results.

221|20|Updated Jan 25, 2024
One-click install
npx skills add https://github.com/microsoft/shell-use --skill shell-use
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shell-use
Source: https://github.com/microsoft/shell-use/tree/main
Command: npx skills add https://github.com/microsoft/shell-use --skill shell-use

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires alacritty_terminal, anyhow, clap, dirs, flate2, interprocess, portable-pty, regex, serde, serde_json, crossterm, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill enables the control and interaction with real terminal sessions, automating tasks, inspecting states, and verifying outputs. It streamlines repetitive terminal operations and enhances the efficiency of workflows involving shell sessions.

Core Features & Use Cases

  • Shell Session Control: Spawn, inspect, and manage terminal sessions for various shells and TUI applications.
  • Automated Interactions: Send keystrokes, mouse inputs, and signals to sessions for automated tasks.
  • Verification: Assert expected text, colors, exit codes, and snapshots against session outputs.
  • Recording & Monitoring: Record terminal sessions for later analysis and monitor sessions live from another terminal.
  • Programmatic Access: Use Python or JavaScript libraries to drive the daemon and interact with terminal sessions programmatically.
  • Use Case: Consider automating a complex sequence of shell commands and text interactions in a test or debugging scenario.

Quick Start

Open a new terminal session and use the shell-use skill to run a command, check the result, and close the session.

Frequently Asked Questions about shell-use

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

FAQPage Schema
How do I automate terminal shell interactions and verify command outputs?

Automating terminal interaction involves spawning a real shell session, sending keystrokes and mouse inputs programmatically, and asserting expected text, colors, or exit codes against session outputs.

Can I use Python or JavaScript to control and inspect TUI applications in a terminal session?

Yes, you can use Python or JavaScript bindings to drive a terminal daemon, interact with TUI applications, send signals, and validate session states programmatically for testing or debugging.

What is the best way to record terminal sessions for later analysis during automation?

Recording terminal sessions for later analysis is achieved by capturing live shell interactions through a terminal daemon, allowing you to monitor ongoing sessions from another terminal window.

Do I need a specific terminal emulator or daemon to assert text and colors in automated shell scripts?

Yes, asserting terminal outputs requires running a background daemon alongside compatible terminal shells to accurately capture state, text, colors, and exit codes during automated interactions.

Does terminal automation support mouse inputs and keyboard signals for complex TUI workflows?

Terminal automation supports various TUI applications by handling both mouse and keyboard inputs, sending specific signals to sessions, and verifying outputs against expected results.

How to validate terminal snapshots and exit codes when automating shell commands?

Validating terminal snapshots requires asserting expected text, colors, and exit codes against active session outputs after sending automated commands and interactions to the shell.