Quickstart

Get Saguaro running in your repo in under 2 minutes.

1. INSTALL

Saguaro is distributed via Homebrew. If you have a coding agent installed (Claude Code, Codex CLI, or Gemini CLI), Saguaro uses that agent's existing subscription — no API key needed. Otherwise, set ANTHROPIC_API_KEY, OPENAI_API_KEY, or GOOGLE_API_KEY in your environment or paste it during sag init.

1brew install mesa-dot-dev/homebrew-tap/saguaro

2. INITIALIZE

Run sag init in your repository to set up Saguaro.

  • Creates .saguaro/config.yaml and .saguaro/rules/
  • Offers three options: starter rules, generate from codebase, or start empty
  • Sets up Claude Code integration (stop hook + MCP server)
  • Stores your API key in .env.local
1# Initialize Saguaro in your repo
2sag init

3. GENERATE RULES

Saguaro can analyze your codebase and propose rules tailored to your project's patterns and conventions.

1# Generate rules from your codebase (or use the starter rules)
2sag rules generate

4. REVIEW

Run a review against your current changes. By default, Saguaro diffs against main.

1# Run a review
2sag review

Exit code 0 means clean — no violations found. Exit code 1 means violations were detected. Silence is a good thing — it means nothing is wrong.

5. CONFIGURATION

Saguaro is configured via .saguaro/config.yaml. See the full configuration reference for all available options.

.saguaro/config.yaml
1# .saguaro/config.yaml
2model:
3 provider: anthropic
4 name: sonnet
5
6output:
7 cursor_deeplink: true
8
9review:
10 max_steps: 10
11 files_per_batch: 2
12
13hook:
14 enabled: true
15 stop:
16 enabled: true