About pgnode
pgnode is a CLI-first agent that turns natural language into validated SQL, then runs it on your PostgreSQL database. It is designed for developers who want fast answers without shipping data to a hosted service.
pgnode talks to Ollama on your laptop, so prompts, schemas, and results never leave the machine.
It connects directly or through an SSH tunnel and uses your live schema to shape SQL.
Every statement is validated before execution, with explicit confirmation for inserts and updates.
Run one-shot queries, stay in a chat session, or use helpers like /tables and /history.
Step 1
Save your DATABASE_URL, Ollama host, and model name with pgnode connect.
Step 2
Run pgnode doctor to confirm the database, tunnel, and model are all reachable.
Step 3
Ask for SQL in natural language and keep control of when writes execute.