Deterministic execution runtime for AI coding agents.
Auto-handles prompts, truncates output, redacts secrets, and lets you undo agent changes.
Raw shell execution breaks when agents run unattended:
- Interactive prompts (
[y/N], passwords) hang the agent forever - Large compiler or test dumps blow the context window
- Secrets leak into model history
- Bad edits have no clean undo
- ANSI noise pollutes output
msh sits between the agent and the OS. It returns structured, bounded, redacted results and records what changed so you can reverse it.
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/msh-protocol/msh/main/scripts/install.sh | bashWindows
irm https://raw.githubusercontent.com/msh-protocol/msh/main/scripts/install.ps1 | iexGo
go install github.com/msh-protocol/msh/cmd/msh@latestInstall the official skill for Antigravity, Cursor, Windsurf, Claude Code, and OpenCode:
# Add to current project
npx skills add msh-protocol/msh
# Or install globally across all projects on your machine
npx skills add msh-protocol/msh -gOr configure via the msh CLI:
# Generate rules and skills in the current workspace
msh init
# Or install globally for all Antigravity projects
msh init --globalmsh git status
msh npm run build
msh pytest -vOutputs are sanitized, truncated, secret-redacted, and prompts are auto-handled.
msh --max-lines 500 git log
msh --timeout 1m python script.py
msh --pty npm testmsh undo # last run
msh undo 42 # specific run
msh undo 42 --file src/index.tsmsh guard check "rm -rf /"
msh guard list
msh --strict-workspace "cat ../../etc/passwd"msh branch create hypo-cache
msh branch run hypo-cache "npm test"
msh branch diff hypo-cache
msh branch merge hypo-cache -m "verified"
# or
msh branch abort hypo-cache{
"mcpServers": {
"msh": {
"command": "msh",
"args": ["mcp"]
}
}
}msh fleet startOpens http://localhost:9000.
Python
pip install msh-protocolfrom msh import exec
res = exec("npm test", max_output_lines=200)TypeScript
npm install @msh-protocol/clientimport { exec } from '@msh-protocol/client';
const res = await exec('git status');JSON mode
msh exec "npm run build" --max-lines 500| Problem | Raw shell | msh |
|---|---|---|
| Interactive prompts | Hangs | Auto-answers or blocks cleanly |
| Large logs | Blows context | Truncates (head + tail) |
| Secrets in output | Leaked | Redacted |
| Bad file edits | Manual fix | msh undo |
| ANSI noise | Corrupts output | Stripped |
| Destructive commands | Runs | Blocked by guardrails |
| Tool calling | Free text | Structured JSON |
Apache 2.0
