dbdev logodbdev logo

Using the CLI

Install, upgrade, and use the dbdev CLI

The dbdev CLI can be used for:

Installation

Installation is available through a native package, binary download or building from source.

Native Package

Install the CLI with Homebrew:

brew install supabase/tap/dbdev

Upgrading

Use dbdev --version to check if you are on the latest version of the CLI.

Native Package

Upgrade the CLI with Homebrew:

brew upgrade dbdev

Binary Download

Binaries for dbdev CLI are available for Linux, Windows and macOS platforms. Visit the dbdev releases page to download a binary for your OS. The downloaded binary should be placed in a folder which is in your PATH.

Build From Source

Alternatively, you can build the binary from source. You will need to have Rust installed on your system. To build from source:

  1. Clone the repo: git clone https://github.com/supabase/dbdev.git.
  2. Change directory to dbdev: cd dbdev.
  3. Build: cargo install --release.
  4. Copy the dbdev binary in target/release to a folder in your PATH.

If you have cargo-install, you can perform all the above steps with a single command: cargo install --git https://github.com/supabase/dbdev.git dbdev.

Now you're ready to publish your first package.

Developer Commands

If you are developing a package locally, the following dbdev commands will be useful.

Install a Local Package

Use dbdev install to install a local TLE package into the connected database:

dbdev install --connection "postgresql://postgres:postgres@localhost:54322/postgres" path --directory ./pg_idkit

The path source defaults to the current directory when --directory is omitted.

List Installed Package Versions

Use dbdev list to list package versions installed into pg_tle and available to enable with CREATE EXTENSION:

dbdev list --connection "postgresql://postgres:postgres@localhost:54322/postgres"

On this page