supabase 2.105.0-beta.2 → 2.105.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +116 -163
  2. package/package.json +11 -11
package/README.md CHANGED
@@ -1,214 +1,167 @@
1
- # Supabase CLI
1
+ <p align="center">
2
+ <a href="https://supabase.com">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="./docs/assets/supabase-cli-wordmark-dark.svg">
5
+ <img src="./docs/assets/supabase-cli-wordmark-light.svg" alt="Supabase CLI" width="360">
6
+ </picture>
7
+ </a>
8
+ </p>
2
9
 
3
- [![Coverage Status](https://coveralls.io/repos/github/supabase/cli/badge.svg?branch=develop)](https://coveralls.io/github/supabase/cli?branch=develop) [![Bitbucket Pipelines](https://img.shields.io/bitbucket/pipelines/supabase-cli/setup-cli/master?style=flat-square&label=Bitbucket%20Canary)](https://bitbucket.org/supabase-cli/setup-cli/pipelines) [![Gitlab Pipeline Status](https://img.shields.io/gitlab/pipeline-status/sweatybridge%2Fsetup-cli?label=Gitlab%20Canary)
4
- ](https://gitlab.com/sweatybridge/setup-cli/-/pipelines)
10
+ <p align="center">
11
+ Develop locally and deploy to the Supabase Platform from your terminal.
12
+ </p>
5
13
 
6
- [Supabase](https://supabase.io) is an open source Firebase alternative. We're building the features of Firebase using enterprise-grade open source tools.
14
+ <p align="center">
15
+ <a href="https://www.npmjs.com/package/supabase"><img alt="npm" src="https://img.shields.io/npm/v/supabase?style=flat-square&color=3ECF8E"></a>
16
+ <a href="https://github.com/supabase/cli/actions/workflows/test.yml"><img alt="Build" src="https://img.shields.io/github/actions/workflow/status/supabase/cli/test.yml?branch=develop&label=build&style=flat-square&color=3ECF8E"></a>
17
+ <a href="https://www.npmjs.com/package/supabase"><img alt="License" src="https://img.shields.io/npm/l/supabase.svg?style=flat-square&color=3ECF8E"></a>
18
+ <a href="https://discord.supabase.com"><img alt="Discord" src="https://img.shields.io/discord/839993398554656828?label=discord&style=flat-square&color=3ECF8E"></a>
19
+ </p>
7
20
 
8
- This repository contains all the functionality for Supabase CLI.
21
+ ---
9
22
 
10
- - [x] Running Supabase locally
11
- - [x] Managing database migrations
12
- - [x] Creating and deploying Supabase Functions
13
- - [x] Generating types directly from your database schema
14
- - [x] Making authenticated HTTP requests to [Management API](https://supabase.com/docs/reference/api/introduction)
23
+ Supabase CLI brings the Supabase Platform to your terminal. Run the full local stack, manage database migrations, deploy Edge Functions, generate types, and automate project workflows.
15
24
 
16
- ## Getting started
25
+ ## Installation
17
26
 
18
- ### Install the CLI
27
+ ```sh
28
+ # YOLO
29
+ curl -fsSL https://raw.githubusercontent.com/supabase/cli/main/install | bash
19
30
 
20
- Available via [NPM](https://www.npmjs.com) as dev dependency. To install:
31
+ # npm
32
+ npm install -D supabase # or bun/pnpm/yarn add -D supabase
33
+ npm install -D supabase@beta # beta channel
21
34
 
22
- ```bash
23
- npm i supabase --save-dev
24
- ```
35
+ # macOS and Linux
36
+ brew install supabase/tap/supabase # always up to date
37
+ brew install supabase # official formula, may be delayed
38
+ brew install supabase/tap/supabase-beta # beta channel
25
39
 
26
- To install the beta release channel:
40
+ # Windows
41
+ scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
42
+ scoop install supabase
43
+ scoop install supabase-beta # beta channel
27
44
 
28
- ```bash
29
- npm i supabase@beta --save-dev
45
+ # Linux packages
46
+ # Download .apk, .deb, .rpm, or .pkg.tar.zst from GitHub Releases.
30
47
  ```
31
48
 
32
- When installing with yarn 4, you need to disable experimental fetch with the following nodejs config.
33
-
34
- ```
35
- NODE_OPTIONS=--no-experimental-fetch yarn add supabase
36
- ```
37
-
38
- > **Note**
39
- For Bun versions below v1.0.17, you must add `supabase` as a [trusted dependency](https://bun.sh/guides/install/trusted) before running `bun add -D supabase`.
40
-
41
- <details>
42
- <summary><b>macOS</b></summary>
43
-
44
- Available via [Homebrew](https://brew.sh). To install:
45
-
46
- ```sh
47
- brew install supabase/tap/supabase
48
- ```
49
-
50
- To install the beta release channel:
51
-
52
- ```sh
53
- brew install supabase/tap/supabase-beta
54
- brew link --overwrite supabase-beta
55
- ```
56
-
57
- To upgrade:
58
-
59
- ```sh
60
- brew upgrade supabase
61
- ```
62
-
63
- Beta channel:
64
-
65
- ```sh
66
- brew upgrade supabase-beta
67
- ```
68
- </details>
49
+ Linux packages are available from [Releases](https://github.com/supabase/cli/releases). Community-maintained packages are also available through [pkgx](https://pkgx.sh/) and [Nixpkgs](https://nixos.org/).
69
50
 
70
- <details>
71
- <summary><b>Windows</b></summary>
51
+ ## Start Local Development
72
52
 
73
- Available via [Scoop](https://scoop.sh). To install:
53
+ Create a Supabase workspace and start the local stack:
74
54
 
75
- ```powershell
76
- scoop bucket add supabase https://github.com/supabase/scoop-bucket.git
77
- scoop install supabase
78
- ```
79
-
80
- To install the beta release channel:
81
-
82
- ```powershell
83
- scoop install supabase-beta
84
- ```
85
-
86
- To upgrade:
87
-
88
- ```powershell
89
- scoop update supabase
90
- ```
91
-
92
- Beta channel:
55
+ ```sh
56
+ supabase init
57
+ supabase start
58
+ supabase status
59
+ ```
93
60
 
94
- ```powershell
95
- scoop update supabase-beta
96
- ```
97
- </details>
61
+ The local stack includes Postgres, Auth, Realtime, Storage, Edge Functions, and the Supabase APIs.
98
62
 
99
- <details>
100
- <summary><b>Linux</b></summary>
63
+ Start from a template:
101
64
 
102
- Available via [Homebrew](https://brew.sh) and Linux packages.
65
+ ```sh
66
+ supabase bootstrap
67
+ ```
103
68
 
104
- #### via Homebrew
69
+ ## Link A Project
105
70
 
106
- To install:
71
+ Connect your local workspace to a hosted Supabase project:
107
72
 
108
- ```sh
109
- brew install supabase/tap/supabase
110
- ```
73
+ ```sh
74
+ supabase login
75
+ supabase link
76
+ ```
111
77
 
112
- To install the beta release channel:
78
+ ## Manage Your Database
113
79
 
114
- ```sh
115
- brew install supabase/tap/supabase-beta
116
- brew link --overwrite supabase-beta
117
- ```
80
+ Create migrations, compare schemas, and apply changes locally or to your linked project:
118
81
 
119
- To upgrade:
82
+ ```sh
83
+ supabase migration new create_profiles
84
+ supabase db diff
85
+ supabase db push
86
+ supabase db reset
87
+ ```
120
88
 
121
- ```sh
122
- brew upgrade supabase
123
- ```
89
+ ## Deploy Edge Functions
124
90
 
125
- Beta channel:
91
+ Build, serve, and deploy functions from the same project workspace:
126
92
 
127
- ```sh
128
- brew upgrade supabase-beta
129
- ```
93
+ ```sh
94
+ supabase functions new hello-world
95
+ supabase functions serve
96
+ supabase functions deploy hello-world
97
+ ```
130
98
 
131
- #### via Linux packages
99
+ ## Generate Types
132
100
 
133
- Linux packages are provided in [Releases](https://github.com/supabase/cli/releases). To install, download the `.apk`/`.deb`/`.rpm`/`.pkg.tar.zst` file depending on your package manager and run the respective commands.
101
+ Generate TypeScript types from your local database or linked project:
134
102
 
135
- ```sh
136
- sudo apk add --allow-untrusted <...>.apk
137
- ```
103
+ ```sh
104
+ supabase gen types --local
105
+ supabase gen types --linked
106
+ ```
138
107
 
139
- ```sh
140
- sudo dpkg -i <...>.deb
141
- ```
108
+ ## Reference
142
109
 
143
- ```sh
144
- sudo rpm -i <...>.rpm
145
- ```
110
+ Use `--help` on any command to explore flags and examples:
146
111
 
147
- ```sh
148
- sudo pacman -U <...>.pkg.tar.zst
149
- ```
150
- </details>
112
+ ```sh
113
+ supabase db --help
114
+ supabase functions deploy --help
115
+ ```
151
116
 
152
- <details>
153
- <summary><b>Other Platforms</b></summary>
117
+ - [CLI reference](https://supabase.com/docs/reference/cli/about)
118
+ - [Local development guide](https://supabase.com/docs/guides/local-development)
119
+ - [Supabase docs](https://supabase.com/docs)
154
120
 
155
- You can also install the CLI via [go modules](https://go.dev/ref/mod#go-install) without the help of package managers.
121
+ ## Developing
156
122
 
157
- ```sh
158
- go install github.com/supabase/cli@latest
159
- ```
123
+ This repository is a pnpm monorepo. The published package lives in `apps/cli`.
160
124
 
161
- Add a symlink to the binary in `$PATH` for easier access:
125
+ ```sh
126
+ pnpm install
127
+ cd apps/cli
162
128
 
163
- ```sh
164
- ln -s "$(go env GOPATH)/bin/cli" /usr/bin/supabase
165
- ```
129
+ pnpm dev:next -- --help
130
+ pnpm check:all
131
+ pnpm test:core
132
+ ```
166
133
 
167
- This works on other non-standard Linux distros.
168
- </details>
134
+ Useful source entry points:
169
135
 
170
- <details>
171
- <summary><b>Community Maintained Packages</b></summary>
136
+ | Path | Purpose |
137
+ | ----------------- | -------------------------------------- |
138
+ | `apps/cli` | TypeScript/Bun CLI package |
139
+ | `apps/cli-go` | Go CLI source used by the legacy shell |
140
+ | `packages/stack` | Local Supabase stack runtime |
141
+ | `packages/config` | Config schema and generated types |
142
+ | `packages/api` | Typed Supabase Management API client |
172
143
 
173
- Available via [pkgx](https://pkgx.sh/). Package script [here](https://github.com/pkgxdev/pantry/blob/main/projects/supabase.com/cli/package.yml).
174
- To install in your working directory:
144
+ After a fresh clone, install the reference repositories used for agent and developer inspection:
175
145
 
176
- ```bash
177
- pkgx install supabase
178
- ```
146
+ ```sh
147
+ pnpm repos:install
148
+ ```
179
149
 
180
- Available via [Nixpkgs](https://nixos.org/). Package script [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/supabase-cli/default.nix).
181
- </details>
150
+ ## Contributing
182
151
 
183
- ### Run the CLI
152
+ We love focused pull requests with a clear problem, a small surface area, and tests that match the user-facing behavior. Before opening a PR, run the checks for the workspace you touched.
184
153
 
185
- ```bash
186
- supabase bootstrap
154
+ ```sh
155
+ pnpm check:all
156
+ pnpm test
187
157
  ```
188
158
 
189
- Or using npx:
159
+ PR titles must use conventional commits, for example:
190
160
 
191
- ```bash
192
- npx supabase bootstrap
161
+ ```text
162
+ fix(cli): handle linked projects without cached service versions
193
163
  ```
194
164
 
195
- The bootstrap command will guide you through the process of setting up a Supabase project using one of the [starter](https://github.com/supabase-community/supabase-samples/blob/main/samples.json) templates.
196
-
197
- ## Docs
198
-
199
- Command & config reference can be found [here](https://supabase.com/docs/reference/cli/about).
200
-
201
- ## Breaking changes
202
-
203
- We follow semantic versioning for changes that directly impact CLI commands, flags, and configurations.
165
+ ## License
204
166
 
205
- However, due to dependencies on other service images, we cannot guarantee that schema migrations, seed.sql, and generated types will always work for the same CLI major version. If you need such guarantees, we encourage you to pin a specific version of CLI in package.json.
206
-
207
- ## Developing
208
-
209
- To run from source:
210
-
211
- ```sh
212
- # Go >= 1.22
213
- go run . help
214
- ```
167
+ Supabase CLI packages are released under the MIT license.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supabase",
3
- "version": "2.105.0-beta.2",
3
+ "version": "2.105.0-beta.3",
4
4
  "private": false,
5
5
  "description": "Supabase CLI",
6
6
  "homepage": "https://github.com/supabase/cli#readme",
@@ -52,19 +52,19 @@
52
52
  "vitest": "^4.1.7",
53
53
  "yaml": "^2.9.0",
54
54
  "@supabase/api": "0.1.0",
55
- "@supabase/config": "0.1.0",
56
55
  "@supabase/stack": "0.1.0",
57
- "@supabase/process-compose": "0.1.0"
56
+ "@supabase/process-compose": "0.1.0",
57
+ "@supabase/config": "0.1.0"
58
58
  },
59
59
  "optionalDependencies": {
60
- "@supabase/cli-darwin-arm64": "2.105.0-beta.2",
61
- "@supabase/cli-darwin-x64": "2.105.0-beta.2",
62
- "@supabase/cli-linux-arm64": "2.105.0-beta.2",
63
- "@supabase/cli-linux-x64": "2.105.0-beta.2",
64
- "@supabase/cli-linux-arm64-musl": "2.105.0-beta.2",
65
- "@supabase/cli-linux-x64-musl": "2.105.0-beta.2",
66
- "@supabase/cli-windows-arm64": "2.105.0-beta.2",
67
- "@supabase/cli-windows-x64": "2.105.0-beta.2"
60
+ "@supabase/cli-darwin-arm64": "2.105.0-beta.3",
61
+ "@supabase/cli-darwin-x64": "2.105.0-beta.3",
62
+ "@supabase/cli-linux-arm64": "2.105.0-beta.3",
63
+ "@supabase/cli-linux-arm64-musl": "2.105.0-beta.3",
64
+ "@supabase/cli-linux-x64": "2.105.0-beta.3",
65
+ "@supabase/cli-linux-x64-musl": "2.105.0-beta.3",
66
+ "@supabase/cli-windows-x64": "2.105.0-beta.3",
67
+ "@supabase/cli-windows-arm64": "2.105.0-beta.3"
68
68
  },
69
69
  "release": {
70
70
  "branches": [