Getting Started¶
Install¶
Run these two commands inside Claude Code:
Restart Claude Code to activate the hook.
How it works¶
Warden registers a PreToolUse hook that intercepts every Bash tool call. The pipeline:
- Parse - splits the command into individual parts (handling pipes, chains, quotes, shell wrappers)
- Evaluate - checks each part against safety rules (global deny list, allow list, argument patterns, target policies)
- Decide - returns
allow(silent),ask(falls through to user prompt), ordeny(blocks with reason on stderr)
First steps¶
Warden works out of the box. The built-in defaults cover 100+ common dev commands - ls, cat, grep, git, npm, node, docker, and many more - with argument-aware rules that distinguish safe from risky usage.
No configuration needed to start. Just install and go.
Customize¶
When you want to adjust the rules, create a config file:
- User-level (applies everywhere):
~/.claude/warden.yaml - Project-level (applies to one repo):
.claude/warden.yaml
Project config overrides user config, which overrides built-in defaults.
Copy the reference config as a starting point:
Next steps¶
See Configuration for the full config reference.