From 70a714d0da5ce24c3497f6a36c85c8a41b1e8d5e Mon Sep 17 00:00:00 2001 From: aqilaziz Date: Mon, 11 May 2026 14:23:10 +0700 Subject: [PATCH 1/2] docs: add dbdev install and list examples --- cli/README.md | 43 +++++++++++++++++++++++++++++++----- website/content/docs/cli.mdx | 27 ++++++++++++++++++++++ 2 files changed, 65 insertions(+), 5 deletions(-) diff --git a/cli/README.md b/cli/README.md index e0cc6467..6571e606 100644 --- a/cli/README.md +++ b/cli/README.md @@ -10,10 +10,16 @@ Once the `dbdev` TLE is installed select dbdev.install('math', '0.0.1'); ``` -Where the `dbdev` CLI functions as a backup solution for installing packages when requirements for the `dbdev` TLE are not met (no [pgsql-http](https://github.com/pramsey/pgsql-http)) +Where the `dbdev` CLI functions as a backup solution for installing local packages when requirements for the `dbdev` TLE are not met (no [pgsql-http](https://github.com/pramsey/pgsql-http)) ``` -dbdev install --connection 'postgresql://...' --package 'math' --version '0.0.1' +dbdev install --connection 'postgresql://...' path --directory ./math +``` + +To list package versions installed into `pg_tle` and available to enable with `CREATE EXTENSION`, run: + +``` +dbdev list --connection 'postgresql://...' ``` ## Objective Statements @@ -37,6 +43,7 @@ Usage: dbdev [OPTIONS] Commands: install Install a package to a database + list List available packages uninstall Uninstall a package from a database help Print this message or the help of the given subcommand(s) @@ -55,15 +62,41 @@ Options: ``` Install a package to a database -Usage: dbdev install [OPTIONS] --connection +Usage: dbdev install [OPTIONS] --connection + +Options: + -c, --connection PostgreSQL connection string + -h, --help Print help + +Sources: + path From a local directory +``` + +For example, to install a package from a local directory: + +``` +dbdev install --connection 'postgresql://postgres:postgres@localhost:54322/postgres' path --directory ./pg_idkit +``` + +### list + +``` +List available packages + +Usage: dbdev list --connection Options: -c, --connection PostgreSQL connection string - -p, --package Package name on package index - --path From local directory -h, --help Print help ``` +You can query the same extension names and default versions directly from PostgreSQL: + +```sql +select name, default_version +from pgtle.available_extensions(); +``` + ### uninstall ``` diff --git a/website/content/docs/cli.mdx b/website/content/docs/cli.mdx index 2bd952cf..f781eb72 100644 --- a/website/content/docs/cli.mdx +++ b/website/content/docs/cli.mdx @@ -102,4 +102,31 @@ Alternatively, you can build the binary from source. You will need to have [Rust If you have [cargo-install](https://doc.rust-lang.org/cargo/commands/cargo-install.html), you can perform all the above steps with a single command: `cargo install --git https://github.com/supabase/dbdev.git dbdev`. +## Common commands + +### Install a local package + +Use `dbdev install` to install a local TLE package into the connected database: + +```bash +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`: + +```bash +dbdev list --connection "postgresql://postgres:postgres@localhost:54322/postgres" +``` + +You can query the same extension names and default versions directly from PostgreSQL: + +```sql +select name, default_version +from pgtle.available_extensions(); +``` + Now you're ready to [publish your first package](/docs/publish-extension). From 8a5be7f3663c933f1f6d117da51994f32306ff89 Mon Sep 17 00:00:00 2001 From: Raminder Singh Date: Wed, 3 Jun 2026 17:10:37 +0530 Subject: [PATCH 2/2] docs: update docs --- cli/README.md | 9 +-------- website/content/docs/cli.mdx | 19 +++++++------------ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/cli/README.md b/cli/README.md index 6571e606..65c8a244 100644 --- a/cli/README.md +++ b/cli/README.md @@ -16,7 +16,7 @@ Where the `dbdev` CLI functions as a backup solution for installing local packag dbdev install --connection 'postgresql://...' path --directory ./math ``` -To list package versions installed into `pg_tle` and available to enable with `CREATE EXTENSION`, run: +To list package versions installed into `pg_tle` and available to enable with `create extension`, run: ``` dbdev list --connection 'postgresql://...' @@ -90,13 +90,6 @@ Options: -h, --help Print help ``` -You can query the same extension names and default versions directly from PostgreSQL: - -```sql -select name, default_version -from pgtle.available_extensions(); -``` - ### uninstall ``` diff --git a/website/content/docs/cli.mdx b/website/content/docs/cli.mdx index f781eb72..a04720a4 100644 --- a/website/content/docs/cli.mdx +++ b/website/content/docs/cli.mdx @@ -102,9 +102,13 @@ Alternatively, you can build the binary from source. You will need to have [Rust If you have [cargo-install](https://doc.rust-lang.org/cargo/commands/cargo-install.html), you can perform all the above steps with a single command: `cargo install --git https://github.com/supabase/dbdev.git dbdev`. -## Common commands +Now you're ready to [publish your first package](/docs/publish-extension). + +## Developer Commands -### Install a local package +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: @@ -114,19 +118,10 @@ dbdev install --connection "postgresql://postgres:postgres@localhost:54322/postg The `path` source defaults to the current directory when `--directory` is omitted. -### List installed package versions +### List Installed Package Versions Use `dbdev list` to list package versions installed into `pg_tle` and available to enable with `CREATE EXTENSION`: ```bash dbdev list --connection "postgresql://postgres:postgres@localhost:54322/postgres" ``` - -You can query the same extension names and default versions directly from PostgreSQL: - -```sql -select name, default_version -from pgtle.available_extensions(); -``` - -Now you're ready to [publish your first package](/docs/publish-extension).