bash
Execute shell commands with persistent session support, maintaining working directory, environment variables, and shell state across multiple calls for consistent command execution.
Instructions
Execute shell commands with persistent session support. Sessions maintain working directory, environment variables, and shell state across calls. Use session_id to manage multiple independent shell sessions. Use disconnect=true to close a session. Platform: bash/sh on Unix, PowerShell/git-bash/cmd on Windows (auto-detected, best available).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Shell command to execute | |
| cwd | No | Initial working directory (only used when creating a new session) | |
| session_id | No | Session identifier for persistent shell. Default: default | |
| timeout_sec | No | Command timeout in seconds (default 120, max 600) | |
| disconnect | No | Close the shell session |