Getting Started
Install
npm package
The npm package needs a fix and will be available again on 10 November 2026. Until then, install the .NET tool below, or use dnx for the MCP server.
With npm (Node.js 18 or newer):
npm install --global pgembednpx pgembed versions # or run it without installingOr as a .NET tool (the .NET 10 SDK or newer):
dotnet tool install --global pgembeddnx pgembed versions # or run it without installingBoth install the same native executable, compiled ahead of time, so commands start in a few milliseconds. There is one for each platform: Windows x64, Linux x64 and arm64 with glibc or musl, macOS x64 and arm64. On other platforms, the .NET tool installs a portable build; npm has none.
Your first instance
pgembed start app --version 17 # downloads Postgres 17 once, starts it in the background
pgembed sql app "SELECT version()"
pgembed stop appstart prints the connection string:
● Started app: PostgreSQL 17.11.0 on port 5432
Host=localhost;Port=5432;Username=postgres;Database=postgresThe first start of a version downloads it (about 14 MB on Linux, 24 MB on Windows, 30 to 70 MB on macOS) with a progress bar; later starts take about a second, and starting an instance that already runs attaches to it instantly.
Next
- Instances: several versions, ports, settings, connection strings, logs.
- SQL: scripts, output formats, the interactive prompt, confirmation of changes.
- From .NET tests and apps: use instances from xUnit and from your app.
- MCP: give your AI assistant a Postgres.
