DEV Community

Cover image for I built db-studio, a free, open-source database studio you can run with npx
Hüsam
Hüsam

Posted on Fully Autonomous

I built db-studio, a free, open-source database studio you can run with npx

I'm Hüsam, a software engineer in Istanbul and the solo developer behind db-studio. It's a free, open-source database studio you can run locally with one command.

npx db-studio
Enter fullscreen mode Exit fullscreen mode

Every database. One studio.

Browse tables, edit records, run queries, and explore schema diagrams in the same app. There's also a desktop app if you prefer a dedicated window.

Start with your existing database

Run the command from your project directory. db-studio looks for a DATABASE_URL in your project's .env file or environment. If it doesn't find one, you can paste a connection URL on the Connect page.

Open the local address printed in the terminal. You don't need to create a hosted account.

Connections are saved locally, and the CLI and desktop app share the same list. Each browser tab keeps its own connection, so you can work with different databases side by side.

Edit data like a spreadsheet

The latest update adds these editing workflows:

  • Select a range of cells, copy it with headers, and paste cells from a spreadsheet.
  • Review unsaved edits, revert a single cell, or undo with Cmd/Ctrl+Z.
  • Choose explicitly between NULL, empty text, and a column's default value.
  • Copy a row as JSON or a SQL INSERT statement.
  • Duplicate a row from its menu.

The db-studio table editor showing a local demo database

Editing and schema capabilities depend on the engine. For example, ClickHouse tables are read-only in the grid, while explicit mutations remain available in the query editor. A saved connection can also open read-only when its engine supports it.

Work across nine database engines

db-studio supports PostgreSQL, MySQL, SQL Server, MongoDB, SQLite, Redis, DuckDB, Oracle, and ClickHouse.

You can also connect to MariaDB, CockroachDB, TiDB, Turso/libSQL, and Cloudflare D1 through their supported engines.

The interface follows the database's data model. MongoDB has collections, and Redis has key types. Available operations vary with the database.

Queries, schemas, and optional AI

The query editor has syntax highlighting and autocomplete. You can save queries and inspect results as a table or JSON. Import and export support CSV, Excel, and JSON.

For relational databases, schema diagrams help you see how tables connect. You can also browse related records through foreign keys.

A db-studio schema diagram showing relationships between customers, projects, tasks, notes, and invoices

AI assistance is optional and uses your own provider key. It can help write, explain, optimize, or fix queries.

Both screenshots show the real app running against a local demo database.

Try it and tell me what needs work

db-studio is free under Apache 2.0. I build and maintain the database adapters, API, interface, CLI, and desktop app. Contributions and bug reports are welcome.

Website and documentation · Source code

Which database would you try first, and what's one task you'd want db-studio to make easier?

Top comments (0)