Skip to content
msh-protocolPublic

About

The Deterministic Execution Protocol & Runtime for AI Agents

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

msh logo

msh

Deterministic execution runtime for AI coding agents.
Auto-handles prompts, truncates output, redacts secrets, and lets you undo agent changes.

CI Status GitStress Concurrency GitStress Concurrency Version skills.sh License PyPI npm

msh fleet dashboard


Why msh?

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.


Quick Start

1. Install

macOS / Linux

curl -fsSL https://raw.githubusercontent.com/msh-protocol/msh/main/scripts/install.sh | bash

Windows

irm https://raw.githubusercontent.com/msh-protocol/msh/main/scripts/install.ps1 | iex

Go

go install github.com/msh-protocol/msh/cmd/msh@latest

2. Teach your agent

Install 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 -g

Or configure via the msh CLI:

# Generate rules and skills in the current workspace
msh init

# Or install globally for all Antigravity projects
msh init --global

Core Commands

Run a command

msh git status
msh npm run build
msh pytest -v

Outputs 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 test

Undo agent changes

msh undo                  # last run
msh undo 42               # specific run
msh undo 42 --file src/index.ts

Guardrails

msh guard check "rm -rf /"
msh guard list
msh --strict-workspace "cat ../../etc/passwd"

Shadow worktrees

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

MCP server

{
  "mcpServers": {
    "msh": {
      "command": "msh",
      "args": ["mcp"]
    }
  }
}

Fleet dashboard

msh fleet start

Opens http://localhost:9000.


SDKs

Python

pip install msh-protocol
from msh import exec
res = exec("npm test", max_output_lines=200)

TypeScript

npm install @msh-protocol/client
import { exec } from '@msh-protocol/client';
const res = await exec('git status');

JSON mode

msh exec "npm run build" --max-lines 500

What it handles

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

License

Apache 2.0

About

The Deterministic Execution Protocol & Runtime for AI Agents

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages