Skip to main content
The plan and apply workflow lets you preview changes before deploying them — similar to Terraform.

Plan

griffin plan compares your local monitor files against what’s deployed on the hub and shows the diff:
griffin plan
griffin plan production
griffin plan --monitor health-check
griffin plan --env production --monitor health-check
Use --monitor <name> to preview changes for only that monitor. Example output:
Monitors to create:
  + health-check
  + user-crud

Monitors to update:
  ~ payment-flow (frequency changed)

Monitors unchanged:
  = auth-check

2 to create, 1 to update, 1 unchanged

CI/CD usage

griffin plan exits with code 2 when there are pending changes and 0 when everything is in sync. This makes it useful in CI pipelines:
griffin plan || echo "Changes pending"
Use --json for machine-readable output:
griffin plan --json

Apply

griffin apply pushes your local monitors to the hub:
griffin apply
griffin apply production
# Apply only a single monitor by name
griffin apply --monitor health-check
griffin apply --env production --monitor health-check
Use --monitor <name> to create or update only that monitor. By default, it shows you what will change and asks for confirmation. Use flags to customize:
# Skip confirmation
griffin apply --auto-approve

# Preview without making changes
griffin apply --dry-run

# Delete monitors that no longer exist locally
griffin apply --prune

The prune flag

Without --prune, apply only creates and updates monitors. Monitors that exist on the hub but not locally are left untouched. With --prune, monitors on the hub that don’t have a corresponding local monitor file are deleted.
# Safe: only creates/updates
griffin apply

# Destructive: also deletes removed monitors
griffin apply --prune
Use --prune carefully. Always run griffin plan first to verify what will be deleted.

Validate and test (with optional filter)

You can restrict validation or local runs to a single monitor by name:
griffin validate --monitor health-check
griffin test --monitor health-check
griffin test --env staging --monitor health-check

Typical workflow

# 1. Write or modify monitor files in __griffin__/

# 2. Test locally
griffin test

# 3. Preview changes
griffin plan production

# 4. Deploy
griffin apply production