Command structure
--help for detailed usage information.
Command groups
Setup
Commands for installing and configuring Rampart:rampart quickstart- One-shot setup: install service, configure hooks, verifyrampart setup- Set up integrations with AI agents (Claude Code, Cline, OpenClaw, Codex)rampart upgrade- Upgrade to the latest or specified releaserampart uninstall- Remove Rampart from your systemrampart doctor- Check installation health
Policy
Commands for managing security policies:rampart policy- Policy utilities (lint, explain, fetch, sync)rampart test- Test how policies evaluate commandsrampart bench- Benchmark policy coverage against attack corpusrampart watch- Live TUI dashboard for audit decisionsrampart allow- Add an allow rule to custom policyrampart block- Add a block rule to custom policyrampart rules- Manage custom rules
Runtime
Commands for running the policy engine:rampart serve- Start policy runtime and file watcherrampart token- Manage bearer tokensrampart status- Quick dashboard showing protection statusrampart log- Pretty-print recent audit events
Approvals
Commands for managing human-in-the-loop approvals:rampart pending- List pending approval requestsrampart approve- Approve a pending tool callrampart deny- Deny a pending tool call
Hooks
Commands for wrapping and intercepting tool calls:rampart hook- AI agent hook (reads JSON from stdin, returns allow/deny)rampart preload- Run a command with librampart preloaded (LD_PRELOAD)rampart wrap- Wrap a process with policy enforcement
Global flags
Path to policy config file
Enable debug logging
Print version information and exit
Exit codes
0- Success1- General error or test failure126- Command denied by policy
Environment variables
Bearer token for API authentication (auto-detected from
~/.rampart/token)Session identifier for audit events (auto-detected from git repo/branch)
URL for rampart serve API
Runtime mode:
enforce, monitor, or disabledSet to
1 to skip project policy loading (security precaution for untrusted repos)Common patterns
Initial setup
Testing policies
Monitoring
Managing approvals
Configuration files
Policy files
~/.rampart/policies/standard.yaml- Built-in standard policy~/.rampart/policies/custom.yaml- User-defined rules.rampart/policy.yaml- Project-specific policy (git-committed)
Runtime files
~/.rampart/token- Persisted bearer token~/.rampart/audit/- Audit trail (JSONL files)~/.rampart/signing.key- HMAC key for approval URLs~/.rampart/ACTIVE_POLICY.md- Current policy summary
Agent integrations
~/.claude/settings.json- Claude Code hooks~/.config/Cline/settings.json- Cline hooks (VS Code)~/.local/bin/rampart-shim- OpenClaw shell wrapper