Zero-trust local safety harness and multi-agent consensus orchestrator for CLI coding agents (Claude Code, Cursor, Cline, Aider, OpenHands, OpenCode, Copilot, and more).
Status: public beta (0.1.0) — APIs and CLI flags may change before 1.0. Feedback welcome via GitHub Issues.
Docs: shieldedshell.com · local dev
npm install -g @shieldedshell/cli@beta
shieldedshell init
shieldedshell doctor
shieldedshell run node -e "console.log('hello from sandbox')"Library only:
npm install @shieldedshell/corePackages: @shieldedshell/cli · @shieldedshell/core
For development or contributing:
git clone https://github.com/connerkup/shielded-shell.git
cd shielded-shell
npm install
npm run build
npm run shieldedshell -- init
npm run shieldedshell -- doctor
npm run shieldedshell -- run node -e "console.log('hello from sandbox')"Link locally instead of npm global install:
npm link -w @shieldedshell/cli
shieldedshell doctorCopy a benchmark into your project (fixtures are in the repo, not published on npm):
git clone https://github.com/connerkup/shielded-shell.git
cd shielded-shell
cp -r benchmark/02_ledger_consensus /path/to/your-project/benchmark/
cd /path/to/your-project
shieldedshell init
shieldedshell loop --engine cline --benchmark 02_ledger_consensus --dir .On Windows PowerShell, use Copy-Item -Recurse instead of cp -r. Install at least one supported engine and confirm with shieldedshell doctor.
Report issues: bug report template.
| Command | Purpose |
|---|---|
shieldedshell init |
Create shield.yaml policy in the current directory |
shieldedshell run <cmd...> |
Run a command in a sandboxed workspace with intercept logging |
shieldedshell shell |
Interactive shell bound to workspace + overlay |
shieldedshell verify --type ledger|routing |
Static interval / Datalog safety checks |
shieldedshell orchestrate --dev ... --audit ... |
Dual-agent loop with explicit commands |
shieldedshell loop --engine <name> [--benchmark NAME] |
Dual-agent loop (claude, cline, aider, openhands, opencode, antigravity, copilot, …) |
shieldedshell reconcile |
Run reconciler gate on current buffers |
shieldedshell --dir ./my-project run node ./scripts/agent-task.mjsTypical intercept output:
[ShieldedShell] Blocked READ: C:/Users/me/.ssh/id_rsa (policy)
[ShieldedShell] Allowed EXEC: node ./scripts/agent-task.mjs
shielded-shell/
├── packages/
│ ├── core/ @shieldedshell/core — solvers, policy, overlay, reconcile
│ └── cli/ @shieldedshell/cli — shieldedshell CLI
├── benchmark/ Loop fixtures (copy into your workspace)
├── prompts/ Default agent prompts (also bundled in core on npm)
├── bounded-solvers-rs/ Rust reference solvers (optional fast path)
├── bounded_solvers.js Legacy JS solvers (reference)
├── docs/ Architecture and product specs
└── examples/shield.yaml
Phase 1 ships the CLI harness:
- Workspace binding via
shield.yaml - Copy-on-write overlay (
.shieldedshell/overlay/) - Policy intercept log (blocked reads, risky exec patterns, network off by default)
- Bounded static solvers (interval ledger + Horn-clause Datalog routing)
- Reconciler gate + dual-agent orchestration (ported from
my-agent-loop)
Future: native Go single-binary packaging, PTY interception, and network proxy gate (see docs/shieldedshell_architecture.md).
npm run shieldedshell -- verify --type ledger \
--balances '{"Alice":[500,500],"Bob":[50,50]}' \
--transfers '[{"from":"Alice","to":"Bob","amount":600}]'
npm run shieldedshell -- verify --type routing \
--policies '{"/api/v1/billing":"Public"}' \
--routes '{"/api/v1/billing":"http://billing"}'Rust solvers (optional):
cd bounded-solvers-rs
cargo build --releaseExplicit commands:
shieldedshell orchestrate \
--dev "node ./agents/dev.mjs" \
--audit "node ./agents/audit.mjs" \
--benchmark 02_ledger_consensus \
--dir ./my-projectEngine + prompts (matches legacy orchestrator.ps1 flow):
shieldedshell loop --engine claude --benchmark 02_ledger_consensus --dir ./my-project
shieldedshell loop --engine cline --benchmark 02_ledger_consensus --dir ./my-project
shieldedshell loop --engine aider --benchmark 02_ledger_consensus --dir ./my-project
shieldedshell loop --engine openhands --benchmark 02_ledger_consensus --dir ./my-project
shieldedshell loop --engine opencode --benchmark 02_ledger_consensus --dir ./my-project
shieldedshell loop --engine antigravity --benchmark 02_ledger_consensus --dir ./my-project
shieldedshell loop --engine copilot --benchmark 02_ledger_consensus --dir ./my-projectSupported engines: claude, cline, aider, openhands, openhands-sdk, opencode, antigravity, copilot, cursor, openclaw. Prompts live in prompts/ or benchmark/<name>/agent_*_prompt.txt.
Adding or tuning engines: loop dispatch is data-driven in packages/core/src/engine-profiles.ts. Each profile declares the binary, how the prompt is delivered (pipe-file, inline-prompt, or script), headless/auto-approve flags, workspace binding, and optional phase file attachments. The shared LOOP_TOOL_HINT and 15-minute agent timeout apply to all engines — no per-engine TypeScript patches required for new CLIs that fit those patterns.
Run shieldedshell doctor for ready vs not on PATH / missing SDK import (e.g. openhands-sdk checks python -c "import openhands.sdk").
- Install Claude Code and sign in once (
claude auth loginor follow the installer). - From your project folder, run
shieldedshell doctorand confirmclaude: found. - Run a benchmark loop:
shieldedshell loop --engine claude --benchmark 02_ledger_consensus --dir .Claude runs in --bare mode with acceptEdits so file writes land in the workspace JSON buffers without extra approval prompts each turn.
- Install globally:
npm i -g cline - Authenticate once:
cline auth(Authorization guide) - Confirm with
shieldedshell doctor(cline: found) - Run the same benchmark:
shieldedshell loop --engine cline --benchmark 02_ledger_consensus --dir .Cline runs with --auto-approve true, workspace binding via -c, and a 15-minute per-agent timeout (-t 900). Increase sandbox.cpu_timeout_ms in shield.yaml if orchestrator kills long runs early.
The Cline SDK (@cline/sdk) embeds the same agent runtime programmatically; ShieldedShell loop mode uses the CLI today for parity with other engines. SDK-native embedding is a natural Phase 3 extension for custom harnesses.
- Install: aider.chat —
python -m pip install -aider-installthenaider-install, orpip install aider-chat - Set a model API key (e.g.
ANTHROPIC_API_KEY,OPENAI_API_KEY, or provider-specific vars). Optional:AIDER_MODELin.envor the workspace environment. - Confirm with
shieldedshell doctor(aider: found) - Run the benchmark:
shieldedshell loop --engine aider --benchmark 02_ledger_consensus --dir .Aider runs one-shot via --message with --yes-always. Each loop phase binds --file to the correct JSON buffer (developer_output.json or auditor_output.json) and --read for shared context plus the other agent's output. Git auto-commits and shell-command suggestions are disabled so the harness stays in control.
OpenHands powers the same agent runtime as the Software Agent SDK. ShieldedShell supports two loop engines:
CLI (recommended): loop --engine openhands
- Install the CLI:
uv tool install openhands --python 3.12or the install script - Configure LLM credentials in
~/.openhands/agent_settings.json, or exportLLM_API_KEY/LLM_MODELand use--override-with-envs(wired automatically) - On native Windows, OpenHands expects WSL Ubuntu; run ShieldedShell from that environment
- Run:
shieldedshell loop --engine openhands --benchmark 02_ledger_consensus --dir .Headless mode auto-approves tool use (--headless, --exit-without-confirmation).
SDK (Python): loop --engine openhands-sdk
pip install -U openhands-sdk openhands-tools- Set
LLM_API_KEY(and optionalLLM_MODEL,LLM_BASE_URL) - Run:
shieldedshell loop --engine openhands-sdk --benchmark 02_ledger_consensus --dir .This invokes scripts/openhands-loop.py, a thin wrapper around Conversation.run() from the SDK.
- Install:
npm i -g opencode-ai(or see opencode.ai/docs/cli) - Authenticate:
opencode auth login - Confirm with
shieldedshell doctor(opencode: found) - Run:
shieldedshell loop --engine opencode --benchmark 02_ledger_consensus --dir .Uses opencode run with --dangerously-skip-permissions, workspace --dir, and phase-specific -f attachments for JSON buffers and shared context.
- Install the CLI:
irm https://antigravity.google/cli/install.ps1 | iex(Windows) or install.sh (macOS/Linux) - Sign in on first
agylaunch - Confirm with
shieldedshell doctor(antigravity: agy found) - Run:
shieldedshell loop --engine antigravity --benchmark 02_ledger_consensus --dir .Uses agy -p print mode with --dangerously-skip-permissions for unattended loop turns. Same agent harness as Antigravity 2.0 IDE.
Uses the GitHub Copilot CLI — the terminal agent that shares your Copilot subscription (including classic VS Code Copilot).
- Install:
npm install -g @github/copilot - Authenticate:
copilot login - Confirm with
shieldedshell doctor(copilot: found) - Run:
shieldedshell loop --engine copilot --benchmark 02_ledger_consensus --dir .Uses programmatic mode (-p) with --allow-all-tools and --add-dir bound to the loop workspace. Use only in isolated workspaces; ShieldedShell already constrains the working directory.
- Contributing · Changelog · Security
- Product MVP:
docs/mvp_product_strategy.md - Terminal virtualization target:
docs/shieldedshell_architecture.md - npm/API patterns:
docs/npm_integration_guide.md - Dual-agent loop:
docs/dual_agent_automator.md - Productization spec:
docs/PRODUCTIZATION_SPEC.md - Maintainer releases:
docs/RELEASING.md
npm install
npm test
npm run build
npm run pack:check # dry-run npm tarballs before publishPull requests: see CONTRIBUTING.md. CI runs tests on Node 20/22 (Linux) and Node 22 (Windows), plus docs site build.
Docs site: npm run website:dev (Astro + Starlight in website/). Deploy website/dist to shieldedshell.com.
History: public main is a single squashed release commit. Granular dev history lives on archive/devlog-full-history — see docs/archive/.
MIT — see LICENSE.