Database Ops · Local-only

CLI database ops, as buttons.

A web UI over the database CLI commands you keep half-remembering. No AI, no magic — just psql / mysql operations turned into clicks, running fully on your machine.

git clone https://github.com/MR-TABATA/cli2ui cd cli2ui docker compose up

Local-only · Docker

The cli2ui workspace overview, every panel one click away with live counts

Features

See the result before you commit to it

The dangerous part usually isn't the operation — it's not knowing until you've done it. Whatever can be answered first, is — and none of it leaves anything behind in your database.

An UPDATE refused inside a read-only transaction

How many rows violate a constraint

Count the rows a NOT VALID foreign key never checked — without validating it, and without changing anything.

The count of rows violating a foreign key, and the NOT VALID list

A real DB client, on your machine

The workspace overview puts every panel one click away, with live counts. Table detail has columns, indexes, a row preview, a filter builder, CSV import/export, and one-click backup or rename.

Table detail with a row preview and filter, plus one-click actions

The SQL runner is read-only by default

A read-only transaction with a statement timeout and a 1000-row cap. No SQL is parsed to guess your intent — the server itself refuses the write. EXPLAIN, scale and index what-ifs are built in.

The SQL runner with a query, its result, and EXPLAIN and index buttons

Index lab: measure before you create

Build a hypothetical index inside one transaction, compare EXPLAIN ANALYZE before and after, then ROLLBACK. Know it helps before you create it.

EXPLAIN ANALYZE before and after an index, showing 7.1x faster

DDL that gives up, not piles up

Every ALTER / DROP / TRUNCATE / rename runs under a short lock_timeout (2 s). If the lock can't be taken, it gives up and nobody queues behind it.

Editing a column, showing it rolled back because the lock couldn't be taken

EXPLAIN snapshots + diff

Save query plans and diff two of them — before and after an index — instead of copy-pasting plans into a scratch file.

A diff of the plan before and after adding an index

Scale simulation

EXPLAIN the same query at 1× / 100× / 10000× the real row counts (a what-if pg_class edit, always rolled back) to see where the plan shape breaks as data grows.

How the plan changes at 100× and 10000× the rows

Activity

Running queries and connections from pg_stat_activity, with one-click cancel / kill.

Locks

The wait-for chain as a tree: the head blocker at the top, blocked sessions nested under it. Cycles are flagged.

Health · index & bloat facts

Table sizes, unused indexes, unindexed foreign keys, duplicate indexes, orphan rows, dead rows and a bloat estimate. Facts only — no advice.

Dependencies

The foreign-key graph sorted into a safe TRUNCATE order and its reverse (load order), with FK cycles named. Nothing is truncated.

Extensions and objects

Installed and installable extensions, databases, schemas and roles, and a postgresql.conf editor — changes sit behind a confirm gate.

Backup, restore and replication

Automatic snapshots before destructive changes, streamed dump restores, and replication readiness and slots.

What it supports — and what it won't do

The constraints are the product.

Databases

  • PostgreSQL
  • MySQL 8.0+
  • The same panels over either engine
  • Panels with no MySQL equivalent say “not applicable”

What it deliberately doesn't do

  • No AI: your schema never goes to a third party
  • No SaaS: DB credentials never leave your machine
  • Runs exactly the command you clicked, with no guessing

Safe by default

  • The SQL runner is read-only
  • DDL under a 2 s lock_timeout
  • Automatic snapshot before destructive changes
  • A local-only UI

Under the hood

  • Front end: htmx + Alpine.js
  • Back end: Django
  • Admin DB: SQLite
  • Runtime: Docker

Free and open source

cli2ui

You're looking at your tables 3 minutes after deciding to.

Free

Local-only · Docker

MIT License · Source on GitHub
Designed to run locally with no authentication. Never expose it to the public internet.

  • psql / mysql operations, one click each
  • See the result first (violations, delete order, read-only)
  • Index lab, scale simulation, EXPLAIN diff
  • Activity, locks and health
  • Sample data in the box, connection form pre-wired
  • Starts with a plain docker run (for the bundled sample database: clone, then docker compose up)
Get it on GitHub

Clone it, then docker compose up.

git clone https://github.com/MR-TABATA/cli2ui cd cli2ui docker compose up