Quick Setup
Start Rampart service
Install and start the background policy server:This creates a systemd/launchd service on port 9090 with a saved token at
~/.rampart/token.Install Cline hooks
Install hook scripts to Cline’s global hooks directory:This creates:
~/Documents/Cline/Hooks/PreToolUse/rampart-policy— Evaluates tool calls~/Documents/Cline/Hooks/PostToolUse/rampart-audit— Logs completed actions
For workspace-level hooks instead of global, use
--workspace flag.Hook Locations
Rampart installs scripts to these directories:How It Works
The PreToolUse hook receives tool call JSON on stdin, queries the policy server, and returns approval/denial on stdout. The PostToolUse hook logs completed actions to the audit trail.Hook Scripts
Rampart generates these scripts during setup:rampart binary, so they work regardless of Cline’s PATH configuration.
Example Session
Terminal output when Cline attempts operations:Policy Configuration
Create Cline-specific policies:~/.rampart/policies/custom.yaml
Workspace vs Global Hooks
- Global Hooks
- Workspace Hooks
Location:
~/Documents/Cline/Hooks/Use when:- You want consistent protection across all projects
- You’re the only user on the machine
- Policies are user-specific, not project-specific
Monitoring
Live Dashboard
View Cline’s tool calls in real time:Audit Trail
The PostToolUse hook logs all completed actions:Troubleshooting
Hooks not executing
-
Verify hook scripts exist:
-
Check script permissions:
-
Test hook directly:
Service connection errors
-
Check service is running:
-
Restart service:
-
Check logs:
Hooks blocking everything
If all commands are denied:-
Check policy file:
-
Test policy:
-
Reset to defaults: