SQLite · Terminal database manager
A terminal database manager for SQLite. Connect to a database file, browse and edit tables, and run queries — from a clean CLI or an interactive REPL. Built on schema introspection, so it adapts to whatever database you point it at. Pure Python standard library, no runtime dependencies.
Try it here
What it does
A generic tool that discovers a schema it knows nothing about in advance.
Open any SQLite file, with an optional read-only mode for safe inspection.
List tables and views; read columns, types, primary key, foreign keys and indexes.
Page through rows with LIMIT/OFFSET, pick columns, filter with WHERE, sort with ORDER BY.
Run arbitrary SQL. SELECT renders a grid; DML reports affected rows; bad SQL is an error, not a crash.
Insert, update and delete by the table's real PK — bound parameters only, no injection.
Export a table or query result to CSV or JSON in a line.
The real tool
The browser demo above is read-only. The actual TablePro is a Python program — a set of argparse subcommands plus a cmd-based REPL over the tablepro.db.Database class. A real session:
$ python -m tablepro.seed # build the sample database $ python -m tablepro sample.db schema books TABLE books ┌───────────┬─────────┬────────────────────┐ │ column │ type │ constraints │ ├───────────┼─────────┼────────────────────┤ │ id │ INTEGER │ PK │ │ title │ TEXT │ NOT NULL │ │ price │ REAL │ NOT NULL DEFAULT 0 │ └───────────┴─────────┴────────────────────┘ foreign keys: author_id → authors.id $ python -m tablepro sample.db insert authors name="N. K. Jemisin" born=1972 inserted row, id=6 $ python -m tablepro sample.db update authors 6 country="United States" updated 1 row(s) $ python -m tablepro sample.db delete authors 6 --yes deleted 1 row(s)
Architecture
Every database opened follows the same flow:
Open the SQLite file; optionally read-only.
Query sqlite_master and PRAGMAs for tables, columns, keys and indexes.
Show the schema and page any table as a box-drawn grid.
Translate edits into parameterised SQL keyed on the real primary key.
Run ad-hoc SQL, and export tables or results to CSV / JSON.