What is Shell Proxy?
Shell Proxy is a clean command execution proxy for AI agents that solves "terminal blindness" — garbage characters, ANSI escape codes, shell init noise, and encoding issues that prevent AI agents from reading terminal output. It sits between AI agents and terminals, executing commands in a controlled environment and returning structured JSON output.
How to use Shell Proxy?
Install Shell Proxy via a one-line script (curl for Unix, irm for Windows) or build from source using Go. Use shellproxy run "<command>" to execute commands locally, or run shellproxy serve to start the MCP server over stdio. Configure behavior via CLI flags, environment variables, or a JSON config file at ~/.shellproxy.json.
Key features of Shell Proxy
- Strips ANSI escape codes and control sequences from output
- Bypasses shell init files (bash
--norc --noprofile, PowerShell -NoProfile)
- Automatically detects the best available shell (WSL on Windows, bash/sh on Unix)
- Returns structured JSON output with
exit_code, stdout, stderr, duration_ms, shell, truncated
- Supports streaming mode for line-by-line output of long-running commands
- Provides MCP tools
run_command and run_command_stream for AI agent integration
Use cases of Shell Proxy
- AI agents executing shell commands and needing clean, parseable output
- Running commands in automated workflows where ANSI codes would interfere with parsing
- Integrating shell command execution into MCP-compatible AI clients like Claude Desktop
コメント