Getting Started
Install Railgun and protect your Claude Code sessions in minutes.
Installation
Quick Install (Recommended)
This will:
- Download the correct binary for your platform
- Install it to
~/.local/bin/ - Configure Claude Code to use Railgun
From GitHub Releases
Download the latest release for your platform:
- darwin-arm64 (macOS Apple Silicon)
- darwin-x64 (macOS Intel)
- linux-arm64
- linux-x64
From Source
Quick Start
1. Install the Hook
This adds Railgun to ~/.claude/settings.json as a preToolUse hook.
2. Verify Installation
3. Create a Policy (Optional)
Create railgun.toml in your project or home directory:
4. Test Your Policy
5. Validate Configuration
How It Works
When Claude Code attempts to use a tool:
- Claude Code calls
railgun hookwith JSON on stdin - Railgun parses the tool name and input
- Policy engine runs checks: tools → secrets → commands → paths → network
- Returns verdict:
allow,deny(with reason), orask(prompt user) - Claude Code proceeds or blocks based on verdict
Next Steps
- Configuration — Full config file reference
- Policy Engine — How inspection works
- CLI Reference — All command-line options