Commit Graph
7 Commits
Author SHA1 Message Date
Colum Ferry a1616e0076 docs(cli): supabase init creates config.jsonc for new projects (#53857)
## Problem

Since CLI 3.4.0 (released 2026-11-24), `supabase init` creates
`supabase/config.jsonc` for new projects instead of
`supabase/config.toml`. The file starts with a `$schema` key, so editors
get validation and autocomplete straight away. Projects that already
have a `config.toml` aren't touched, and the CLI keeps reading it the
same way.

A handful of guides still say `init` creates `config.toml`.

## Solution

- `cli/config-formats.mdx`: the file table marks `config.jsonc` as the
one `init` creates in CLI 3.4.0 and later, and the "Minimum CLI version"
section says earlier versions create `config.toml`. Under the table
there's a short line saying a `config.toml` project keeps working, and
pointing at `supabase config convert --to toml` for anyone who wants
TOML. The schema section says `init` writes the `$schema` key into
`config.jsonc`, rather than the TOML `#:schema` line.
- `cli/getting-started.mdx`: the setup admonition and the `supabase
init` step name `config.jsonc`, and the step mentions `config convert
--to toml` with a link to Config file formats.
- `managing-config.mdx`, `cli-workflows.mdx` (step 1 and the key
commands table) and `running-multiple-local-projects.mdx` (the
`SUPABASE_EXPERIMENTAL_STACK=1 supabase init` bit) had the same "init
creates `config.toml`" statement, so I've updated those too.

I've left the many "edit `supabase/config.toml`" references across the
other guides alone - they're about where a setting lives rather than
what `init` creates, and the per-format config examples cover them.

## Review instructions

1. Open Config file formats, CLI getting started, Managing config and
Local development workflow on the preview.
2. Check they say `supabase init` creates `config.jsonc` (CLI 3.4.0 and
later), and that `config.toml` projects are described as still working.
3. Check the `--to toml` links land on the "Convert back to TOML"
section.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-25 10:38:11 +00:00
Colum Ferry 95cf9a78a7 docs(cli): show config examples in TOML and JSONC (#53449)
## Problem

The CLI reads `supabase/config.jsonc` (and `config.json`) since v3.1.0,
but every docs page still shows `config.toml` only. There's also no page
explaining the formats, how to switch, the `$schema` / `#:schema`
declaration, or editor setup, and no reference pages for the new
`supabase config convert` and `supabase config validate` commands.

Linear: CLI-2871

## Solution

- **Dual-format examples from one source.** A new directive
(`features/directives/ConfigFormats.ts`) picks up any ```` ```toml ````
fence with `name=supabase/config.toml` and renders it as
`supabase/config.toml` / `supabase/config.jsonc` tabs. The JSONC is
generated at build time with `convertCliConfigTomlToJsonc` from
`@supabase/config`, the same converter `supabase config convert` uses,
so authors only write TOML and the JSONC matches what the CLI would
produce (comments included). Inside `<$CodeTabs>` the JSONC is added as
an extra tab.
- **The format choice sticks.** `ConfigCodeTabs` keeps the selected
format in `localStorage`, so choosing JSONC switches every config
example on the page and on later pages.
- **Config reference.** The `usage` examples on
`/guides/local-development/cli/config` use the same tabs (they were
highlighted as Python before), and the intro mentions `config.jsonc`.
The `remotes.<branch_name>` example now uses `[remotes.staging]`, since
`<branch_name>` isn't a valid TOML key.
- **New guide, "Config file formats"**
(`/guides/local-development/cli/config-formats`): which file wins,
minimum CLI version, `convert` and `validate`, schema declaration and
versioning, and editor setup (VS Code trusted domains, Even Better TOML,
Tombi, SchemaStore).
- **CLI reference.** Adds `supabase-config-convert` and
`supabase-config-validate` to the CLI reference nav.
`cli_v1_commands.yaml` is the generated v3.2.0 reference, identical to
the release bot's update in #53463, so the two PRs don't conflict.
- **Content.** About 60 existing config examples across the guides,
including the Branching configuration page, are tagged
`name=supabase/config.toml`. Branching reads `config.json` and
`config.jsonc` as well, and the Branching configuration page now says
so. Non-Supabase TOML (`pyproject.toml`, `bunfig.toml`) and the v2-era
`[inbucket]` before/after snippet stay TOML-only.
- **Format-neutral prose.** Sentences that described the config as
`config.toml` now say "your config file", naming `supabase/config.toml`
and `supabase/config.jsonc` once per page. TOML section syntax in prose
(`max_frequency` under `[auth.email]`) is written as key paths
(`auth.email.max_frequency`), which read the same in both formats.
Headings that named `config.toml` keep their old anchors. Sentences
about what `supabase init` creates still say `config.toml`.
- **Markdown export for agents.**
`internals/generate-guides-markdown.ts` runs the same transform, so the
`.md` pages served to AI agents include the JSONC example after each
TOML one.
- A test converts every tagged example under `content/`, so a broken
TOML example fails tests instead of the build.

New dependencies for `apps/docs`: `@supabase/config` (^1.8.0) and
`effect` (the same `effect` version Studio pins).

`config convert` and `config validate` ship in CLI v3.2.0, which is now
stable.

## Review instructions

1. Open `/docs/guides/local-development/seeding-your-database` on the
preview. Switch an example to `supabase/config.jsonc` and check the
other examples on the page switch too.
2. Open `/docs/guides/local-development/cli/config` and check the usage
examples open on JSONC.
3. Read `/docs/guides/local-development/cli/config-formats`.
4. Open `/docs/reference/cli/supabase-config-convert` and
`/docs/reference/cli/supabase-config-validate`.

## Self-review

Ran the `review-the-docs` local self-review (content, pipeline, and
component checks) over the 54 changed pages.

- No blockers. Fixed the nits it found: leftover TOML section syntax in
prose (diff engines, declarative schemas, Branching, the common settings
table on Local and hosted projects), a few long or ungrammatical
sentences, and the conversion follow-up steps on Config file formats,
now a list.
- Links, custom anchors, nav wiring, and frontmatter check out.
- The `.md` export on the preview shows each TOML example followed by
its JSONC version.
- `test-the-docs` deferred: the changed fences are config snippets, and
`ConfigFormats.test.ts` already converts every tagged example. No
procedural steps changed apart from the `config convert` and `config
validate` commands on the new page.

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-11-20 14:34:59 +00:00
Kody JacksonandClaude Sonnet 5.5 8d6d27ae4a docs: add cross-links in guides (getting started, platform, storage, and others) (#53561)
Adds internal cross-links to docs guides

## Testing

- Prettier passes on the changed lines.
- Docs build passes (`pnpm build --filter=docs`).
- Docs link e2e run locally against the production build for every
changed page across this PR.

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 08:56:46 -06:00
Colum Ferry d97a410577 docs: add a Supabase CLI v2 to v3 migration guide (#52147)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Docs update

## What is the current behavior?

There's no page covering the breaking changes between Supabase CLI v2
and v3. v3.0.0 was released on 2026-11-02.

## What is the new behavior?

Adds a migration guide at
`/docs/guides/local-development/cli/migrating-to-v3`, linked from the
Local Dev / CLI nav just under "Install and run the CLI". It's modelled
on [Vite's migration guide](https://vite.dev/guide/migration): a short
summary, what to do before upgrading, how to install (or stay on v2), a
CI quick-reference table, then one section per change, ending with the
removed commands, flags, config keys and env vars as tables.

The content comes from the `BREAKING CHANGE` footers of the breaking PRs
on supabase/cli `next`, checked against the code there:
supabase/cli#6609, supabase/cli#7064, supabase/cli#7066,
supabase/cli#7074, supabase/cli#7109, supabase/cli#7116,
supabase/cli#7172, supabase/cli#7176, supabase/cli#7188 and
supabase/cli#7221.

## Additional context

The page describes v3.0.0 as released: npm `latest`, Homebrew, Scoop and
the Linux packages all install v3.

The "Staying on v2" channels are live with v2.122.1: npm `v2.stable`,
`supabase/tap/supabase@2`, `supabase-v2-stable` on Scoop, and `version:
v2.stable` or a semver range like `^2` on `supabase/setup-cli@v3`
(ranges need v3.2.0).

It also updates about 60 existing guides and troubleshooting pages for
v3. Hosted examples pass `--remote`, CI examples that change a hosted
project pass `--yes`, deprecated target flags and removed commands are
replaced, and pages that described migra as the default now describe
pg-delta.

It adds a new concept page, "Running commands against local and hosted
projects" at `/docs/guides/local-development/local-and-hosted-projects`,
linked from the Local Dev nav after "Local development workflow". It
covers how a command picks its target (local by default, `--remote` and
its forms, the linked project, the `Target:` line), how settings resolve
(flag, then shell env, then project env files, then config), and when
the CLI asks before changing a hosted project (`--yes`, `SUPABASE_YES`,
`--dry-run`, seeding), with a CI recipe and a section for AI coding
agents. The migration guide links to it from its target, consent and
config sections.

Tracks CLI-2747

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-11-02 13:44:40 +00:00
Wen Bo Xie d46e226af8 docs(cli): update local stack guides for CLI v2.120.0 and v2.121.0 behavior (#51751)
## Problem

The two `supabase stack` guides describe behavior the CLI changed in
v2.120.0 (Oct 6) and v2.121.0 (deploy PR supabase/cli#7104 open). A
reader following them today hits different output than the pages
promise.

  | Guide says | CLI does | Since |
  | --- | --- | --- |
| `stack logs` streams live lines only, no history | Keeps history, adds
`--tail`, `--since`, `--service gateway`, reads while stopped
(supabase/cli#6893) | v2.120.0 |
| Rejected config change fails with `cannot change on the saved stack` |
Fails with `The saved stack cannot adopt these changes`
(supabase/cli#6944) | v2.120.0 |
| Port changes always need a new local project | A stopped project
re-plans ports on next start (supabase/cli#6950) | v2.121.0 |
| No bulk destroy | `destroy` accepts repeated `--stack-id`
(supabase/cli#7000) | v2.121.0 |
| OrioleDB unsupported | `db.orioledb_version` runs in both runtimes
(supabase/cli#6934) | v2.121.0 |
| Nothing about native `pg_cron` | Jobs run in background workers;
earlier versions fail every job (supabase/cli#7039) | v2.121.0 |

The CLI getting-started guide (#50736) also says a container runtime is
required and never mentions the native runtime.

  ## Solution

Updated both stack guides and added one sentence to the getting-started
prerequisites.

- v2.121.0-only behavior is marked "In CLI v2.121.0 or later", with the
earlier behavior stated beside it. The guides' baseline stays at
v2.119.0.
- Every claim was checked against supabase/cli `develop` source and the
commits above.
- The `supabase stack` commands stay out of the generated CLI reference
by design, so these guides remain the only place the flags are
documented.

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)
2026-10-14 16:45:07 +02:00
Wen Bo Xie f414a68e1b docs(cli): address final review feedback on supabase stack guides (#51217)
- Add stack = true under the existing [experimental] table instead of
pasting a duplicate table, which leaves the setting off.
- Note that db dump targets the linked project unless --local is passed,
and that --db-url reaches a named local project through DB_URL.
- Qualify offline destroy on the host data being deletable, and scope
the shared Docker volume cleanup note to volume-backed projects.
- Say Docker database storage is chosen when the local project is
created.
- Allow GitHub's release download host alongside github.com, or the S3
host alone, in allowlisted sandboxes.
- www: most services stop when idle (not Functions), and state the
[experimental] stack prerequisite in the native runtime entry.
2026-10-05 09:26:52 -04:00
Wen Bo Xie ffd2754c7a docs(cli): document experimental supabase stack commands and native runtime (#50391)
Add two guides under Local Development for the experimental `supabase
stack` commands, wire them into the docs nav, the CLI reference, the
marketing features list, and the pages that readers reach with a port
conflict.

New pages:
- guides/local-development/parallel-projects: run one local project per
app, git worktree, branch, or named environment on a single machine.
Covers identity, automatic port assignment, removing fixed ports from
config.toml, named projects, finding endpoints, stop and destroy, the
`[experimental] stack` setting, and current limitations.
- guides/local-development/runtimes: the Docker and native runtimes, how
the CLI picks one, native platform requirements, artifact download and
cache locations, and runtime limitations.

Cross-links and context:
- Local development index, CLI getting started, CLI workflows, managing
environments, AI tools, MCP, and the edge functions port troubleshooting
entry now point readers to the new guides where a second `supabase
start` fails on a port conflict.
- CLI reference: `supabase stack`, `stack start`, `stack stop`, `stack
destroy`, the `experimental.stack` config key, and a note on `supabase
start` and `[experimental] stack`.
- www: two feature entries and copy tweaks on the hosted Postgres and
innovation teams solution pages.
- supa-mdx-lint: allow worktree, glibc, musl, and checksum.
2026-10-02 08:39:18 +02:00