Skip to content

Installation

Terminal window
# Clone the repository
git clone https://github.com/storyvis/pgvis.git
cd pgvis
# Build release binary
cargo build --release --bin pgvis
# The binary is at ./target/release/pgvis

If you have Nix with flakes enabled:

Terminal window
# Build
nix build github:storyvis/pgvis
# Or run directly
nix run github:storyvis/pgvis -- serve --dsn "postgres://localhost/mydb"
# Development shell
nix develop
Terminal window
docker run -e PGVIS_DSN="postgres://host.docker.internal/mydb" \
storyvisai/pgvis serve --bind 0.0.0.0:3000
Terminal window
pgvis --version
pgvis --help

pgvis reads configuration from environment variables prefixed with PGVIS_:

VariablePurposeDefault
PGVIS_DSNDatabase connection stringrequired
PGVIS_BINDServer bind address0.0.0.0:3000
PGVIS_SCHEMASSchemas to expose (comma-separated)public
PGVIS_JWT_SECRETJWT verification secretnone (anonymous)
PGVIS_ANON_ROLERole for unauthenticated requestsnone
PGVIS_MAX_ROWSMaximum rows returnedunlimited

See the Configuration Reference for the full list.