Skip to content

Require explicit --dev/--prd for Supabase scripts, block commits to main#2549

Merged
hiroshinishio merged 1 commit intomainfrom
wes
Apr 17, 2026
Merged

Require explicit --dev/--prd for Supabase scripts, block commits to main#2549
hiroshinishio merged 1 commit intomainfrom
wes

Conversation

@hiroshinishio
Copy link
Copy Markdown
Collaborator

@hiroshinishio hiroshinishio commented Apr 17, 2026

Summary

  • Supabase CLI scripts (query.sh, describe.sh, tables.sh, daily_cost_report.sh) now require explicit --dev or --prd flag instead of defaulting to dev -- prevents accidental production queries and accidental dev queries
  • Pre-commit hook blocks commits directly to main branch
  • Daily cost report restructured: PR-grouped summary first, then trigger/model breakdown, added PR count in totals
  • CLAUDE.md updated to reflect new CLI usage and social post guidelines

Social Media Post (GitAuto)

Made Supabase CLI scripts safer

  • Database scripts now require explicit --dev or --prd flag instead of silently defaulting to dev
  • Pre-commit hook blocks direct commits to main branch
  • Daily cost report now groups by PR first for faster scanning

Social Media Post (Wes)

Had a close call querying prod when I meant dev. The scripts defaulted to dev but I kept second-guessing which env I was hitting. Removed the default entirely. Now every query forces you to say --dev or --prd. Tiny friction, zero ambiguity.

@hiroshinishio hiroshinishio self-assigned this Apr 17, 2026
@hiroshinishio hiroshinishio merged commit 79b410a into main Apr 17, 2026
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch April 17, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant