From f53ed0ef0c1cc12f945dfff82020d7f87dccf533 Mon Sep 17 00:00:00 2001
From: Copple <10214025+kiwicopple@users.noreply.github.com>
Date: Fri, 12 Aug 2022 13:23:19 +0200
Subject: [PATCH 1/5] Formats the CLI usage
---
apps/reference/_cli/usage.mdx | 415 ++++++++++--------
apps/reference/src/css/custom.css | 3 +
packages/spec/src/docs/cli.ts | 15 +-
.../spec/src/docs/templates/CliTemplate.ts | 15 +-
4 files changed, 264 insertions(+), 184 deletions(-)
diff --git a/apps/reference/_cli/usage.mdx b/apps/reference/_cli/usage.mdx
index 92173fd9a22..d5e0d11e246 100644
--- a/apps/reference/_cli/usage.mdx
+++ b/apps/reference/_cli/usage.mdx
@@ -1,11 +1,13 @@
---
id: usage
title: Usage
+toc_max_heading_level: 3
---
-Supabase CLI
+Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform.
+
@@ -13,12 +15,12 @@ Supabase CLI
-## Stop the Supabase local development setup {#supabase-stop}
+### Stop all local Supabase containers {#supabase-stop}
+
-### Usage
```sh
supabase stop [flags]
@@ -26,7 +28,9 @@ supabase stop [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for stop
@@ -38,12 +42,12 @@ supabase stop [flags]
-## Show status of the Supabase local development setup {#supabase-status}
+### Show status of local Supabase containers {#supabase-status}
+
-### Usage
```sh
supabase status [flags]
@@ -51,7 +55,9 @@ supabase status [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for status
@@ -63,12 +69,12 @@ supabase status [flags]
-## Start the Supabase local development setup {#supabase-start}
+### Start containers for Supabase local development {#supabase-start}
+
-### Usage
```sh
supabase start [flags]
@@ -76,7 +82,9 @@ supabase start [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for start
@@ -93,23 +101,23 @@ supabase start [flags]
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-secrets-list
+- supabase secrets list
-- supabase-secrets-set
+- supabase secrets set
-- supabase-secrets-unset
+- supabase secrets unset
-### Options
+**Options**
```sh
-h, --help help for secrets
@@ -121,12 +129,12 @@ supabase start [flags]
-## Unset a secret(s) from the linked Supabase project {#supabase-secrets-unset}
+### Unset a secret(s) on Supabase {#supabase-secrets-unset}
+Unset a secret(s) from the linked Supabase project.
-### Usage
```sh
supabase secrets unset ... [flags]
@@ -134,7 +142,9 @@ supabase secrets unset ... [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for unset
@@ -146,12 +156,12 @@ supabase secrets unset ... [flags]
-## Set a secret(s) to the linked Supabase project {#supabase-secrets-set}
+### Set a secret(s) on Supabase {#supabase-secrets-set}
+Set a secret(s) to the linked Supabase project.
-### Usage
```sh
supabase secrets set [flags] ...
@@ -159,7 +169,9 @@ supabase secrets set [flags] ...
-### Options
+
+
+**Options**
```sh
--env-file string Read secrets from a .env file.
@@ -172,12 +184,12 @@ supabase secrets set [flags] ...
-## List all secrets in the linked project {#supabase-secrets-list}
+### List all secrets on Supabase {#supabase-secrets-list}
+List all secrets in the linked project.
-### Usage
```sh
supabase secrets list [flags]
@@ -185,7 +197,9 @@ supabase secrets list [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for list
@@ -202,21 +216,21 @@ supabase secrets list [flags]
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-projects-create
+- supabase projects create
-- supabase-projects-list
+- supabase projects list
-### Options
+**Options**
```sh
-h, --help help for projects
@@ -228,12 +242,12 @@ supabase secrets list [flags]
-## List all projects {#supabase-projects-list}
+### List all Supabase projects {#supabase-projects-list}
+List all Supabase projects the logged-in user can access.
-### Usage
```sh
supabase projects list [flags]
@@ -241,7 +255,9 @@ supabase projects list [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for list
@@ -253,26 +269,29 @@ supabase projects list [flags]
-## Create a new project {#supabase-projects-create}
+### Create a project on Supabase {#supabase-projects-create}
+
-### Usage
```sh
-supabase projects create [flags]
+supabase projects create [flags]
```
-### Options
+
+
+**Options**
```sh
--db-password string Database password of the project.
-h, --help help for create
+ -i, --interactive Enables interactive mode.
--org-id string Organization ID to create the project in.
- --plan string Select a plan that suits your needs. Can be "free" or "pro". (default "free")
+ --plan string Select a plan that suits your needs. (default "free")
--region string Select a region close to you for the best performance.
```
@@ -287,19 +306,19 @@ supabase projects create [flags]
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-orgs-list
+- supabase orgs list
-### Options
+**Options**
```sh
-h, --help help for orgs
@@ -311,12 +330,12 @@ supabase projects create [flags]
-## List all organizations the logged-in user belongs {#supabase-orgs-list}
+### List all organizations {#supabase-orgs-list}
+List all organizations the logged-in user belongs.
-### Usage
```sh
supabase orgs list [flags]
@@ -324,7 +343,9 @@ supabase orgs list [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for list
@@ -341,19 +362,21 @@ supabase orgs list [flags]
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-migration-new
+- supabase migration list
+
+- supabase migration new
-### Options
+**Options**
```sh
-h, --help help for migration
@@ -365,12 +388,12 @@ supabase orgs list [flags]
-## Create an empty migration script {#supabase-migration-new}
+### Create an empty migration script {#supabase-migration-new}
+
-### Usage
```sh
supabase migration new [flags]
@@ -378,7 +401,9 @@ supabase migration new [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for new
@@ -390,12 +415,40 @@ supabase migration new [flags]
-## Authenticate using an access token {#supabase-login}
+### List local and remote migrations {#supabase-migration-list}
+
+
+
+
+
+
+```sh
+supabase migration list [flags]
+```
+
+
+
+
+
+**Options**
+
+```sh
+ -h, --help help for list
+ -p, --password string Password to your remote Postgres database.
+```
+
+
+
+
+
+
+
+### Authenticate using an access token {#supabase-login}
+
-### Usage
```sh
supabase login [flags]
@@ -403,7 +456,9 @@ supabase login [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for login
@@ -415,12 +470,12 @@ supabase login [flags]
-## Link to a Supabase project {#supabase-link}
+### Link to a Supabase project {#supabase-link}
+
-### Usage
```sh
supabase link [flags]
@@ -428,10 +483,13 @@ supabase link [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for link
+ -p, --password string Password to your remote Postgres database.
--project-ref string Project ref of the Supabase project.
```
@@ -441,12 +499,12 @@ supabase link [flags]
-## Initialize a project to use Supabase CLI {#supabase-init}
+### Initialize a local project {#supabase-init}
+
-### Usage
```sh
supabase init [flags]
@@ -454,7 +512,9 @@ supabase init [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for init
@@ -471,19 +531,19 @@ supabase init [flags]
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-gen-types
+- supabase gen types
-### Options
+**Options**
```sh
-h, --help help for gen
@@ -500,19 +560,19 @@ supabase init [flags]
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-gen-types-typescript
+- supabase gen types typescript
-### Options
+**Options**
```sh
-h, --help help for types
@@ -524,21 +584,23 @@ supabase init [flags]
-## Generate types for TypeScript. Must specify either --local or --db-url
- {#supabase-gen-types-typescript}
+### Generate types for TypeScript {#supabase-gen-types-typescript}
+
+
+Generate types for TypeScript. Must specify either --local or --db-url
-### Usage
-
```sh
supabase gen types typescript [flags]
```
-### Options
+
+
+**Options**
```sh
--db-url string Generate types from a database url.
@@ -557,25 +619,25 @@ supabase gen types typescript [flags]
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-functions-delete
+- supabase functions delete
-- supabase-functions-deploy
+- supabase functions deploy
-- supabase-functions-new
+- supabase functions new
-- supabase-functions-serve
+- supabase functions serve
-### Options
+**Options**
```sh
-h, --help help for functions
@@ -587,12 +649,12 @@ supabase gen types typescript [flags]
-## Serve a Function locally {#supabase-functions-serve}
+### Serve a Function locally {#supabase-functions-serve}
+
-### Usage
```sh
supabase functions serve [flags]
@@ -600,7 +662,9 @@ supabase functions serve [flags]
-### Options
+
+
+**Options**
```sh
--env-file string Path to an env file to be populated to the Function environment.
@@ -614,12 +678,12 @@ supabase functions serve [flags]
-## Create a new Function locally {#supabase-functions-new}
+### Create a new Function locally {#supabase-functions-new}
+
-### Usage
```sh
supabase functions new [flags]
@@ -627,7 +691,9 @@ supabase functions new [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for new
@@ -639,12 +705,12 @@ supabase functions new [flags]
-## Deploy a Function to the linked Supabase project {#supabase-functions-deploy}
+### Deploy a Function to Supabase {#supabase-functions-deploy}
+Deploy a Function to the linked Supabase project.
-### Usage
```sh
supabase functions deploy [flags]
@@ -652,7 +718,9 @@ supabase functions deploy [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for deploy
@@ -666,21 +734,23 @@ supabase functions deploy [flags]
-## Delete a Function from the linked Supabase project. This does NOT remove the Function locally.
- {#supabase-functions-delete}
+### Delete a Function from Supabase {#supabase-functions-delete}
+
+
+Delete a Function from the linked Supabase project. This does NOT remove the Function locally.
-### Usage
-
```sh
supabase functions delete [flags]
```
-### Options
+
+
+**Options**
```sh
-h, --help help for delete
@@ -698,27 +768,27 @@ supabase functions delete [flags]
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-db-branch
+- supabase db branch
-- supabase-db-diff
+- supabase db diff
-- supabase-db-push
+- supabase db push
-- supabase-db-remote
+- supabase db remote
-- supabase-db-reset
+- supabase db reset
-### Options
+**Options**
```sh
-h, --help help for db
@@ -730,12 +800,12 @@ supabase functions delete [flags]
-## Resets the local database to current migrations {#supabase-db-reset}
+### Resets the local database to current migrations {#supabase-db-reset}
+
-### Usage
```sh
supabase db reset [flags]
@@ -743,7 +813,9 @@ supabase db reset [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for reset
@@ -755,31 +827,30 @@ supabase db reset [flags]
-## Manage remote database connections {#supabase-db-remote}
+## Manage remote databases {#supabase-db-remote}
-### Usage
-### Available Commands
+
+**Available Commands**
-- supabase-db-remote-changes
+- supabase db remote changes
-- supabase-db-remote-commit
-
-- supabase-db-remote-set
+- supabase db remote commit
-### Options
+**Options**
```sh
- -h, --help help for remote
+ -h, --help help for remote
+ -p, --password string Password to your remote Postgres database.
```
@@ -788,38 +859,12 @@ supabase db reset [flags]
-## Set the remote database to push migrations to {#supabase-db-remote-set}
+### Commit remote changes as a new migration {#supabase-db-remote-commit}
-### Usage
-```sh
-supabase db remote set [flags]
-```
-
-
-
-### Options
-
-```sh
- -h, --help help for set
-```
-
-
-
-
-
-
-
-## Commit changes on the remote database since the last pushed migration
- {#supabase-db-remote-commit}
-
-
-
-
-### Usage
```sh
supabase db remote commit [flags]
@@ -827,7 +872,9 @@ supabase db remote commit [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for commit
@@ -839,13 +886,12 @@ supabase db remote commit [flags]
-## Print changes on the remote database since the last pushed migration
- {#supabase-db-remote-changes}
+### Show changes on the remote database {#supabase-db-remote-changes}
+Show changes on the remote database since last migration.
-### Usage
```sh
supabase db remote changes [flags]
@@ -853,7 +899,9 @@ supabase db remote changes [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for changes
@@ -865,12 +913,12 @@ supabase db remote changes [flags]
-## Push new migrations to the remote database {#supabase-db-push}
+### Push new migrations to the remote database {#supabase-db-push}
+
-### Usage
```sh
supabase db push [flags]
@@ -878,11 +926,14 @@ supabase db push [flags]
-### Options
+
+
+**Options**
```sh
- --dry-run Print the migrations that would be applied, but don't actually apply them.
- -h, --help help for push
+ --dry-run Print the migrations that would be applied, but don't actually apply them.
+ -h, --help help for push
+ -p, --password string Password to your remote Postgres database.
```
@@ -891,12 +942,12 @@ supabase db push [flags]
-## Diffs the local database for schema changes {#supabase-db-diff}
+### Diffs the local database for schema changes {#supabase-db-diff}
+
-### Usage
```sh
supabase db diff [flags]
@@ -904,7 +955,9 @@ supabase db diff [flags]
-### Options
+
+
+**Options**
```sh
-f, --file string Saves schema diff to a file.
@@ -919,31 +972,31 @@ supabase db diff [flags]
-## Manage branches. Each branch is associated with a separate database.
- {#supabase-db-branch}
+## Manage database branches {#supabase-db-branch}
+
+
+Manage database branches. Each branch is associated with a separate database.
-### Usage
-
-### Available Commands
+**Available Commands**
-- supabase-db-branch-create
+- supabase db branch create
-- supabase-db-branch-delete
+- supabase db branch delete
-- supabase-db-branch-list
+- supabase db branch list
-- supabase-db-branch-switch
+- supabase db branch switch
-### Options
+**Options**
```sh
-h, --help help for branch
@@ -955,12 +1008,12 @@ supabase db diff [flags]
-## Switch the active branch {#supabase-db-branch-switch}
+### Switch the active branch {#supabase-db-branch-switch}
+
-### Usage
```sh
supabase db branch switch [flags]
@@ -968,7 +1021,9 @@ supabase db branch switch [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for switch
@@ -980,12 +1035,12 @@ supabase db branch switch [flags]
-## List branches {#supabase-db-branch-list}
+### List branches {#supabase-db-branch-list}
+
-### Usage
```sh
supabase db branch list [flags]
@@ -993,7 +1048,9 @@ supabase db branch list [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for list
@@ -1005,12 +1062,12 @@ supabase db branch list [flags]
-## Delete a branch {#supabase-db-branch-delete}
+### Delete a branch {#supabase-db-branch-delete}
+
-### Usage
```sh
supabase db branch delete [flags]
@@ -1018,7 +1075,9 @@ supabase db branch delete [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for delete
@@ -1030,12 +1089,12 @@ supabase db branch delete [flags]
-## Create a branch {#supabase-db-branch-create}
+### Create a branch {#supabase-db-branch-create}
+
-### Usage
```sh
supabase db branch create [flags]
@@ -1043,7 +1102,9 @@ supabase db branch create [flags]
-### Options
+
+
+**Options**
```sh
-h, --help help for create
diff --git a/apps/reference/src/css/custom.css b/apps/reference/src/css/custom.css
index 352fca0433e..7bb9b269b7f 100644
--- a/apps/reference/src/css/custom.css
+++ b/apps/reference/src/css/custom.css
@@ -245,6 +245,8 @@
}
.markdown p a,
+.markdown p a code,
+.markdown li a code,
.markdown li a {
transition: box-shadow 0.1s ease-in-out;
padding-bottom: 2px;
@@ -252,6 +254,7 @@
box-shadow: var(--custom-primary) 0px -3px 0px -1px inset;
}
.markdown p a:hover,
+.markdown a:hover code,
.markdown li a:hover {
box-shadow: inset 0 -30px 0 -1px var(--custom-primary);
/* text-shadow: 0px 0px 3px var(--custom-primary-darkest); */
diff --git a/packages/spec/src/docs/cli.ts b/packages/spec/src/docs/cli.ts
index 85eddf84d9c..331747f4d75 100644
--- a/packages/spec/src/docs/cli.ts
+++ b/packages/spec/src/docs/cli.ts
@@ -26,7 +26,20 @@ export default async function gen(inputFileName: string, outputDir: string) {
* Versioned Generator
*/
async function gen_v001(spec: CliSpec, dest: string) {
- const commands = spec.commands
+ let commandMap = new Map(spec.commands.map((item) => [item.id, item]))
+
+ const commands = spec.commands.map((x) => {
+ const isChild = x.subcommands.length < 1
+ const heading = isChild
+ ? `### ${x.summary} {#${x.id}}`
+ : `## ${x.summary} {#${x.id}}`
+
+ return {
+ ...x,
+ heading,
+ subcommandList: x.subcommands.map((c) => commandMap.get(c)),
+ }
+ })
const content = ejs.render(template, {
info: spec.info,
diff --git a/packages/spec/src/docs/templates/CliTemplate.ts b/packages/spec/src/docs/templates/CliTemplate.ts
index 1f441e96fbf..5e7b1d629b2 100644
--- a/packages/spec/src/docs/templates/CliTemplate.ts
+++ b/packages/spec/src/docs/templates/CliTemplate.ts
@@ -2,6 +2,7 @@ const template = `
---
id: usage
title: Usage
+toc_max_heading_level: 3
---
@@ -14,24 +15,26 @@ title: Usage
-## <%- command.summary %> {#<%- command.id %>}
+<%- command.heading %>
<%- command.description %>
-### Usage
+<% if(command.usage){ %>
<%- command.usage %>
+<% }; %>
+
<% if(command.subcommands.length > 0){ %>
-### Available Commands
+**Available Commands**
-<% command.subcommands.forEach(function(subcommand){ %>
-- <%- subcommand %>
+<% command.subcommandList.forEach(function(subcommand){ %>
+- <%- subcommand.title %>
<% }); %>
<% } %>
-### Options
+**Options**
<%- command.options %>
From b703f149627400d0b37b2436dc0b03d5698ff909 Mon Sep 17 00:00:00 2001
From: Copple <10214025+kiwicopple@users.noreply.github.com>
Date: Fri, 12 Aug 2022 13:27:04 +0200
Subject: [PATCH 2/5] Adds release notes
---
apps/reference/_cli/release-notes.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/reference/_cli/release-notes.mdx b/apps/reference/_cli/release-notes.mdx
index 77883904adc..e10337f8d04 100644
--- a/apps/reference/_cli/release-notes.mdx
+++ b/apps/reference/_cli/release-notes.mdx
@@ -4,4 +4,4 @@ id: release-notes
# Release Notes
-Start your release notes here.
\ No newline at end of file
+All release notes can be found in the [GitHub Releases page](https://github.com/supabase/cli/releases).
From 00cb2f4d6c13d217d17a134f12140a31dfb9d55d Mon Sep 17 00:00:00 2001
From: Copple <10214025+kiwicopple@users.noreply.github.com>
Date: Fri, 12 Aug 2022 13:41:24 +0200
Subject: [PATCH 3/5] More docs
---
.../_cli/installing-and-updating.mdx | 70 +++++
apps/reference/_cli/intro.mdx | 14 +-
apps/reference/_cli/usage.mdx | 271 +++++++++++++++---
apps/reference/nav/cli_sidebars.js | 1 +
.../spec/src/docs/templates/CliTemplate.ts | 11 +-
5 files changed, 325 insertions(+), 42 deletions(-)
create mode 100644 apps/reference/_cli/installing-and-updating.mdx
diff --git a/apps/reference/_cli/installing-and-updating.mdx b/apps/reference/_cli/installing-and-updating.mdx
new file mode 100644
index 00000000000..4585fd0d0b5
--- /dev/null
+++ b/apps/reference/_cli/installing-and-updating.mdx
@@ -0,0 +1,70 @@
+---
+id: installing-and-updating
+---
+
+# Installing and Updating
+
+## macOS
+
+### Installing
+
+Available via [Homebrew](https://brew.sh). To install:
+
+```sh
+brew install supabase/tap/supabase
+```
+
+### Upgrading
+
+To upgrade:
+
+```sh
+brew upgrade supabase
+```
+
+## Windows
+
+### Installing
+
+Available via [Scoop](https://scoop.sh). To install:
+
+```powershell
+scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
+scoop install supabase
+```
+
+### Upgrading
+
+To upgrade:
+
+```powershell
+scoop update supabase
+```
+
+## Linux
+
+### Homebrew
+
+Available via [Homebrew](https://brew.sh) and Linux packages.
+
+To install:
+
+```sh
+brew install supabase/tap/supabase
+```
+
+To upgrade:
+
+```sh
+brew upgrade supabase
+```
+
+### Linux packages
+
+Linux packages are provided in [Releases](https://github.com/supabase/cli/releases).
+To install, download the `.apk`/`.deb`/`.rpm` file depending on your package manager
+and run one of the following:
+
+- `sudo apk add --allow-untrusted <...>.apk`
+- `sudo dpkg -i <...>.deb`
+- `sudo rpm -i <...>.rpm`
diff --git a/apps/reference/_cli/intro.mdx b/apps/reference/_cli/intro.mdx
index e11e387e866..bf83f846353 100644
--- a/apps/reference/_cli/intro.mdx
+++ b/apps/reference/_cli/intro.mdx
@@ -3,8 +3,20 @@ id: intro
slug: /
sidebar_position: 1
sidebar_label: Supabase CLI
+hide_table_of_contents: true
---
# Supabase CLI
-Manage your Supabase projects.
+The Supabase CLI can be found in our [CLI](https://github.com/supabase/cli) repository.
+
+The CLI is still under heavy development, but it will contain all the functionality for working with Supabase projects and the Supabase platform.
+
+- [x] Running Supabase locally
+- [x] Self-hosting
+- [ ] Managing database migrations (in progress)
+- [ ] Pushing your local changes to production
+- [ ] Manage your Supabase Account
+- [ ] Manage your Supabase Projects
+- [ ] Generating types directly from your database schema
+- [ ] Generating API and validation schemas from your database
diff --git a/apps/reference/_cli/usage.mdx b/apps/reference/_cli/usage.mdx
index d5e0d11e246..906f5833b29 100644
--- a/apps/reference/_cli/usage.mdx
+++ b/apps/reference/_cli/usage.mdx
@@ -4,19 +4,20 @@ title: Usage
toc_max_heading_level: 3
---
-
+
Supabase CLI provides you with tools to develop your application locally, and deploy your application to the Supabase platform.
-
+
### Stop all local Supabase containers {#supabase-stop}
+
@@ -27,9 +28,13 @@ supabase stop [flags]
```
+
+
+
+
**Options**
```sh
@@ -38,12 +43,13 @@ supabase stop [flags]
-
+
### Show status of local Supabase containers {#supabase-status}
+
@@ -54,9 +60,13 @@ supabase status [flags]
```
+
+
+
+
**Options**
```sh
@@ -65,12 +75,13 @@ supabase status [flags]
-
+
### Start containers for Supabase local development {#supabase-start}
+
@@ -81,9 +92,13 @@ supabase start [flags]
```
+
+
+
+
**Options**
```sh
@@ -92,18 +107,20 @@ supabase start [flags]
-
+
## Manage Supabase secrets {#supabase-secrets}
+
+
**Available Commands**
@@ -117,6 +134,9 @@ supabase start [flags]
+
+
+
**Options**
```sh
@@ -125,12 +145,13 @@ supabase start [flags]
-
+
### Unset a secret(s) on Supabase {#supabase-secrets-unset}
+
Unset a secret(s) from the linked Supabase project.
@@ -141,9 +162,13 @@ supabase secrets unset ... [flags]
```
+
+
+
+
**Options**
```sh
@@ -152,12 +177,13 @@ supabase secrets unset ... [flags]
-
+
### Set a secret(s) on Supabase {#supabase-secrets-set}
+
Set a secret(s) to the linked Supabase project.
@@ -168,9 +194,13 @@ supabase secrets set [flags] ...
```
+
+
+
+
**Options**
```sh
@@ -180,12 +210,13 @@ supabase secrets set [flags] ...
-
+
### List all secrets on Supabase {#supabase-secrets-list}
+
List all secrets in the linked project.
@@ -196,9 +227,13 @@ supabase secrets list [flags]
```
+
+
+
+
**Options**
```sh
@@ -207,18 +242,20 @@ supabase secrets list [flags]
-
+
## Manage Supabase projects {#supabase-projects}
+
+
**Available Commands**
@@ -230,6 +267,9 @@ supabase secrets list [flags]
+
+
+
**Options**
```sh
@@ -238,12 +278,13 @@ supabase secrets list [flags]
-
+
### List all Supabase projects {#supabase-projects-list}
+
List all Supabase projects the logged-in user can access.
@@ -254,9 +295,13 @@ supabase projects list [flags]
```
+
+
+
+
**Options**
```sh
@@ -265,12 +310,13 @@ supabase projects list [flags]
-
+
### Create a project on Supabase {#supabase-projects-create}
+
@@ -281,9 +327,13 @@ supabase projects create [flags]
```
+
+
+
+
**Options**
```sh
@@ -297,18 +347,20 @@ supabase projects create [flags]
-
+
## Manage Supabase organizations {#supabase-orgs}
+
+
**Available Commands**
@@ -318,6 +370,9 @@ supabase projects create [flags]
+
+
+
**Options**
```sh
@@ -326,12 +381,13 @@ supabase projects create [flags]
-
+
### List all organizations {#supabase-orgs-list}
+
List all organizations the logged-in user belongs.
@@ -342,9 +398,13 @@ supabase orgs list [flags]
```
+
+
+
+
**Options**
```sh
@@ -353,18 +413,20 @@ supabase orgs list [flags]
-
+
## Manage database migration scripts {#supabase-migration}
+
+
**Available Commands**
@@ -376,6 +438,9 @@ supabase orgs list [flags]
+
+
+
**Options**
```sh
@@ -384,12 +449,13 @@ supabase orgs list [flags]
-
+
### Create an empty migration script {#supabase-migration-new}
+
@@ -400,9 +466,13 @@ supabase migration new [flags]
```
+
+
+
+
**Options**
```sh
@@ -411,12 +481,13 @@ supabase migration new [flags]
-
+
### List local and remote migrations {#supabase-migration-list}
+
@@ -427,9 +498,13 @@ supabase migration list [flags]
```
+
+
+
+
**Options**
```sh
@@ -439,12 +514,13 @@ supabase migration list [flags]
-
+
### Authenticate using an access token {#supabase-login}
+
@@ -455,9 +531,13 @@ supabase login [flags]
```
+
+
+
+
**Options**
```sh
@@ -466,12 +546,13 @@ supabase login [flags]
-
+
### Link to a Supabase project {#supabase-link}
+
@@ -482,9 +563,13 @@ supabase link [flags]
```
+
+
+
+
**Options**
```sh
@@ -495,12 +580,13 @@ supabase link [flags]
-
+
### Initialize a local project {#supabase-init}
+
@@ -511,9 +597,13 @@ supabase init [flags]
```
+
+
+
+
**Options**
```sh
@@ -522,18 +612,20 @@ supabase init [flags]
-
+
## Run code generation tools {#supabase-gen}
+
+
**Available Commands**
@@ -543,6 +635,9 @@ supabase init [flags]
+
+
+
**Options**
```sh
@@ -551,18 +646,20 @@ supabase init [flags]
-
+
## Generate types from Postgres schema {#supabase-gen-types}
+
+
**Available Commands**
@@ -572,6 +669,9 @@ supabase init [flags]
+
+
+
**Options**
```sh
@@ -580,12 +680,13 @@ supabase init [flags]
-
+
### Generate types for TypeScript {#supabase-gen-types-typescript}
+
Generate types for TypeScript. Must specify either --local or --db-url
@@ -597,9 +698,13 @@ supabase gen types typescript [flags]
```
+
+
+
+
**Options**
```sh
@@ -610,18 +715,20 @@ supabase gen types typescript [flags]
-
+
## Manage Supabase Edge functions {#supabase-functions}
+
+
**Available Commands**
@@ -637,6 +744,9 @@ supabase gen types typescript [flags]
+
+
+
**Options**
```sh
@@ -645,12 +755,13 @@ supabase gen types typescript [flags]
-
+
### Serve a Function locally {#supabase-functions-serve}
+
@@ -661,9 +772,13 @@ supabase functions serve [flags]
```
+
+
+
+
**Options**
```sh
@@ -674,12 +789,13 @@ supabase functions serve [flags]
-
+
### Create a new Function locally {#supabase-functions-new}
+
@@ -690,9 +806,13 @@ supabase functions new [flags]
```
+
+
+
+
**Options**
```sh
@@ -701,12 +821,13 @@ supabase functions new [flags]
-
+
### Deploy a Function to Supabase {#supabase-functions-deploy}
+
Deploy a Function to the linked Supabase project.
@@ -717,9 +838,13 @@ supabase functions deploy [flags]
```
+
+
+
+
**Options**
```sh
@@ -730,12 +855,13 @@ supabase functions deploy [flags]
-
+
### Delete a Function from Supabase {#supabase-functions-delete}
+
Delete a Function from the linked Supabase project. This does NOT remove the Function locally.
@@ -747,9 +873,13 @@ supabase functions delete [flags]
```
+
+
+
+
**Options**
```sh
@@ -759,18 +889,20 @@ supabase functions delete [flags]
-
+
## Manage Postgres databases {#supabase-db}
+
+
**Available Commands**
@@ -788,6 +920,9 @@ supabase functions delete [flags]
+
+
+
**Options**
```sh
@@ -796,12 +931,13 @@ supabase functions delete [flags]
-
+
### Resets the local database to current migrations {#supabase-db-reset}
+
@@ -812,9 +948,13 @@ supabase db reset [flags]
```
+
+
+
+
**Options**
```sh
@@ -823,18 +963,20 @@ supabase db reset [flags]
-
+
## Manage remote databases {#supabase-db-remote}
+
+
**Available Commands**
@@ -846,6 +988,9 @@ supabase db reset [flags]
+
+
+
**Options**
```sh
@@ -855,12 +1000,13 @@ supabase db reset [flags]
-
+
### Commit remote changes as a new migration {#supabase-db-remote-commit}
+
@@ -871,9 +1017,13 @@ supabase db remote commit [flags]
```
+
+
+
+
**Options**
```sh
@@ -882,12 +1032,13 @@ supabase db remote commit [flags]
-
+
### Show changes on the remote database {#supabase-db-remote-changes}
+
Show changes on the remote database since last migration.
@@ -898,9 +1049,13 @@ supabase db remote changes [flags]
```
+
+
+
+
**Options**
```sh
@@ -909,12 +1064,13 @@ supabase db remote changes [flags]
-
+
### Push new migrations to the remote database {#supabase-db-push}
+
@@ -925,9 +1081,13 @@ supabase db push [flags]
```
+
+
+
+
**Options**
```sh
@@ -938,12 +1098,13 @@ supabase db push [flags]
-
+
### Diffs the local database for schema changes {#supabase-db-diff}
+
@@ -954,9 +1115,13 @@ supabase db diff [flags]
```
+
+
+
+
**Options**
```sh
@@ -968,12 +1133,13 @@ supabase db diff [flags]
-
+
## Manage database branches {#supabase-db-branch}
+
Manage database branches. Each branch is associated with a separate database.
@@ -981,6 +1147,7 @@ Manage database branches. Each branch is associated with a separate database.
+
**Available Commands**
@@ -996,6 +1163,9 @@ Manage database branches. Each branch is associated with a separate database.
+
+
+
**Options**
```sh
@@ -1004,12 +1174,13 @@ Manage database branches. Each branch is associated with a separate database.
-
+
### Switch the active branch {#supabase-db-branch-switch}
+
@@ -1020,9 +1191,13 @@ supabase db branch switch [flags]
```
+
+
+
+
**Options**
```sh
@@ -1031,12 +1206,13 @@ supabase db branch switch [flags]
-
+
### List branches {#supabase-db-branch-list}
+
@@ -1047,9 +1223,13 @@ supabase db branch list [flags]
```
+
+
+
+
**Options**
```sh
@@ -1058,12 +1238,13 @@ supabase db branch list [flags]
-
+
### Delete a branch {#supabase-db-branch-delete}
+
@@ -1074,9 +1255,13 @@ supabase db branch delete [flags]
```
+
+
+
+
**Options**
```sh
@@ -1085,12 +1270,13 @@ supabase db branch delete [flags]
-
+
### Create a branch {#supabase-db-branch-create}
+
@@ -1101,12 +1287,19 @@ supabase db branch create [flags]
```
+
+
+
+
**Options**
```sh
-h, --help help for create
```
+
+
+
\ No newline at end of file
diff --git a/apps/reference/nav/cli_sidebars.js b/apps/reference/nav/cli_sidebars.js
index 4180ec512a4..0fe3014b54b 100644
--- a/apps/reference/nav/cli_sidebars.js
+++ b/apps/reference/nav/cli_sidebars.js
@@ -18,6 +18,7 @@ const sidebars = {
sidebar: [
'intro',
+ 'installing-and-updating',
'usage',
'config',
'release-notes',
diff --git a/packages/spec/src/docs/templates/CliTemplate.ts b/packages/spec/src/docs/templates/CliTemplate.ts
index 5e7b1d629b2..a381679955e 100644
--- a/packages/spec/src/docs/templates/CliTemplate.ts
+++ b/packages/spec/src/docs/templates/CliTemplate.ts
@@ -5,18 +5,19 @@ title: Usage
toc_max_heading_level: 3
---
-
+
<%- info.description %>
<% commands.forEach(function(command){ %>
-
+
<%- command.heading %>
+
<%- command.description %>
@@ -25,6 +26,7 @@ toc_max_heading_level: 3
<%- command.usage %>
<% }; %>
+
<% if(command.subcommands.length > 0){ %>
**Available Commands**
@@ -34,11 +36,16 @@ toc_max_heading_level: 3
<% }); %>
<% } %>
+
+
+
**Options**
<%- command.options %>
<% }); %>
+
+
`.trim()
export default template
From 0e2b6b01ef6ae1a501490eade2198886af67b475 Mon Sep 17 00:00:00 2001
From: Copple <10214025+kiwicopple@users.noreply.github.com>
Date: Fri, 12 Aug 2022 15:26:51 +0200
Subject: [PATCH 4/5] cleans up the config page
---
apps/reference/_cli/config.mdx | 291 ++++++++++--------
.../spec/src/docs/templates/ConfigTemplate.ts | 21 +-
2 files changed, 173 insertions(+), 139 deletions(-)
diff --git a/apps/reference/_cli/config.mdx b/apps/reference/_cli/config.mdx
index 356f7fa9658..0e62403dec6 100644
--- a/apps/reference/_cli/config.mdx
+++ b/apps/reference/_cli/config.mdx
@@ -1,6 +1,7 @@
---
id: config
title: Configuration
+toc_max_heading_level: 2
---
@@ -17,19 +18,18 @@ This file is located in the `supabase` folder under `supabase/config.toml`.
## General
-### `project_id`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `project_id` | `true` | `` |
+### `project_id`
A string used to distinguish different Supabase projects on the same host. Defaults to the working directory name when running `supabase init`.
-See also:
-
-
+
+- Required:
true
+- Default:
None
+
+
@@ -39,53 +39,59 @@ See also:
## API
-### `api.port`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `api.port` | `true` | `54321` |
+### `api.port`
Port to use for the API URL.
-See also:
+
+- Required:
true
+- Default:
54321
+-
+See also:
+
+
+
-- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html)
-
+
### `api.extra_search_path`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `api.extra_search_path` | `true` | `["extensions"]` |
-
Extra schemas to add to the `search_path` of every request.
-See also:
+
+- Required:
true
+- Default:
["extensions"]
+-
+See also:
+
+
+
-- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html)
-
+
### `api.max_rows`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `api.max_rows` | `true` | `1000` |
-
The maximum number of rows returned from a view, table, or stored procedure. Limits payload size for accidental or malicious requests.
-See also:
-
-
-- [PostgREST configuration](https://postgrest.org/en/stable/configuration.html)
+
+- Required:
true
+- Default:
1000
+-
+See also:
+
+
+
+
@@ -95,37 +101,41 @@ See also:
## Database
-### `db.port`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `db.port` | `true` | `54322` |
+### `db.port`
Port to use for the local database URL.
-See also:
+
+- Required:
true
+- Default:
54322
+-
+See also:
+
+
+
-- [PostgreSQL configuration](https://postgrest.org/en/stable/configuration.html)
-
+
### `db.major_version`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `db.major_version` | `true` | `14` |
-
The database major version to use. This has to be the same as your remote database's. Run `SHOW server_version;` on the remote database to check.
-See also:
-
-
-- [PostgreSQL configuration](https://postgrest.org/en/stable/configuration.html)
+
+- Required:
true
+- Default:
14
+-
+See also:
+
+
+
+
@@ -135,19 +145,18 @@ See also:
## Dashboard
-### `studio.port`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `studio.port` | `true` | `54323` |
+### `studio.port`
Port to use for Supabase Studio.
-See also:
-
-
+
+- Required:
true
+- Default:
54323
+
+
@@ -157,23 +166,25 @@ See also:
## Local Development
-### `inbucket.port`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `inbucket.port` | `true` | `54324` |
+### `inbucket.port`
Port to use for the email testing server web interface.
Emails sent with the local dev setup are not actually sent - rather, they are monitored, and you can view the emails that would have been sent from the web interface.
-See also:
-
-
-- [Inbucket documentation](https://www.inbucket.org)
+
+- Required:
true
+- Default:
54324
+-
+See also:
+
+
+
+
@@ -183,124 +194,135 @@ See also:
## Auth
-### `auth.site_url`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.site_url` | `true` | `"http://localhost:3000"` |
+### `auth.site_url`
The base URL of your website. Used as an allow-list for redirects and for constructing URLs used in emails.
-See also:
+
+- Required:
true
+- Default:
"http://localhost:3000"
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.additional_redirect_urls`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.additional_redirect_urls` | `true` | `["https://localhost:3000"]` |
-
A list of _exact_ URLs that auth providers are permitted to redirect to post authentication.
-See also:
+
+- Required:
true
+- Default:
["https://localhost:3000"]
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.jwt_expiry`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.jwt_expiry` | `true` | `3600` |
-
How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 seconds (one week).
-See also:
+
+- Required:
true
+- Default:
3600
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.enable_signup`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.enable_signup` | `true` | `true` |
-
Allow/disallow new user signups to your project.
-See also:
+
+- Required:
true
+- Default:
true
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.email.enable_signup`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.email.enable_signup` | `true` | `true` |
-
Allow/disallow new user signups via email to your project.
-See also:
+
+- Required:
true
+- Default:
true
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.email.double_confirm_changes`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.email.double_confirm_changes` | `true` | `true` |
-
If enabled, a user will be required to confirm any email change on both the old, and new email addresses. If disabled, only the new email is required to confirm.
-See also:
+
+- Required:
true
+- Default:
true
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.email.enable_confirmations`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.email.enable_confirmations` | `true` | `true` |
-
If enabled, users need to confirm their email address before signing in.
-See also:
+
+- Required:
true
+- Default:
true
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.external..enabled`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.external..enabled` | `true` | `true` |
-
Use an external OAuth provider. The full list of providers are:
- `apple`
@@ -317,43 +339,52 @@ Use an external OAuth provider. The full list of providers are:
- `spotify`
-See also:
+
+- Required:
true
+- Default:
true
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.external..client_id`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.external..client_id` | `true` | `""` |
-
Client ID for the external OAuth provider.
-See also:
+
+- Required:
true
+- Default:
""
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
+
### `auth.external..secret`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| `auth.external..secret` | `true` | `""` |
-
Client secret for the external OAuth provider.
-See also:
+
+- Required:
true
+- Default:
""
+-
+See also:
+
+
+
-- [Auth Server configuration](https://supabase.com/docs/reference/tools/reference-auth)
-
-
+
diff --git a/packages/spec/src/docs/templates/ConfigTemplate.ts b/packages/spec/src/docs/templates/ConfigTemplate.ts
index 29e74aa534f..9a4029a1f58 100644
--- a/packages/spec/src/docs/templates/ConfigTemplate.ts
+++ b/packages/spec/src/docs/templates/ConfigTemplate.ts
@@ -2,6 +2,7 @@ const template = `
---
id: config
title: Configuration
+toc_max_heading_level: 2
---
@@ -15,20 +16,22 @@ title: Configuration
## <%= section.title %>
<% section.parameters.forEach(function(parameter){ %>
-### \`<%- parameter.title %>\`
-| Parameter | Required | Default |
-| :-------- | :------- | :------------------------- |
-| \`<%- parameter.title %>\` | \`<%= parameter.required %>\` | \`<%- parameter?.default %>\` |
+### \`<%- parameter.title %>\`
<%- parameter.description %>
-See also:
-
-<% parameter.links?.forEach(function(link){ %>
-- [<%- link.name %>](<%- link.link %>)
-<% }); %>
+
+- Required:
<%= parameter.required %>
+- Default:
<%- parameter?.default ? parameter?.default : 'None' %> <% if(parameter?.links?.length){ %>
+-
+See also:
+
+
+<% } %>
+
+
<% }); %>
<% }); %>
From 5634bd64bb620a12a2f906064053380da7050c24 Mon Sep 17 00:00:00 2001
From: Copple <10214025+kiwicopple@users.noreply.github.com>
Date: Fri, 12 Aug 2022 16:59:04 +0200
Subject: [PATCH 5/5] grammatical edits
---
apps/www/_blog/2022-08-12-supabase-series-b.mdx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/apps/www/_blog/2022-08-12-supabase-series-b.mdx b/apps/www/_blog/2022-08-12-supabase-series-b.mdx
index 7bee31aaf12..7692b4a45fd 100644
--- a/apps/www/_blog/2022-08-12-supabase-series-b.mdx
+++ b/apps/www/_blog/2022-08-12-supabase-series-b.mdx
@@ -11,7 +11,7 @@ toc_depth: 3
---
Supabase raised $80M in May, bringing our total funding to $116M. This comes one year after our Series A, and so we're revisiting the plans
-we outlined in our [Series A blog post](https://supabase.com/blog/supabase-series-a) and hold ourselves accountable to the promises we made.
+we outlined in our [Series A blog post](https://supabase.com/blog/supabase-series-a) tk hold ourselves accountable for the promises we made.
## Where we've been
@@ -19,11 +19,11 @@ We shared a few metrics in our Series A post. Since then we've grown a lot.
### Database growth
-At Series A we had launched over 50,000 PostgreSQL databases (only on our hosted platform).
+At Series A we'd launched over 50,000 PostgreSQL databases (on our hosted platform).

-Since then, we've grown to over 150,000 PostgreSQL databases.
+As of today, we've launched over 150,000 PostgreSQL databases.
