Skip to main content

One-shot setup

The fastest way to get protected:
rampart quickstart
This auto-detects your agent (Claude Code, Cline, or OpenClaw), installs the background service, configures hooks, and runs a health check. Done.
If you have multiple agents installed, rampart quickstart will set up all detected agents.

Manual setup

If you prefer to set up step-by-step, or need to set up a specific agent:
1

Install the background service

This installs rampart serve as a boot service (systemd on Linux, launchd on macOS) and saves a bearer token to ~/.rampart/token:
rampart serve install
The service runs on localhost:9090 by default.
2

Wire up your agent

Choose your agent:
rampart setup claude-code
For agents without native hook support, rampart wrap sets $SHELL to a policy-checking shim. Works with Aider, OpenCode, Continue, and any agent that reads the $SHELL environment variable.
3

Verify everything works

Run the health check:
rampart doctor
You should see:
  • βœ“ Background service is running
  • βœ“ Token is valid
  • βœ“ Policies loaded (3+ rules)
  • βœ“ Agent hooks configured

Test your first policy

Try running a dangerous command through the policy engine:
rampart test "rm -rf /"
You should see:
πŸ”΄ deny β€” Destructive command blocked [block-destructive]
Now try a safe command:
rampart test "git status"
βœ… allow [default]
rampart test evaluates commands against your policies without actually executing them. Perfect for testing policy changes.

Use your agent normally

Once Rampart is set up, just use your agent as usual. Every command goes through the policy engine first. For Claude Code:
claude
For wrapped agents:
rampart wrap -- aider

Watch what’s happening

See real-time policy decisions:
rampart watch
This opens a live TUI dashboard showing:
  • βœ… Allowed commands
  • πŸ”΄ Blocked commands
  • 🟑 Watched commands (logged for review)
  • πŸ‘€ Commands waiting for approval
Press q to exit the dashboard. The background service keeps running.

Built-in policy profiles

Rampart ships with four policy profiles:
ProfileDefault actionUse case
standardallowBlock dangerous, watch suspicious, allow the rest
ciallowStrict mode for headless/CI β€” all approvals become denies
paranoiddenyExplicit allowlist for everything
yoloallowLog-only, no blocking
Switch profiles with:
rampart init --profile paranoid
The paranoid profile denies everything by default. You’ll need to explicitly allow every command your agent runs. Great for high-security environments, painful for day-to-day development.

Customize your policy

When a command is blocked, Rampart tells you how to allow it:
# Command blocked: "npm install lodash"
# πŸ’‘ To allow this: rampart allow "npm install *"
Just run the suggested command:
rampart allow "npm install *"
# βœ“ Rule added β€” policy reloaded (12 rules active)
Common customizations:
rampart allow "go test ./..."
rampart allow "docker build *"
Custom rules are stored in ~/.rampart/policies/custom.yaml and won’t be overwritten by rampart upgrade.

Next steps

Writing policies

Learn YAML policy syntax, glob patterns, and approval flows

Audit trail

Explore hash-chained audit logs and SIEM integration

Project policies

Commit project-specific rules to your repo for team-shared security

Dashboard

Use the web dashboard to approve commands and test policies

Build docs developers (and LLMs) love