github.com/supabase/cli@v1.168.1/README.md (about) 1 # Supabase CLI (v1) 2 3 [![Coverage Status](https://coveralls.io/repos/github/supabase/cli/badge.svg?branch=main)](https://coveralls.io/github/supabase/cli?branch=main) 4 5 [Supabase](https://supabase.io) is an open source Firebase alternative. We're building the features of Firebase using enterprise-grade open source tools. 6 7 This repository contains all the functionality for Supabase CLI. 8 9 - [x] Running Supabase locally 10 - [x] Managing database migrations 11 - [x] Creating and deploying Supabase Functions 12 - [x] Generating types directly from your database schema 13 - [x] Making authenticated HTTP requests to [Management API](https://supabase.com/docs/reference/api/introduction) 14 15 ## Getting started 16 17 ### Install the CLI 18 19 Available via [NPM](https://www.npmjs.com) as dev dependency. To install: 20 21 ```bash 22 npm i supabase --save-dev 23 ``` 24 25 To install the beta release channel: 26 27 ```bash 28 npm i supabase@beta --save-dev 29 ``` 30 31 When installing with yarn 4, you need to disable experimental fetch with the following nodejs config. 32 33 ``` 34 NODE_OPTIONS=--no-experimental-fetch yarn add supabase 35 ``` 36 37 > **Note** 38 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`. 39 40 <details> 41 <summary><b>macOS</b></summary> 42 43 Available via [Homebrew](https://brew.sh). To install: 44 45 ```sh 46 brew install supabase/tap/supabase 47 ``` 48 49 To install the beta release channel: 50 51 ```sh 52 brew install supabase/tap/supabase-beta 53 brew link --overwrite supabase-beta 54 ``` 55 56 To upgrade: 57 58 ```sh 59 brew upgrade supabase 60 ``` 61 </details> 62 63 <details> 64 <summary><b>Windows</b></summary> 65 66 Available via [Scoop](https://scoop.sh). To install: 67 68 ```powershell 69 scoop bucket add supabase https://github.com/supabase/scoop-bucket.git 70 scoop install supabase 71 ``` 72 73 To upgrade: 74 75 ```powershell 76 scoop update supabase 77 ``` 78 </details> 79 80 <details> 81 <summary><b>Linux</b></summary> 82 83 Available via [Homebrew](https://brew.sh) and Linux packages. 84 85 #### via Homebrew 86 87 To install: 88 89 ```sh 90 brew install supabase/tap/supabase 91 ``` 92 93 To upgrade: 94 95 ```sh 96 brew upgrade supabase 97 ``` 98 99 #### via Linux packages 100 101 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. 102 103 ```sh 104 sudo apk add --allow-untrusted <...>.apk 105 ``` 106 107 ```sh 108 sudo dpkg -i <...>.deb 109 ``` 110 111 ```sh 112 sudo rpm -i <...>.rpm 113 ``` 114 115 ```sh 116 sudo pacman -U <...>.pkg.tar.zst 117 ``` 118 </details> 119 120 <details> 121 <summary><b>Other Platforms</b></summary> 122 123 You can also install the CLI via [go modules](https://go.dev/ref/mod#go-install) without the help of package managers. 124 125 ```sh 126 go install github.com/supabase/cli@latest 127 ``` 128 129 Add a symlink to the binary in `$PATH` for easier access: 130 131 ```sh 132 ln -s "$(go env GOPATH)/cli" /usr/bin/supabase 133 ``` 134 135 This works on other non-standard Linux distros. 136 </details> 137 138 <details> 139 <summary><b>Community Maintained Packages</b></summary> 140 141 Available via [pkgx](https://pkgx.sh/). Package script [here](https://github.com/pkgxdev/pantry/blob/main/projects/supabase.com/cli/package.yml). 142 To install in your working directory: 143 144 ```bash 145 pkgx install supabase 146 ``` 147 148 Available via [Nixpkgs](https://nixos.org/). Package script [here](https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/tools/supabase-cli/default.nix). 149 </details> 150 151 ### Run the CLI 152 153 ```bash 154 supabase bootstrap 155 ``` 156 157 Or using npx: 158 159 ```bash 160 npx supabase bootstrap 161 ``` 162 163 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. 164 165 ## Docs 166 167 Command & config reference can be found [here](https://supabase.com/docs/reference/cli/about). 168 169 ## Breaking changes 170 171 We follow semantic versioning for changes that directly impact CLI commands, flags, and configurations. 172 173 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. 174 175 ## Developing 176 177 To run from source: 178 179 ```sh 180 # Go >= 1.22 181 go run . help 182 ```