Repository navigation
Releases
Releases · progrium/minipg
v0.3
minipg: Use PostgreSQL like SQLite on command line
PostgreSQL as a single executable. No server setup, no Docker. A .pgdb folder holds the whole database, and minipg app.pgdb opens a shell on it.
minipg app.pgdb # psql shell (creates app.pgdb if missing)
minipg url app.pgdb # postgres:// URL for your app
minipg run app.pgdb -- npm start # your app, with DATABASE_URL set
minipg dump app.pgdb > dump.sql # and minipg restore app.pgdb dump.sqlminipg embeds Docker Hub's postgres:18-alpine and runs Alpine's own Postgres binaries with hyper9, directly on the host's hypervisor. There's no Linux kernel to boot, no VM image, and no container runtime.
Try it in your browser: the project page runs a shell with minipg in it. Create a table, insert, and select without setting up a server.
Since v0.2 (if you're coming from the old postgres17-standalone)
- New embedding runtime: Switched from v86 in headless webview using webframe to the hyper9 hyperkernel
- 8,000x faster: Best case server boot went from 7 seconds to 800ms.
- Full SQLite-inspired CLI:
init,serve,stop,status,url,logs,exec,env,run,dump,restore,dbs,create/drop,default,passwd. - Postgres 18 and other majors: Default is now Postgres 18.
init --pg 17downloadspostgres:17-alpineand caches it by digest.MINIPG_OFFLINEandMINIPG_REGISTRYare supported.
Known limits
minipg is early, and hyper9's Linux personality is young, so don't trust it yet with data you can't recreate.
- WHP commits each machine's memory up front: 2 GB per server and 1 GB per running tool.
- JIT is off, because the root drops LLVM.
See Known limits for the rest.
minipg p1
Fix the macOS build: use fstatat for the .pgdb key Zig 0.16's std.c.stat resolves to a private.stat that std never declares for aarch64-macos, so any reference to it fails to compile there. std.c.fstatat with AT.FDCWD does the same lookup and is declared on every Darwin target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LLcnT3mwESB2iEjEuL1yds