Skip to content

docs(cli): add local-dev workflow guide and restructure CLI docs - #47932

Merged
aantti merged 13 commits into
masterfrom
docs/refine-cli-docs
Jul 15, 2026
Merged

aantti merged 13 commits into
masterfrom
docs/refine-cli-docs

Conversation

@aantti

@aantti aantti commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Reworks the Local Dev / CLI docs section around a single, task-based onboarding flow, and fixes several correctness issues in the existing pages.

New

  • Local development workflow guide (cli-workflows.mdx): an end-to-end, task-oriented guide covering the two starting points (move an existing project to local dev / start a new project from scratch), the daily development loop, pushing to a remote, cleaning up generated migrations, and troubleshooting.

Restructured

  • Flattened the two confusing sibling nav groups (each had its own "Getting started") into a linear flow: Overview & quickstart → Install and run the CLI → Local development workflow → Guides → Reference → Testing.
  • Renamed overview.mdx → database-migrations.mdx (it was a migrations tutorial mislabeled "Getting started"; the real overview is the section landing page). Added redirects for the old URL.
Overview & quickstart          (was "Overview")
Install and run the CLI        (was "CLI › Getting started")
Local development workflow     (was "Local development › CLI workflows")
Guides
  ├─ Database migrations        (was "Local development › Getting started")
  ├─ Declarative database schemas
  ├─ Seeding your database
  ├─ Managing config and secrets
  ├─ Restoring downloaded backup
  └─ Customizing email templates
Reference
  ├─ CLI configuration
  └─ CLI commands
Testing …

Clarified

  • Made the global install vs. project dependency model explicit across the landing quickstart and the install page: Homebrew/Scoop give a global supabase; npm/pnpm/yarn install a dev dependency you run via npx supabase.
  • Added a project-scoped note (init first) and fixed the confusing install-tab labeling.

Fixed

  • seeding-your-database.mdx: corrected invalid SQL in the example (string literals were double-quoted) and reframed Snaplet as an optional, community-maintained tool with working links.
  • database-migrations.mdx: removed the confusing unconditional db pull step in the deploy flow and a stale "we're consolidating commands" note.
  • cli-workflows.mdx: aligned gen types with the current CLI syntax (--lang typescript).

Files

  • apps/docs/content/guides/local-development/ (new guide, rename, edits)
  • apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
  • apps/www/lib/redirects.js

Summary by CodeRabbit

  • Documentation
    • Restructured local development docs with clearer navigation, prerequisites, and streamlined quickstart wording.
    • Added an end-to-end local CLI workflow covering setup, daily development, migrations, and troubleshooting.
    • Clarified CLI installation/usage differences (global vs project-scoped installs) and improved supabase init/start guidance.
    • Updated database migrations and seeding instructions, including when to use db pull/db reset and recommending a hand-written supabase/seed.sql.
  • Navigation
    • Refreshed the local development menu hierarchy and reshaped the CLI reference section.
  • Bug Fixes
    • Fixed/redirected legacy local development URLs to the database migrations guide.

@aantti aantti self-assigned this Jul 14, 2026
@aantti aantti added the documentation Improvements or additions to documentation label Jul 14, 2026
@aantti
aantti requested a review from a team as a code owner July 14, 2026 15:47
@aantti aantti added the cli Related to supabase/cli label Jul 14, 2026
@supabase

supabase Bot commented Jul 14, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel

vercel Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment, Open in v0 Jul 15, 2026 10:32am
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 15, 2026 10:32am
design-system Skipped Skipped Jul 15, 2026 10:32am
studio-self-hosted Skipped Skipped Jul 15, 2026 10:32am
studio-staging Skipped Skipped Jul 15, 2026 10:32am
ui-library Skipped Skipped Jul 15, 2026 10:32am
zone-www-dot-com Skipped Skipped Jul 15, 2026 10:32am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Local development documentation was reorganized around CLI setup, end-to-end workflows, migrations, and seeding. Navigation entries and legacy redirects now point to the revised guide structure.

Changes

Local development documentation

Layer / File(s) Summary
CLI installation and local setup
apps/docs/content/guides/local-development.mdx, apps/docs/content/guides/local-development/cli/getting-started.mdx
Installation tabs, project-scoped CLI usage, container prerequisites, Quickstart steps, and local CLI instructions were revised.
End-to-end CLI workflows
apps/docs/content/guides/local-development/cli-workflows.mdx
A new guide covers existing-project migration, new-project setup, daily workflows, commands, migration cleanup, and troubleshooting.
Migration and seeding guidance
apps/docs/content/guides/local-development/database-migrations.mdx, apps/docs/content/guides/local-development/seeding-your-database.mdx
Migration linking guidance, workflow cross-references, seed-data recommendations, SQL examples, and Seed links were updated.
Navigation and URL wiring
apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts, apps/www/lib/redirects.js
The local development menu was reshaped and legacy paths were redirected to the database migrations guide.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: chrischinchilla

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately summarizes the main docs restructure and new workflow guide.
Description check ✅ Passed The description follows the template and covers the change, new behavior, and context; only the current-behavior/issue-link section is light.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/refine-cli-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aantti
aantti requested review from avallete and nrichers July 14, 2026 15:55
aantti and others added 4 commits July 14, 2026 17:56
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@nrichers

Copy link
Copy Markdown
Contributor

LGTM conditional on addressing the comments. Nothing major, just some consistency nits. Thank you so much for getting your CLI content into a PR after all these months! And thank you for sorting out a real pain point for our users, much appreciated. 💚

Summary

Strong restructure of the Local Dev / CLI section. The new workflow guide fills a real gap, the nav is much clearer, and the correctness fixes (seed SQL, conditional db pull, Snaplet context) are welcome.

What works well

  • Linear nav flow replaces the confusing twin "Getting started" entries
  • cli-workflows.mdx is a practical end-to-end guide (two entry paths, daily loop, push, migration cleanup, troubleshooting)
  • overview → database-migrations rename matches the content
  • Redirects cover the old slug
  • Global vs project-scoped CLI install is explained consistently

Nits (non-blocking)

  • A few link labels still say "Getting started" while nav says "Install and run the CLI"
  • local-development.mdx L160: "CLI Getting Started guide" could match the new nav label (no inline comment; line unchanged in diff)
  • Minor wording/precision issues in the key-commands table and benefits list
  • Small example-name inconsistency in the daily workflow tabs

CI: supa-mdx-lint and format pass on latest commit.

Verdict: Approve with nits

@avallete avallete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'll want to update this document once we make pg-delta the new default for all the "diff/declarative schema" story.

It introduces some new commands that I think might help reduce the pitfalls users currently get:

https://github.com/orgs/supabase/discussions/44938

Meanwhile, this is a good documentation, the "use the declarative schema once you write in it" is good. I think in the future, we might provide an alternative to use db declarative export to re-generate (hence extract) from database state toward your declarative schema, if you ever experiment with pure psql and wanna get back the result into your declarative schema flow.

@aantti
aantti merged commit 7cffbcc into master Jul 15, 2026
35 checks passed
@aantti
aantti deleted the docs/refine-cli-docs branch July 15, 2026 12:48
@github-actions

Copy link
Copy Markdown
Contributor

Braintrust eval report

Evals in progress... ⌛

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli Related to supabase/cli documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants