|
| 1 | +# pgext |
| 2 | + |
| 3 | +[](https://pgext.cloud) |
| 4 | +[](https://doc.pgext.cloud) |
| 5 | +[](https://github.com/pgsty/pgext/releases) |
| 6 | +[](LICENSE) |
| 7 | + |
| 8 | +**pgext** catalogs the PostgreSQL extension universe: 1,600+ extensions with metadata, |
| 9 | +dependencies, categories, and exact package availability across PostgreSQL versions, |
| 10 | +operating systems, and repositories (PGDG / Pigsty, APT / YUM). |
| 11 | + |
| 12 | +It is a single static binary that does two things: |
| 13 | + |
| 14 | +- **Build the catalog**: fetch repository metadata, parse APT/RPM packages, and |
| 15 | + maintain the curated extension knowledge base — all stored in PostgreSQL. |
| 16 | +- **Serve the catalog**: a self-contained web app + JSON API, the same software |
| 17 | + that powers [pgext.cloud](https://pgext.cloud). |
| 18 | + |
| 19 | +## Quick Start |
| 20 | + |
| 21 | +All you need is a PostgreSQL database to hold the catalog: |
| 22 | + |
| 23 | +```bash |
| 24 | +export PGURL="postgres:///data" # where the catalog lives (default: postgres:///data) |
| 25 | + |
| 26 | +pgext init # one-time setup: create the pgext schema and load catalog data |
| 27 | +pgext serve # web UI + JSON API at http://localhost:8432 |
| 28 | +``` |
| 29 | + |
| 30 | +That's it. Point your browser at [http://localhost:8432](http://localhost:8432). |
| 31 | + |
| 32 | +```bash |
| 33 | +pgext serve --db meta --listen :8080 # database name shorthand, custom port |
| 34 | +curl 'localhost:8432/api/v1/ext?q=vector' # query the JSON API |
| 35 | +``` |
| 36 | + |
| 37 | +## Installation |
| 38 | + |
| 39 | +Download a single-binary release for Linux / macOS (amd64 / arm64) from the |
| 40 | +[release page](https://github.com/pgsty/pgext/releases), or `deb` / `rpm` packages |
| 41 | +if you prefer a package manager. |
| 42 | + |
| 43 | +Build from source (Go 1.26+, no CGO required): |
| 44 | + |
| 45 | +```bash |
| 46 | +git clone https://github.com/pgsty/pgext.git |
| 47 | +cd pgext && go build -o pgext . |
| 48 | +``` |
| 49 | + |
| 50 | +## Commands |
| 51 | + |
| 52 | +```text |
| 53 | +pgext init # setup everything (schema + reload) |
| 54 | +pgext serve # serve web UI + JSON API (:8432) |
| 55 | +pgext status # show metadata status |
| 56 | +
|
| 57 | +pgext reload # reload data: fetch + complete parse |
| 58 | +pgext fetch # get repo metadata from upstream |
| 59 | +pgext scan # scan local Pigsty repo metadata |
| 60 | +pgext parse # atomically populate apt, dnf, bin, pkg |
| 61 | +pgext recap # rebuild pkg from current catalog data |
| 62 | +
|
| 63 | +pgext ext <name> # show extension information |
| 64 | +pgext pkg <name> # show package availability matrix |
| 65 | +pgext bin <name> -p 17 -o el9 # show binary packages with URLs |
| 66 | +
|
| 67 | +pgext gen all # run every content generator |
| 68 | +pgext pgxn # crawl PGXN dist metadata |
| 69 | +pgext purge # drop the pgext schema |
| 70 | +``` |
| 71 | + |
| 72 | +Run `pgext help <command>` for details on any command. |
| 73 | + |
| 74 | +## Links |
| 75 | + |
| 76 | +- Catalog website: [pgext.cloud](https://pgext.cloud) |
| 77 | +- Documentation: [doc.pgext.cloud](https://doc.pgext.cloud) |
| 78 | +- Pigsty — battery-included PostgreSQL distribution: [pigsty.io](https://pigsty.io) |
| 79 | +- `pig` — the PostgreSQL extension package manager: [github.com/pgsty/pig](https://github.com/pgsty/pig) |
| 80 | + |
| 81 | +## License |
| 82 | + |
| 83 | +[Apache License 2.0](LICENSE) © [Ruohang Feng](https://vonng.com) |
0 commit comments