Installation Methods
Warden can be run vianpx without installation, or installed globally for convenience.
Run via npx (recommended)
No installation required - run Warden directly:Install globally
Install Warden globally for faster execution:Install as dev dependency
Add Warden to your project’s dev dependencies:package.json:
package.json
Authentication
Warden requires authentication with Anthropic’s API to use Claude. You have two options:Option 1: Claude Code CLI (recommended for local)
If you have the Claude Code CLI installed and are logged in, Warden automatically uses your subscription. Install Claude Code CLI:Claude Code CLI provides a better local development experience with automatic credential refresh and no API key management.
Option 2: API Key
Get an API key from the Anthropic Console and set it via environment variable. Set the environment variable:Precedence
Warden checks for credentials in this order:WARDEN_ANTHROPIC_API_KEYenvironment variableANTHROPIC_API_KEYenvironment variableCLAUDE_CODE_OAUTH_TOKENenvironment variable- Claude Code CLI session (if logged in)
GitHub Action Setup
To use Warden in GitHub Actions, add your API key as a repository secret.Get an API key
Go to the Anthropic Console and create an API key.
Add secret to GitHub
- Go to your repository Settings → Secrets and variables → Actions
- Click New repository secret
- Name:
ANTHROPIC_API_KEY - Value: Your API key (starts with
sk-ant-) - Click Add secret
GitHub App Setup (advanced)
For better GitHub integration and finer-grained permissions, set up a GitHub App instead of usingGITHUB_TOKEN.
Run the setup command
- Opens your browser to create a GitHub App
- Configures the app with required permissions
- Exchanges credentials for an installation token
- Stores the token locally
Benefits over GITHUB_TOKEN
GitHub Apps provide:
- Better rate limits (5,000 requests/hour vs 1,000)
- Finer-grained permissions
- Visible attribution (comments show as your app)
- Token refresh without re-authentication
System Requirements
- Node.js: 20.0.0 or later
- Operating systems: Linux, macOS, Windows (WSL recommended)
- Git: Required for diff analysis
Verification
Verify your installation and authentication:Next Steps
Quickstart
Run your first analysis in 5 minutes
Initialize configuration
Create warden.toml and workflows
CLI reference
Learn all CLI commands
Authentication troubleshooting
Resolve authentication issues