Skip to content

Quickstart

Install the CLI globally:

Terminal window
pnpm add -g @sentry/warden

Warden runs model-backed work through Pi by default. Set the model selector and the matching provider credential:

Terminal window
# OpenAI example
export WARDEN_MODEL=openai/gpt-5.5
export WARDEN_OPENAI_API_KEY=sk-...
# Anthropic example
export WARDEN_MODEL=anthropic/claude-sonnet-4-6
export WARDEN_ANTHROPIC_API_KEY=sk-ant-...

CI environments require the same provider credentials as repository or organization secrets. See Models and Runtimes for config defaults, per-skill overrides, and Claude runtime selection.

Initialize Warden in a repository:

Terminal window
warden init

warden init creates:

FilePurpose
warden.tomlSkills, triggers, thresholds, and defaults.
.github/workflows/warden.ymlPull request workflow for GitHub Actions.
Terminal window
warden

With no arguments, Warden reviews the current branch against the default branch. Use this before opening or updating a pull request.

The default config starts with the built-in security and correctness reviews:

warden.toml
version = 1
[[skills]]
name = "security-review"
[[skills.triggers]]
type = "pull_request"
actions = ["opened", "synchronize"]
[[skills]]
name = "code-review"
[[skills.triggers]]
type = "pull_request"
actions = ["opened", "synchronize"]

Add more skills when your codebase has specific review needs.