Skip to content


version OSSRank Slack

Trunk is an open source package manager and registry for PostgreSQL (Postgres) extensions:

  • Visit to discover and learn more about the building blocks of this rich ecosystem
  • Use the Trunk CLI (pg-trunk) to build, publish and install Postgres extensions of all kinds.


Trunk CLI


To get started, run the following commands to download and leverage cargo to install Trunk's CLI. 1. curl -sSf | sh 2. cargo install pg-trunk


The Trunk CLI allows for building, publishing and installing Postgres extensions of all kinds. It abstracts away complexities of extension development and management with the following commands:

trunk build

Compile extensions of all kinds.

 trunk build
Building from path .
Detected that we are building a pgrx extension
Detected pgrx version range 0.7.4
Using pgrx version 0.7.4
Building pgrx extension at path .
Creating package at: ./.trunk/pgmq-0.5.0.tar.gz
Create Trunk bundle:
Packaged to ./.trunk/pgmq-0.5.0.tar.gz

trunk publish

Publish extensions to the registry, making them available to the Postgres community for discovery and installation.

 trunk publish pgmq \
--version 0.5.0 \
--description "Message Queue for postgres" \
--documentation "" \
--repository "" \
--license "Apache-2.0" \
--homepage ""

trunk install

Downloads Postgres extensions from the Trunk registry and installs into your environment (only Ubuntu suppot at this time).

Supports nested dependencies, e.g. installing extension_a will automatically install extension_b if required.

 trunk install pgmq
Using pg_config: /usr/bin/pg_config
Using pkglibdir: "/usr/lib/postgresql/15/lib"
Using sharedir: "/usr/share/postgresql/15"
Downloading from:
Dependencies: ["pg_partman"]
Installing pgmq 0.5.0
[+] => /usr/lib/postgresql/15/lib
[+] extension/pgmq--0.5.0.sql => /usr/share/postgresql/15
[+] extension/pgmq.control => /usr/share/postgresql/15

Trunk Registry -

The Trunk registry serves as a community hub for Postgres extensions of all kinds. The Trunk CLI installs extensions and their dependencies as compiled artifacts from this registry.

  • Extension discovery and search
  • Publish extensions for community use
  • Install extensions in Postgres

It's our goal to develop Trunk to allow for:

  • Usage metrics to provide insight into popular and well-maintained extensions
  • Version tracking and new release email notifications

✨ Contributing

Trunk is in active development, and we look forward to the contributions the Postgres community has to offer. If you're interested in contributing, please open a pull request, issue, or reach out!

Thanks goes to these incredible people: