Skip to main content

psqlomni

Natural language chat for your SQL database.

Build Test Publish

psqlomni translates plain English into SQL and runs it against your database with approval.

It supports SQLAlchemy-compatible databases and multiple model providers:

  • OpenAI
  • Anthropic
  • Google Gemini
  • Ollama

Demo Video

psqlomni demo

Install

pip install psqlomni

Optional provider extras:

pip install "psqlomni[anthropic]"
pip install "psqlomni[google]"
pip install "psqlomni[ollama]"
pip install "psqlomni[all-models]"

Run

psqlomni

Or from source:

python -m psqlomni

Quick Setup

Set either a full DB URI (recommended) or individual DB fields.

export DB_URI="postgresql+psycopg2://user:password@host:5432/dbname"

Option 2: Individual DB Fields

export DBDIALECT="postgresql"
export DBHOST="localhost"
export DBPORT="5432"
export DBNAME="mydb"
export DBUSER="myuser"
export DBPASSWORD="mypassword"

Model Provider

export MODEL_PROVIDER="openai"
export MODEL="gpt-4o-mini"
export OPENAI_API_KEY="your-key"

When values are missing, psqlomni prompts you interactively.

What It Does

  • Converts natural language prompts into SQL
  • Shows SQL for approval before execution
  • Lets you edit SQL before running it
  • Retries when SQL fails, then asks for approval again
  • Keeps conversation history for follow-up questions
  • Supports a normal mode and a verbose trace mode

Useful Commands

  • /help - list commands
  • /connection - show active DB and model
  • /connect - connect to another database
  • /mode normal|verbose - switch output detail
  • /provider - show or set provider
  • /model - show or set model
  • /new - start a new thread
  • /resume <thread_id> - resume a thread
  • /exit - quit

Safety

Every generated SQL query requires your approval before execution.

Docs

Metadata

Release files for psqlomni 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for psqlomni 0.1.5
File Size Uploaded Provenance Actions
psqlomni-0.1.5.tar.gz 16.8 kB With provenance Details for psqlomni-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for psqlomni 0.1.5
File Interpreter ABI Platform Actions
psqlomni-0.1.5-py3-none-any.whl Python 3 none any Details for psqlomni-0.1.5-py3-none-any.whl

Total release size: 36.8 kB

Release files / psqlomni-0.1.5.tar.gz

Download URL psqlomni-0.1.5.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8a3e7ffea867142cdd778e68875fbc0a6b80f5c19ad993446b828c394c076eda
BLAKE2b-256 checksum
How to use checksums
979fbdc2058553df3711391c50a5280f037e4e5dcf72433b72785cb86143127f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

Release files / psqlomni-0.1.5-py3-none-any.whl

Download URL psqlomni-0.1.5-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
953508ed50a645195b2424849f505f2aac70295e93b6ecf068a324e240f28dcc
BLAKE2b-256 checksum
How to use checksums
b81704a943977eddb24e04cc7a7410c7d2501562589d935e7d057f7b43010037
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

Security for psqlomni 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for psqlomni-0.1.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page