Features

Everything you'd expect.
And the things you wouldn't.

A tour of every major capability in Ledger. Skip ahead with the index below, or scroll through.

01

SQL Editor with a real tokenizer.

Not a textarea with color. A code editor built from scratch in vanilla JavaScript.

The tokenizer recognizes 612 SQL constructs across keywords, functions, types, and constants. Each gets its own color in every theme. Strings, comments, hex literals, binary literals, session variables — all handled.

Autocomplete is two-pass and context-aware. Type a table alias and a dot, and you get its columns — not every column in the database. The system understands FROM, JOIN, INTO, and UPDATE clauses, then re-classifies identifiers throughout the query so aliases work backward as well as forward.

612
Tokens
286
Keywords
266
Functions
  • EXPLAIN visualizer. Color-coded access types, warning badges on filesort and temporary, row counts highlighted.
  • Multi-statement execution. Paste a migration with multiple CREATE / INSERT / ALTER statements — each runs in sequence with its own result card.
  • DELIMITER directives parse correctly. Stored procedure bodies with BEGIN...END// work.
  • USE works mid-script. CREATE DATABASE bootstrapping scripts run end-to-end.
  • Persistent drafts. Editor content auto-saves per database. Navigate away and back — your query is still there.
WITH recent AS (
SELECT *
FROM orders
WHERE created_at > NOW() - INTERVAL 7 DAY
)
SELECT u.name, COUNT(r.id)
FROM users u
LEFT JOIN recent r ON r.user_id = u.id
GROUP BY u.id
id BIGINT · PK
name VARCHAR
email VARCHAR
created_at DATETIME
02

Browse and edit. Without the reload tax.

Click any cell, type, press Enter. AJAX save, green flash on success. The page doesn't reload. Your scroll position holds. Your filters hold.

Tab moves to the next cell. Long values auto-promote to a resizable textarea between 60 and 300 pixels tall. NULL is a checkbox for nullable columns.

  • FK drill-down. Foreign-key values render as clickable links. Click to jump to the referenced row in the target table with an exact-match filter applied.
  • Row detail panel. Eye button slides out a panel with every column vertically, full untruncated values, type badges, drill-down links.
  • Bulk operations. Checkbox select-all with indeterminate state, themed confirmation modal, single DELETE WHERE IN (...) under the hood.
  • Insert Row. Auto-generated form per table — date pickers for DATE, enum dropdowns, NULL checkboxes, "Insert another" toggle for batch entry.
  • Favorites. Star tables from anywhere. Starred ones surface in a dedicated section at the top of the sidebar.
users · 1,247 rows page 1 of 25
ID NAME EMAIL ROLE
1 Marcus Aurelius editing marcus@example.com admin
2 Julia Trader julia@example.com user
3 Crypto King king@example.com user
4 Trader Joe joe@example.com user
04

Interactive ER diagrams in pure SVG.

Every table renders as a card with key icons, column types, and nullable indicators. Relationships use crow's foot notation — three-pronged fork at the FK end, double bars at the PK end.

Drag tables to reposition. Pan with empty-space drag. Zoom with scroll wheel. Auto-layout runs a force-directed physics simulation if you want to start fresh.

  • Layout saves per database to logs/er/. Reopen and everything is exactly where you left it.
  • Reset button deletes the saved layout and rebuilds from auto-layout against the live schema.
  • Right-click context menu — Browse Data, Structure, SQL Editor, Export SQL.
  • Hover to highlight relationships — connected lines brighten, unrelated tables dim.
  • Three line styles: curved, elbow, straight.
users id BIGINT name email created_at orders id FK user_id total items
⇆ drag ⊕ zoom ⤿ save ⟲ reset
05

Views, triggers, routines, events.

Most database tools wave at these. Ledger gives every one the same treatment as tables: full CRUD with syntax-highlighted definitions, skeleton templates for new objects, drop-then-recreate with rollback for edits.

  • Views — listed alongside tables in the sidebar, full CRUD, browse view data like a table.
  • Triggers — timing + event color-coded badges (BEFORE/AFTER, INSERT/UPDATE/DELETE), inline editor.
  • Routines — stored procedures and functions, parameter modes shown (IN/OUT/INOUT), DETERMINISTIC flag, skeleton templates.
  • Scheduled events — full schedule display, one-click enable/disable, last-execution timestamps.
  • Scheduler status check — warning banner when event_scheduler = OFF and events exist. Easy to miss otherwise.
event_scheduler = OFF · events won't fire
ENABLED cleanup_old_logs EVERY 1 DAY
ENABLED rollup_metrics EVERY 1 HOUR
DISABLED archive_orders EVERY 1 WEEK
06

Live process monitor with one-click kill.

A dedicated top-level Processes tab turns Ledger from a schema editor into a tool you keep open. It shows SHOW FULL PROCESSLIST with header stats, auto-refresh, and color coding so the things that need attention pop visually.

  • Auto-refresh — off, 2s, 5s, or 10s. Filter and scroll position preserved across refreshes.
  • Color-scaled query time — gold at 3s, amber at 10s, red at 60s. Sleeping connections stay dim regardless.
  • Hide-sleeping toggle for quiet servers where 90% of connections are idle.
  • Current-session marker — a green star marks your own connection. Self-kill blocked in UI and enforced server-side.
  • Kill button shows the query being terminated in the confirm modal so you don't kill the wrong thing.
TOTAL
14
ACTIVE
3
SLEEPING
11
LONGEST
8.4s
SELECT * FROM users WHERE... Query 0.1s
UPDATE orders SET status = ... Query 62s
Sleep 204s
07

Query history that remembers errors.

Every query you run is logged with its target database, execution time, result count, success/error state, and on failure the full PDO error message.

  • Tinted rows — success green, error red — that adopt each theme's accent colors.
  • Click to expand for the result summary or error detail. Click again to collapse.
  • Load button pastes the SQL back into the editor.
  • Search/filter entries by SQL content as you type.
  • Duplicate suppression — re-running the same query updates the existing entry instead of stacking a new one.
SELECT u.name, COUNT(o.id) ... 18 rows · 12ms
SELECT * FROM userz 1146 · table doesn't exist
UPDATE users SET active = 1 ... 3 affected · 4ms
SHOW TABLES 41 rows · 2ms
08

Tables, indexes, and partitions.

Create tables with a visual form and a live SQL preview that updates as you type. Edit columns inline. Manage indexes with composite-key support. Run maintenance from one panel.

  • Visual CREATE TABLE form with column rows, type datalist, auto-wiring (Auto Increment → PK), and live syntax-highlighted SQL preview.
  • Inline column editing via ALTER TABLE CHANGE COLUMN with type, nullable, default, comment all editable.
  • Index management — composite keys on one row, kind badges, click-to-select column picker with numbered order badges.
  • Partition management — RANGE, LIST, HASH, KEY methods. Per-partition Optimize, Rebuild, Truncate, Drop.
  • Maintenance panel — Optimize, Analyze, Check, Repair with inline status.
  • Foreign key visualization — both incoming and outgoing constraints with cascade rules color-coded.
INDEXES
PRIMARY id 1247
UNIQUE email 1247
INDEX created_at, status composite
FULLTEXT name, description
09

Import and export, properly.

Import SQL or CSV with drag-and-drop. The SQL splitter handles backticks, doubled-quote escapes, hash comments, conditional /*! */, and DELIMITER directives — so stored procedure dumps from mysqldump import cleanly.

Export gives you a mode selector (Structure / Data / Both) and a style selector (Single-statement / phpMyAdmin-compatible). The phpMyAdmin format is byte-for-byte interchangeable with their dumps — useful when migrating between tools.

  • 4-pass phpMyAdmin format — tables → data → indexes → constraints. All tables created before any FK references them.
  • Per-statement results on import — success/error counts, rows affected, execution time per statement.
  • CSV import with delimiter (comma / semicolon / tab / pipe), enclosure, header-row toggle. NULL strings auto-convert.
  • Drag-and-drop for both SQL and CSV with hover preview.
EXPORT STYLE
10

A 12-layer security chain.

Security is built in from the first request, not bolted on. The installer enforces credential setup before anything else loads — there's no default admin/admin to forget about.

  • Bcrypt password hashing ($2y$10$). Per-user TOTP 2FA, RFC 6238 compliant.
  • CSRF tokens generated per session, validated on every POST and AJAX mutation.
  • Brute-force lockout — configurable threshold and duration. Counts password and 2FA failures.
  • IP whitelist with CIDR support, checked before anything else loads.
  • Read-only mode with multi-statement-aware enforcement — USE foo; DROP TABLE bar; is rejected as a write.
  • Hidden databases filtered from the sidebar, autocomplete, URL access, and exports.
  • Query audit log with timestamp, username, database, IP, execution time.
  • .htaccess rules blocking direct access to config.php, includes/, logs/.
2FA enabled · TOTP
RFC 6238 · 6-digit · ±1 window
ACTIVE
BCRYPT
CSRF
LOCKOUT
IP LIST
R/O MODE
AUDIT

Stop reading. Start running.

Three steps. Drop the folder, run the installer, manage your databases.

Install Ledger See themes