tonic
tonic is a tiny database octopus for people who know enough SQL to be dangerous and enough restraint to save their targets first. It keeps database access anchored to named local config, then gives you explicit query execution, schema inspection, transaction-aware files, and a local JSON-RPC boundary for editor clients.

This is Tini. Tini pokes catalogs, remembers targets, and tries very hard not to let you paste production credentials into your shell history.
Name the database beast once, then stop juggling connection strings like cursed spaghetti.
SQL files can say where they run, which handle they use, and what flavor of trouble they are causing.
Reusable sessions keep transaction state around when your workflow needs more than one dramatic statement.
Browse catalogs, schemas, tables, views, columns, and definitions without spelunking vendor docs every time.
A Small Example
Section titled “A Small Example”tonic connections add sqlite scratch --path ./scratch.db --localtonic query ping --target scratchtonic query exec --target scratch --sql 'select sqlite_version() as version'tonic inspect tables --target scratch --refreshQuery files make intent visible inside the artifact, which is nicer than whispering “trust me” at a migration-adjacent script:
-- tonic-file: target=warehouse context.schema=analytics autocommit=off-- tonic-bind: handle=writer target=warehouse context.schema=public autocommit=off
select * from reports.daily_sales;
-- tonic: handle=writerupdate reports.job_state set last_run_at = current_timestamp where name = 'daily_sales';
-- tonic: handle=writercommit;Design Principles, Somehow
Section titled “Design Principles, Somehow”- Local config first. Targets live in global or project-local config; secrets are referenced through environment variables.
- Execution should be explicit. The target, context, handle, and session mode should be visible before SQL mutates data.
- SQL remains SQL. Transaction control uses SQL statements such as
begin,commit,rollback,savepoint, andrelease. - One runtime, many surfaces. The CLI and
serve --stdioshare target resolution, statement policy, execution, and inspect behavior.
Tonic stands for Tiny Octopus Navigating Infinite Catalogs. Why? Because every serious database tool needs at least one deeply unserious explanation.