Quick Setup
Install shim and service
One command installs everything:This creates:
- Shell shim at
~/.local/bin/rampart-shim - Systemd (Linux) or launchd (macOS) service running
rampart serve - Default policy at
~/.rampart/policies/standard.yaml
Linux and macOS only. Windows is not supported for OpenClaw integration.
Configure OpenClaw gateway
Point OpenClaw to use the Rampart shim as its shell:Or update your OpenClaw gateway configuration file to set the shell path.
How It Works
Shell Shim Flow
OpenClaw calls the shim with-c "command". The shim:
- Encodes the command (base64 to preserve special characters)
- POSTs to the policy server
- Blocks if denied, executes if allowed
File Tool Patching
With--patch-tools, Rampart injects policy checks into OpenClaw’s TypeScript tools:
Configuration
Shell Shim
The shim script (~/.local/bin/rampart-shim) contains:
Service Configuration
Systemd service at~/.config/systemd/user/rampart-proxy.service:
~/Library/LaunchAgents/com.rampart.proxy.plist.
Policy Examples
~/.rampart/policies/custom.yaml
Monitoring
Terminal UI
Watch OpenClaw activity:Audit Logs
Coverage Comparison
- Shell Shim Only
- Shell Shim + Patched Tools
Covers:
- ✅ Bash exec tool (all shell commands)
- ❌ Read tool (file reads)
- ❌ Write tool (file writes)
- ❌ Edit tool (file edits)
- ❌ Grep tool (file searches)
- You only care about shell command execution
- You don’t want to modify node_modules
- You want zero maintenance (no re-patching after upgrades)
Troubleshooting
Shim not intercepting commands
-
Check OpenClaw is using the shim:
-
Verify shim is executable:
-
Test shim directly:
Service not running
-
Check service status:
-
Check logs:
-
Restart service:
Patched tools not working
-
Check if tools are patched:
-
Verify backup files exist:
-
Re-patch with force:
Permission denied during patching
File tools require write access to OpenClaw’s node_modules:Uninstalling
Remove OpenClaw integration:- Shell shim at
~/.local/bin/rampart-shim - Systemd/launchd service
- Tool patches (restores from
.rampart-backupfiles)
- Policy files at
~/.rampart/policies/ - Audit logs at
~/.rampart/audit/
Advanced: Human-in-the-Loop Approval
OpenClaw supports chat-based approval forask actions:
- OpenClaw blocks the command
- Sends message to chat: “Approve this deployment? (ID: abc123)”
- User responds: “approve abc123” or “deny abc123”
- Rampart resolves the approval and unblocks