Schema, Editor, Results and Agent in one terminal workspace. Click any capture to enlarge.
01 / In motion
From a Statement to an answer.
Three real screen recordings. Follow the keys from the Buffer to the Result, or let the Agent help you find the SQL.
Select any capture to enlarge.
Modal Vim Editing & Result Views
Work on a Statement with is/as text objects. Complete names from the live Schema snapshot with ctrl+n, then Run with Enter. Cycle Table, JSON and Record Result views with Tab, or expand Results with space z.
isctrl+nEnterTabspace z
Agent Steps & Safe Proposals
Ask in plain words in the widened Agent Pane with space a i. Follow read-only ▸ describe and ▸ query Steps, then inspect the SQL Proposal card. Enter puts it into the Buffer; r runs it. Write Statements from a Proposal always ask before running.
space a iEnterr
Omarchy Live Palette & Transparency
Open Themes with space t. Follow the system colors.toml live, toggle :set transparent or ctrl+t, and let the terminal background show through. Choose among seven built-in OpenCode-format Themes.
space tctrl+t
02 / Explore the workspace
Four Panes. One flow.
A Schema snapshot, a Buffer, a Result, and a Conversation. Everything stays within reach. Use the arrow keys to explore the tour.
The whole Session, at a glance.
Schema, Editor, Results and Agent Panes share the workspace. The active Pane border tells you where the next key goes.
shift+h/j/k/l
SQL with your muscle memory.
Vim motions and live Schema completion meet Statement text objects. Type a prefix in insert mode, then cycle names with ctrl+n / ctrl+p.
isasctrl+n
A Turn you can follow.
Your question becomes visible read-only Steps and a Proposal card. Accept the SQL into your Buffer or choose to Run it; a Proposal never runs itself.
space a iEnterr
A different angle on the Result.
Inspect syntax-highlighted JSON in the Results Pane. Cycle Result views with Tab; yank a row as JSON with yy.
Tabyy
One row. Every field.
Open the selected row as a vertical Record with Enter. Return to the previous Result view with q or Esc.
Enterq
Give the Result the whole terminal.
Full-screen Result zoom keeps wide Tables and long JSON close at hand. Toggle back to the workspace when you are ready.
space z
Your coding CLI is already the Provider.
Claude Code, Codex, OpenCode and Antigravity are discovered on PATH. Install and log in to a Provider separately; choose its Model in losql. No API keys to paste.
space pspace m
Make the Session feel at home.
Preview Omarchy and seven built-in OpenCode Themes live. Toggle Transparent mode directly in the Themes dialog.
space tctrl+t
A keyboard map, when you need one.
Space opens the contextual Leader menu. Search every Command with ctrl+p or open help with F1.
spacectrl+pF1
03 / The DNA
Familiar ideas. A focused SQL home.
Neovim + OpenCode + Harlequin & LazySQL. Built around the way terminal people already work.
01 / Neovim DNA
Modal SQL Editing
Motions, operators d c y > <, registers, dot repeat, undo/redo and / regex search. Use is for the inner SQL Statement or as for the Statement with its delimiter. Keep multiple Buffers open and switch with gt/gT.
Move between Panes with shift+h/j/k/l. Run the Statement under the cursor with Enter. The editing model stays in your hands.
cisgtshift+l
02 / OpenCode DNA
Agent on board. No API keys.
losql drives the coding CLI already on your PATH: claude, codex, opencode or antigravity. Each Turn starts in an empty temporary directory with the Provider's tools disabled or restricted to read-only mode. Database credentials are stripped from its child environment.
The Agent can request read-only describe and query Steps, then present a Proposal. You decide what enters the Buffer and what runs. Provider restrictions can still allow local file reads; the Schema snapshot, Conversation and requested rows are sent to the chosen Provider. Use agent.dataAccess: "schema" to prevent row queries.
A write Proposal asks for confirmation before a Run. Statements you Run yourself from the Editor execute without that extra prompt.
03 / Harlequin & LazySQL DNA
Terminal Database Craft
In-process SQLite via bun:sqlite and a Postgres Driver connect one Session to your chosen Connection. Browse the Schema snapshot tree, expand namespaces and peek at a Relation with Enter.
Three instant Result views — Table, JSON and Record — make inspection part of the same flow. One compiled binary; Linux and macOS, tested on Linux.
TableJSONRecord
04 / Omarchy first in mind
Your system palette. Right in your Session.
A Theme that follows your desktop. Transparent Panes that let your terminal breathe.
Omarchy, live.
The omarchy Theme reads ~/.local/state/omarchy/current/theme/colors.toml or ~/.config/omarchy/current/theme/colors.toml and updates live when the system Theme changes.
Let the terminal show through.
:set transparent, --transparent or ctrl+t in Themes leaves Pane backgrounds unpainted. Your terminal background and blur show through while overlays and dialogs stay opaque.
:set transparent
Watch the palette move.
Switch between Omarchy, Transparent mode and built-in OpenCode Themes live inside your Session.
Seven built-ins. OpenCode-format Themes.
tokyonight, catppuccin, everforest, gruvbox, kanagawa, nord, rosepine. Drop a compatible Theme into ~/.config/losql/themes/<name>.json.
space t
05 / Without the interface
The same tools. In your scripts.
Run Statements, ask for SQL, or check your Providers. Commands compose with your shell.
losql exec -c demo "select count(*) from orders"
stdout
count(*)
----------
12
(1 row)
Run a Statement. Print a Result.
exec prints a Table by default. Choose --format json or --format csv, pipe SQL on stdin, or restrict a Run with --read-only.
Result from the bundled demo database.
losql ask -c demo --run "Show revenue by customer"
stdout
select c.name, c.country,
round(sum(i.quantity * i.unit_price), 2)
as revenue
from customers c
join orders o on o.customer_id = c.id
join order_items i on i.order_id = o.id
group by c.id
order by revenue desc;
name | country | revenue
-------------------+---------+---------
Ada Lovelace | UK | 342
Barbara Liskov | US | 310
Alan Turing | UK | 238.5
Margaret Hamilton | US | 214
Ken Thompson | US | 194
Grace Hopper | US | 185.5
Linus Torvalds | FI | 182.5
Edsger Dijkstra | NL | 168
(8 rows)
stderr
losql: describe customers, orders, order_items
losql: query select c.name, count(o.id) as orders from customers c join orders o on o.customer_id = c.id group by c.id
Revenue by customer, verified against the demo database. Ada leads with multiple orders. Review the SQL before running.
Ask in words. Keep the SQL.
ask writes the Proposal SQL to stdout; explanation and Steps go to stderr. --run also runs it read-only. Without that flag, you get SQL to inspect.
Captured against the demo database using a deterministic local OpenCode Provider fixture.
losql providers --test
stdout
Claude Code 1.0.0 /tmp/losql-cli-uIQQHv/bin/claude replied in 0.0s
Codex 1.0.0 /tmp/losql-cli-uIQQHv/bin/codex replied in 0.0s
OpenCode 1.0.0 /tmp/losql-cli-uIQQHv/bin/opencode replied in 0.0s
Antigravity 1.0.0 /tmp/losql-cli-uIQQHv/bin/antigravity replied in 0.0s
Check the coding CLIs on your PATH.
List installed Providers and versions, then send each a one-word test prompt. Each CLI must already be installed and logged in. Use --json for scriptable discovery.
Captured from local Provider protocol fixtures; no live Provider service was contacted.
06 / Quick Start
One binary. Your next Connection.
Install the released binary in one line. Start with the bundled demo, a SQLite file, or a Postgres URL.
01 / Install
Linux & macOS
curl -fsSL https://raw.githubusercontent.com/DennisLoska/losql/v0.2.0/install.sh | sh
Downloads the prebuilt binary for your platform (x86_64 or arm64), verifies its SHA-256 checksum against GitHub Releases ↗, and installs losql to ~/.local/bin.
02 / Launch
Choose your Connection
losql demo
losql ./app.db
losql postgres://user@localhost/mydb
No database server needed for the demo or SQLite. For the Agent, install and log in to a supported coding CLI separately.
07 / Credits & inspirations
Good tools leave their mark.
losql builds on open-source work and ideas from people who care about the terminal.