Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Supabase CLI

$ supabase Official High Risk
Supabase · Database & Data · MIT · macos / linux / windows

Supabase CLI manages local Docker-backed Supabase environments, database migrations, schema diffs, TypeScript type generation, and Edge Functions. Supports --dry-run on db push and --output json on project management commands.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install supabase/tap/supabase
CLI vs MCP Decision Hybrid (CLI + MCP)

Use supabase CLI for local migrations, gen types, and db diff; Supabase MCP is great for natural-language SQL exploration against a linked project.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 21 / 25

Supports --output json on listing/inspection commands, --dry-run on db push, and --yes non-interactive flags.

  • Supports --output json, --dry-run, and --yes across key workflows
Trust & Safety 20 / 25

Local-first workflow plus db push --dry-run reduces migration surprises, though db reset and --linked remote commands require care.

  • --local vs --linked separation and db push --dry-run
  • Destructive reset commands exist for local/linked DBs
Setup & Portability 13 / 15

Single Go binary via Homebrew/npx; full local stack commands require a local container runtime.

  • Go binary distributed via supabase/cli; supabase start requires Docker
Utility & Efficiency 14 / 15

Covers migrations, schema diffing, typegen, and Edge Functions cleanly in one tool.

  • gen types typescript and db diff integrate directly into coding loops
Maintenance & Lineage 10 / 10

Official Supabase CLI (supabase/cli) with frequent releases under MIT.

  • Official supabase/cli repository
Docs & Verifiability 8 / 10

Complete CLI command reference in Supabase official documentation.

  • Published reference at supabase.com/docs/reference/cli

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key OS Keychain
Credential Storage

Access token stored in OS keychain/config or passed via SUPABASE_ACCESS_TOKEN env var.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

CLI is MIT open-source; hosted Supabase projects follow free/pro plan limits.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Supabase CLI Agent Rules
- Always run `supabase db push --dry-run` before `supabase db push`.
- Prefer `--local` for `gen types` and `db diff` during feature work.
- NEVER run `supabase db reset --linked` or `supabase projects delete` autonomously.

Agent-Ready Command Recipes

Safe Read-Only Queries

Generate TypeScript types from local schema
supabase gen types typescript --local > src/types/supabase.ts

Keeps frontend/backend types synced with Postgres without touching remote prod.

Preview pending migrations with --dry-run
supabase db push --dry-run

Shows which SQL migrations would execute on the linked database without applying them.

Controlled Writes & Previews

Create a new timestamped migration file
supabase migration new add_users_index

Scaffolds a local SQL migration file for review before applying.

Strengths for Agents

  • + supabase db push --dry-run provides safe pre-flight migration checks.
  • + --local type generation and diffing work seamlessly inside coding-agent loops.
  • + Supports SUPABASE_ACCESS_TOKEN and --yes for CI/headless execution.

Caveats & Pitfalls

  • ! Full local stack (supabase start) needs Docker even though the CLI binary itself does not.
  • ! Accidental --linked flags on db reset can wipe remote staging/prod schemas.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI