Manage your databases with AI agents.

Secure read-only access to your PostgreSQL databases for AI agents and developers.
Health checks. Schema browsing. Query execution. MCP server included.

Who is it for?

Built for anyone who works with PostgreSQL databases daily.

Backend Developers

Manage connections to multiple databases across environments. Switch between dev, staging, and production without remembering connection strings.

Database Administrators

Monitor database health at a glance. Run quick connectivity checks across your entire fleet and spot issues before they become incidents.

DevOps Engineers

Integrate health checks into your workflow. Script database connectivity verification or use the TUI for interactive troubleshooting.

Features

Simple, fast, and focused on what matters.

PostgreSQL Connections

Store and manage multiple PostgreSQL connection configs. One INI file, all your databases in one place.

Health Checks

Verify database connectivity with a single command. 5-second timeout keeps checks fast and responsive.

Interactive TUI

Full-screen terminal UI for browsing connections and running health checks with real-time feedback.

INI Config

Human-readable INI format for database configs. Easy to edit, version, and share across your team.

CLI & TUI Modes

Use subcommands for scripting or launch the interactive TUI for hands-on management. Same tool, two interfaces.

Background Checks

TUI runs health checks on a background thread. The UI stays responsive while connections are verified.

Cross-Platform

Runs on macOS, Linux, and Windows. Built with Rust for native performance on every platform.

Zero Config Start

Missing config file? No crash. Just a helpful message and an empty list. Add databases when you're ready.

Installation

Two ways to get started.

Homebrew (macOS)

$ brew install maximgorbatyuk/tap/databasecli

# Verify installation
$ databasecli --version
databasecli x.y.z

Cargo (cross-platform)

$ cargo install databasecli

# Verify installation
$ databasecli --version
databasecli x.y.z

macOS, Linux, and Windows. Built with cargo-dist.

Usage

Talk to your databases with AI, use the CLI, or launch the TUI.

Set up MCP for Claude Code in one command

$ databasecli init

Created  ~/.databasecli/databases.ini
Created  .mcp.json

# That's it. Claude Code can now talk to your databases.
# Edit databases.ini to add your connections, then ask Claude:

Ask Claude about your database in plain English

You:  What tables do I have in the staging database?

Claude:  I found 12 tables in staging:

        users          4,832 rows    1.2 MB
        orders        18,294 rows    8.4 MB
        products       1,047 rows    0.3 MB
        payments      16,511 rows    5.1 MB
        ...

You:  Show me users who signed up this week

Claude:  Running query on staging...

        email                  created_at
        --------------------   ----------------
        alice@example.com      2026-03-25 09:14
        bob@startup.io         2026-03-24 14:33
        carol@dev.team         2026-03-23 11:07

        3 users signed up since Monday.

Explore schema and plan migrations with AI

You:  Draw me the entity-relationship diagram
       for orders, products, and payments

Claude:  Here's the ERD in Mermaid syntax:

        erDiagram
          orders ||--o{ payments : has
          orders }o--|| products : contains
          orders { int id PK; int user_id FK; ... }
          payments { int id PK; int order_id FK; ... }
          products { int id PK; text name; ... }

You:  I need to add a "discount_code" column to orders.
       What should the migration look like?

Claude:  Based on the current schema, here's a safe
        migration:

        ALTER TABLE orders
          ADD COLUMN discount_code VARCHAR(32);
        CREATE INDEX idx_orders_discount_code
          ON orders (discount_code)
          WHERE discount_code IS NOT NULL;

        The partial index keeps it lightweight since
        most orders won't have a discount code.

Launch the interactive TUI

1$ databasecli
2# or explicitly:
3$ databasecli tui

List all stored database connections

$ databasecli list

Databases:
  production   localhost:5432/myapp      (admin)
  staging      staging.db:5432/myapp     (admin)
  development  localhost:5433/myapp_dev  (dev_user)

Check health of all databases

$ databasecli health

Health Check Results:
  production   OK      12ms
  staging      OK      45ms
  development  FAIL    connection refused

Configure your databases

1[production]
2host = localhost
3port = 5432
4user = admin
5password = secret123
6dbname = myapp
7
8[staging]
9host = staging.db
10port = 5432
11user = admin
12password = staging_pass
13dbname = myapp

See it in action

Real workflow from setup to health check.

$ databasecli list

Databases:
  production   localhost:5432/myapp      (admin)
  staging      staging.db:5432/myapp     (admin)
  development  localhost:5433/myapp_dev  (dev_user)

$ databasecli health

Health Check Results:
  production   OK      12ms
  staging      OK      45ms
  development  FAIL    connection refused

# Launch the TUI for interactive management
$ databasecli