Warden
beta · v2.14.0
beta · v2.14.0
Documentation

Commands

Warden’s command surface is intentionally small. Most of the work happens automatically via hooks.

Setup & Maintenance

warden init

Interactive setup wizard. Creates the directory structure, installs Warden to PATH, detects missing CLI tools (rg, fd, bat, etc.) and offers to install them, configures hooks for your AI assistant, writes default config, and starts the server.

warden init

If you’ve already run init, it detects the existing installation and skips completed steps.

warden install <agent>

Configure hooks for a specific AI assistant:

warden install claude-code
warden install gemini-cli
warden install codex-cli

warden uninstall

Remove hooks, stop the server, and optionally delete all Warden data.

warden uninstall

warden update

Check for new versions and apply updates:

warden update              # Interactive — check and prompt
warden update --check      # Check only, no changes
warden update --yes        # Apply without prompting
warden update --rollback   # Revert to previous version

Configuration and session data are preserved across updates.

warden doctor

Health check on your installation:

warden doctor

Checks: Warden is on PATH, server is running, hooks are registered, CLI tools are installed, config files parse correctly, database is accessible.

warden version

Print the installed version.

Rule Management

warden describe

Show all active rules with their IDs, categories, severities, and patterns:

warden describe          # Active rules
warden describe --all    # All rules including compiled defaults

warden explain <rule_id>

Show why a specific rule exists, what it matches, and remediation guidance:

warden explain safety.3
warden explain substitution.0

warden rules

List all active rules with schema information.

Session Management

warden status

Current session health in one line:

warden status
# Turn: 12  Phase: Productive  Trust: 78  Focus: 65  Errors: 0

warden scorecard

Quality scorecard for the most recent session — safety, efficiency, focus, and session health scores.

warden session list

List all projects with active session state:

warden session list
# Hash       Project                        Turns  Phase
# ----------------------------------------------------------
# 7ad5ddff   c:/Projects/warden             12     Productive
# 51864734   c:/Projects/myapp              5      Warmup

warden session end

Reset the session state for the current project. Use when you want to start fresh.

warden allow <rule_id>

One-time override for a specific rule, lasting only this session:

warden allow safety.3

Server Management

warden server-status

Check if the server is running and responsive.

warden server-start

Explicitly start the server. Normally auto-starts on first hook call.

warden server-restart

Stop and restart the server. Useful after updating or changing rules.

warden server-stop

Stop the server gracefully.

Data & Diagnostics

warden stats

Print learning and analytics data — intervention counts, effectiveness rates, cross-session patterns.

warden replay

Replay a past session step-by-step, showing each tool call and Warden’s decision.

warden export

Export session data as JSON for external analysis:

warden export > session.json

warden sprint-reset

Sprint boundary reset for multi-agent harnesses. Returns the current resume packet (key files, dead ends, verified state, conventions) and resets volatile session state. Use this in harness orchestration scripts before context resets:

warden sprint-reset
# Session: 45 turns. Files: src/main.rs, src/lib.rs. Verified: last build at turn 42. Avoid: lifetime errors in parser.rs.

warden tui

Launch the interactive terminal dashboard for real-time session monitoring.

warden config

View or modify runtime configuration:

warden config path         # Show config file location
warden config list         # Print current config
warden config get <key>    # Get a specific value
warden config set <key> <value>  # Set a value
warden config schema       # Output JSON Schema for validation

MCP Server

Warden includes a built-in MCP (Model Context Protocol) server — a channel that lets AI agents query Warden’s state programmatically. Start it with warden mcp.

Hooks vs MCP: Hooks are automatic — they fire on every tool call without agent action. MCP is on-demand — the agent explicitly queries Warden when it needs guidance. Most sessions run entirely on hooks. MCP is useful when the agent wants to self-correct or when building custom integrations.

MCP Tools

ToolPurpose
suggest_actionContext-aware next-step recommendation based on session phase and verification debt.
session_statusCurrent session phase, turn count, focus score, trust level, and active signals.
explain_denialWhy a denial or advisory fired — the pattern, the trigger, and remediation guidance.
check_fileCheck a file against project conventions and the working set.
session_historyRecent session events — tool calls, advisories, milestones, and errors.
reset_contextReset session tracking state after major context shifts.
sprint_resetSprint boundary reset for multi-agent harnesses — returns resume packet and resets volatile state.