http hook
Claude Code (Global)
Configure governance once in ~/.claude/settings.json and it applies to every Claude Code session across all your projects.
API key required
You need a Neptrix API key to complete this setup. Sign up free to get one.
Installation
- 1Copy the configuration below
- 2Create or open ~/.claude/settings.json in your home directory
- 3Paste the configuration and replace YOUR_API_KEY with your key
- 4Restart Claude Code — every tool call across all projects now goes through Neptrix
Add this configuration to
~/.claude/settings.json~/.claude/settings.json
1{2 "hooks": {3 "PreToolUse": [4 {5 "matcher": ".*",6 "hooks": [7 {8 "type": "http",9 "url": "https://qpthort-backend-production.up.railway.app/hooks/claude-code/pre-tool-use?api_key=YOUR_API_KEY",10 "timeout": 500011 }12 ]13 }14 ]15 }16}
Replace YOUR_API_KEY with your API key. Sign up to get your key.
How it works
1
Agent proposes action
Before each tool call, your agent sends the proposed action to Neptrix for evaluation.
2
Neptrix evaluates
Constitutional governance rules evaluate the action. The decision is logged to your audit trail.
3
Decision returned
ALLOW, BLOCK, ESCALATE, or MODIFY. Agents auto-discover — no registration needed.
Ready to govern your agents?
Create a free account, generate an API key, and have governance running in under 5 minutes.
Get started for free