Files
supabase/apps/docs/internals
Miranda Limonczenko bc917370d1 docs: recommend a local CLI install on the front page (#50356)
Closes DOCS-1391

## 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?

The docs front page is the only place that still recommends a global CLI
install. It shows `npm install -g supabase` in both the CLI tab and the
AI prompt, and tells the agent to run `supabase init`.

Everywhere else in the docs installs the CLI as a project dev
dependency, so the version is pinned in `package.json` and everyone on a
team runs the same one.

## What is the new behavior?

- `installCli` becomes `npm install supabase --save-dev`, matching
[Install and run the
CLI](https://supabase.com/docs/guides/local-development/cli/getting-started).
- `initialize` becomes `npx supabase init`. A dev-dependency install
leaves no global `supabase` command.
- The AI prompt says "as a project dev dependency" and states the
reason, so an agent doesn't fall back to a global install.
- Updates the same wording in the monitoring and debugging prompt, which
shares the constants.
- Updates the `AiPrompt` markdown schema test assertion.

## Manual testing

1. Open the [docs front page
preview](https://docs-git-docs-cli-local-install-supabase.vercel.app/docs).
The AI Prompt tab reads "Install the Supabase CLI as a project dev
dependency with `npm install supabase --save-dev`, so the version is
pinned per project" and ends with `npx supabase init`.
2. Select the **CLI** tab. It shows `npm install supabase --save-dev` on
the first line and `npx plugins add supabase-community/supabase-plugin`
on the second.
3. Run `pnpm run -F docs test:local:unwatch
internals/markdown-schema/AiPrompt.test.ts`. All tests pass.
2026-09-14 12:21:59 -07:00
..