# 用于本地 Postgres 和项目流程的 Supabase CLI
在终端管理本地 Supabase 项目、迁移、类型生成和已关联的托管环境。
Agent Readiness Score: 82/100
Strong for database projects when agents are limited to local or read-only operations.
## Install

- Homebrew: `brew install supabase/tap/supabase`
- npm: `npm install -g supabase`

## Structured output

Supported output formats: json, text.
Prefer structured output flags such as `--json`, `--format json`, or equivalent when available.

## Safe commands

- Check local status: `supabase status` — Shows local service URLs and connection information.

## Commands requiring approval

- Generate types: `supabase gen types typescript --linked` — requires-review; require explicit user approval.
- Reset local database: `supabase db reset` — destructive; require explicit user approval.

## Agent instructions

- Codex CLI: Use Supabase CLI to inspect project status and generate types. Ask before reset, migration repair, secrets, or deploy commands.

## Safety notes

- Agents can safely inspect local status, linked projects, and generated types.
- Database reset, migration repair, secrets, and deploy commands should require approval.
- Use local development projects before touching hosted production data.

## Metadata

Official URL: https://supabase.com/docs/guides/cli
GitHub: https://github.com/supabase/cli
Docs: https://supabase.com/docs/guides/cli
