SQLite Hub | Local-first SQLite Manager and CLI

9 min read Original article ↗

Local database work, focused in SQLite Hub.

Browse, edit, query, visualize, document, and export SQLite data without a cloud layer or a heavyweight database client.

Database overview

Health, storage, schema connectivity, and database details in one overview.

Product tour

Explore the core SQLite Hub workflows.

Each workspace stays close to the active local database and keeps the next practical action within reach.

01 / SQL Editor

Write, format, run, and reuse SQL.

The syntax-highlighted editor keeps drafts, query history, saved queries, results, performance metrics, messages, and export actions in one workspace.

  • Run with Shift + Enter, format SQL, search history, and attach titles or notes to saved queries.
  • Inspect execution time, statement counts, returned or affected rows, errors, and serialized result size.
  • Copy full columns, headers, or first-10 previews; export TXT, Markdown todos, CSV, TSV, Markdown, or a duplicate table.
  • Interactive results stay bounded at 5,000 rows while full exports keep complete rows and BLOB values.
  • Edit or delete direct single-table SELECT results when a stable row identity is available; destructive and multi-statement SQL stays visible in history and Messages.
  • Syntax highlighting
  • Query details
  • Column export
  • Result export
Editor and resultsRun and format SQL, inspect results, and switch between Results, Performance, and Messages.

02 / Data

Filter, export, and safely edit table data.

Browse up to 250 rows per page, search tables, combine column/operator/value filters, sort wide grids without losing scroll position, and export complete table data.

  • Export tables as CSV, TSV, or Markdown, or duplicate an export into a new table.
  • Compact cell previews handle long values, BLOBs, and file paths while exports retain complete content.
  • The Row Editor previews SQL changes, JSON, URLs, file paths, timestamps, text lengths, NULL states, and supported CHECK values; full-row JSON can be copied or exported.
  • Updates and deletes are enabled only when SQLite Hub has a stable primary-key or rowid identity.
  • Table browser
  • Row editor
  • CSV export
  • Simple backups
Browse table dataFilter, sort, paginate, and export full tables while keeping dense datasets manageable.

03 / Documents

Keep Markdown notes beside each database.

Documents are local Markdown files scoped to the active database, with autosave, independent editor and preview scrolling, imports, exports, and flexible pane visibility.

  • Create, rename, delete, import, and export Markdown documents without leaving SQLite Hub.
  • Preview lists, tables, code blocks, links, and clickable task-list checkboxes.
  • Insert saved-query result tables or saved notes, and create documents from Markdown todo column exports.
  • Markdown notes
  • Autosave
  • Query inserts
  • Import and export
Markdown documentsEdit and preview database-scoped Markdown with autosave and saved-query inserts.

04 / Charts

Turn saved query results into local charts.

Create charts from chartable SELECT entries in query history, render them from live query results, and save multiple chart configurations per query.

  • Build bar, line, pie, donut, and scatter charts with compatible column controls.
  • Configure sorting, labels, legends, line smoothing, scatter series, and optional point sizing.
  • Resize, edit, reopen, delete, and export charts as PNG.
  • Bar charts
  • Line and pie
  • Scatter plots
  • PNG export
Bar chartCompare grouped counts or values across categories with a saved bar chart.

05 / Structure

Inspect schema objects and relationships.

Search tables, views, indexes, and triggers, inspect columns and DDL, and move through a relationship graph that keeps the current table selected between views.

  • Review declared types, primary keys, nullability, foreign keys, indexes, triggers, views, and copied DDL.
  • Fit or relayout the graph, clear selections, hide panels, and jump directly to table data.
  • Keep the last selected table while moving between Structure, Data, and related workflows.
  • Relationship graph
  • Table inspector
  • Columns and types
Table relationship graphSee tables and their links in one navigable schema graph.

06 / Table Designer

Create and migrate tables with a live SQL preview.

Build new tables or edit existing ones with validation, migration warnings, a searchable table list, and copyable SQL that updates before the operation is applied.

  • Configure names, SQLite types, NOT NULL, UNIQUE, primary keys, SQL defaults, foreign keys, and CHECK constraints.
  • Surface existing composite unique constraints as schema metadata.
  • Seed a new table draft from CSV and optionally import its rows after creation.
  • Column editor
  • Primary keys
  • Defaults
  • CHECK constraints
Design table columnsConfigure column names, SQLite types, nullability, defaults, and key options in one form.

07 / Media Tagging

Tag local media through a database-driven queue.

Configure media, path, status, tag, and mapping tables plus the queries that drive tagged and untagged queues. Preview image, video, and audio paths relative to the active database.

  • Create default tag structures, validate setup, reset queries, search tags, and manage parent tags.
  • Apply tags, copy tags from the previous item, skip or reset items, and advance with Shift + Enter.
  • Rotate visual media, toggle details, and open the current record directly in Data or Structure.
  • Source setup
  • Tagging queue
  • Media viewer
  • Metadata fields
Configure the data sourceChoose the media table, path column, join table, and tag columns that power the workflow.

08 / Overview and Connections

Manage local files and understand database health.

Open or create SQLite files, customize recent connections, and use the overview to inspect storage, schema connectivity, integrity, runtime, and access details for the active database.

  • Relabel or move connections, add custom icons, open read-only, and remove recent entries without deleting their files.
  • Review file and page metrics, object counts, largest tables, foreign-key clusters, isolated tables, integrity checks, and schema versions.
  • Use sidebar quick picks for the five most recent databases and create timestamped backups beside the active file.
  • Remember hidden panels, selected tabs, query drafts, chart panels, table row size, and Table Designer preview visibility locally.
  • Database summary
  • Table counts
  • Local connections
  • Recent files
Database overviewReview health, storage, schema connectivity, integrity, runtime, and access information.
Local database connectionsOpen or create local files, manage labels and icons, move paths, and control read-only access.

Practical use cases

Useful when a SQLite file is the product, the source, or the evidence.

SQLite Hub is designed for direct work on local files rather than a hosted database platform.

01

Explore an unfamiliar database

Start with the overview and relationship graph, inspect table structures, then sample rows before writing a query.

02

Clean or correct records

Find the affected rows in Data, create a backup, and edit individual records with the surrounding table still visible.

03

Analyze content datasets

Keep database-scoped research notes in Documents, chart saved query results, and tag image, video, or audio records linked through mapping tables.

04

Share a result outside the app

Export table data as CSV or move a SQL result into CSV, TSV, or Markdown for reports, scripts, and documentation.

Install and run

Install once, then work locally.

Install SQLite Hub with Homebrew or npm. Start the local app on port 4173, open it directly in the browser, or choose another port.

The server binds to the IPv4 loopback interface and protects local API mutations from foreign hosts and origins.

Install

$ brew tap oliverjessner/tap$ brew install sqlite-hub
$ npm install -g sqlite-hub

Run

$ sqlite-hub$ sqlite-hub --open
$ sqlite-hub --port:4174$ sqlite-hub --config$ sqlite-hub --version

Check the installed app and SQLite runtime versions, find the custom-port command, and open project links.

Runtime settingsReview app and SQLite runtime versions, custom-port guidance, and project links.

Local JSON API

Automate SQLite Hub from scripts and tools.

SQLite Hub exposes a versioned JSON API at /api/v1 on the local loopback server. Tokens are created per database, so scripts can read tables, execute saved queries, export results, and fetch database-scoped documents without opening the full UI.

Create a token in Settings > API Tokens. The token is shown once, stored only as a SHA-256 hash plus metadata, and must match the database used in the request URL.

Base URLhttp://127.0.0.1:4173/api/v1

Use the active SQLite Hub port, or your custom port if you started the app with --port.

AuthBearer shub_...

Every database request needs a bearer token created for that exact database.

ResponsesJSON envelope

Successful and failed responses share a structured envelope with success, data, metadata, warnings, and errors.

GET  /api/v1/databases/:databaseIdGET  /api/v1/databases/:databaseId/tablesGET  /api/v1/databases/:databaseId/tables/:tableNamePOST /api/v1/databases/:databaseId/tables/:tableName/row
GET  /api/v1/databases/:databaseId/queriesGET  /api/v1/databases/:databaseId/queries/:queryNameGET  /api/v1/databases/:databaseId/queries/:queryName/notesGET  /api/v1/databases/:databaseId/queries/:queryName/export?format=csv|tsv|md|jsonPOST /api/v1/databases/:databaseId/queries/:queryName/execute
GET  /api/v1/databases/:databaseId/documentsGET  /api/v1/databases/:databaseId/documents/:documentNameGET  /api/v1/databases/:databaseId/documents/:documentName/export

Built-in CLI

Use the same local data from the terminal.

Start SQLite Hub, inspect imported databases and tables, run saved queries, export results, work with Markdown documents, or export one row as JSON.

Database names are matched case-insensitively. Query exports use the same CSV, TSV, and Markdown logic as the graphical SQL Editor. Legacy database and SQL Editor aliases remain available.

Start the server, open the browser, inspect runtime configuration, or print help and version information.

$ sqlite-hub$ sqlite-hub --port:4174$ sqlite-hub --open$ sqlite-hub --config$ sqlite-hub --help$ sqlite-hub --version

List imported databases, retrieve file details, list tables, or print table metadata without opening a full workspace.

$ sqlite-hub --database$ sqlite-hub -d$ sqlite-hub --database:Billly --path$ sqlite-hub --database:Billly --size$ sqlite-hub --database:Billly --lastopened$ sqlite-hub --database:Billly --tables$ sqlite-hub --database:Billly --table:companies

List saved queries, print SQL or notes, execute a query by title, and export the complete result into the current directory.

$ sqlite-hub --database:Unit-00 --queries$ sqlite-hub --database:Unit-00 --execute:"Stock Winners"$ sqlite-hub --database:Unit-00 --query:"Stock Winners"$ sqlite-hub --database:Unit-00 --notes:"Stock Winners"$ sqlite-hub --database:Unit-00 --export:"Stock Winners" --format:csv$ sqlite-hub --database:Unit-00 --export:"Stock Winners" --format:tsv$ sqlite-hub --database:Unit-00 --export:"Stock Winners" --format:md

Find database-scoped documents by id, filename, title, or partial match, then print or export their Markdown.

$ sqlite-hub --database:Unit-00 --documents$ sqlite-hub --database:Unit-00 --documents:"Research Notes"$ sqlite-hub --database:Unit-00 --documents:"Research Notes" --export$ sqlite-hub --database:Unit-00 --documents:"Research Notes--export"

Export one safely addressable row using the same JSON shaping used by the graphical Row Editor.

$ sqlite-hub --database:Unit-00 --table:companies --export:0a754aba373d34972998792a0be4333c

FAQ

A few quick answers.

Short, direct, and close to the product.

Does SQLite Hub send my database to a hosted service?

No. SQLite Hub is built for local SQLite files and runs its interface locally in your browser.

What can I export?

Export tables and complete SQL results as CSV, TSV, or Markdown, duplicate results as tables, export result columns as TXT or Markdown todos, save charts as PNG, export documents as Markdown, and export rows as JSON from the CLI.

Can I edit data and schema?

Yes. The Data workspace includes a row editor, while Table Designer handles columns, keys, defaults, nullability, and CHECK constraints.

What visualization tools are included?

SQLite Hub includes a table relationship graph plus saved bar, line, pie, donut, and scatter charts built from live saved-query results.

How do I install SQLite Hub?

Use Homebrew with `brew tap oliverjessner/tap` and `brew install sqlite-hub`, or install globally with `npm install -g sqlite-hub`.

What can the built-in CLI do?

It can start and configure the app, list imported databases, inspect tables, run or export saved queries, print or export Markdown documents, and export a row as JSON.

Does SQLite Hub have an API?

Yes. SQLite Hub exposes a local JSON API at `/api/v1` with database-scoped bearer tokens for tables, saved queries, exports, and documents.

Can I use a port other than 4173?

Yes. Start SQLite Hub with a command such as `sqlite-hub --port:4174`.

Open source

Work directly with the SQLite file in front of you.

Install SQLite Hub, open a local database, and move from schema context to records, queries, exports, and specialized content views.

View the source code