User-facing guide to create, connect, snapshot, and box Postgres boxes quickly.

Quick Start

forkr-pg new my-db
forkr-pg connect my-db
You should see “ready to connect” after creation. The connect command will try to open a psql session. When run inside a box, psql -h <box>.<project> should just work.

Create

forkr-pg new my-db
  • Creates a new Postgres box quickly
  • Waits for port readiness, then prints a connect hint
  • Fails if the name already exists

Connect

forkr-pg connect my-db
  • Uses psql if available
  • When inside a box, direct DNS resolution works
  • From a local machine, DNS/ports may not resolve; forkr-pg will fall back to an in-box psql session when needed
Pass additional psql args after --:
forkr-pg connect my-db -- -c "select 1"

Snapshot (Hard)

forkr-pg snapshot my-db
forkr-pg snapshot my-db my-snapshot
  • Hard snapshots by default (no stop)
  • Designed for instant boxes and WAL crash recovery

Box

forkr-pg box my-db my-test-db
forkr-pg connect my-test-db
  • Creates a new box from a hard snapshot of my-db
  • Keeps the source running
  • New instance is ready to connect quickly

Stop (Clean)

forkr-pg stop my-db
  • Performs a clean stop (CHECKPOINT + smart shutdown)

Defaults

  • User: postgres
  • Database: postgres
  • Password: postgres