ternv4.2.0
 ████████╗███████╗██████╗ ███╗   ██╗
 ╚══██╔══╝██╔════╝██╔══██╗████╗  ██║
    ██║   █████╗  ██████╔╝██╔██╗ ██║
    ██║   ██╔══╝  ██╔══██╗██║╚██╗██║
    ██║   ███████╗██║  ██║██║ ╚████║
    ╚═╝   ╚══════╝╚═╝  ╚═╝╚═╝  ╚═══╝

The database shell that remembers

tern is a SQL client for your terminal with fuzzy history, schema-aware autocomplete and query plans you can actually read. One binary, zero config, works with Postgres, MySQL and SQLite.

try it

A live session against a demo database. Type help or click a command.

tern@demo:shopconn 4ms
examples:

features

Things you stop noticing after a week, then can't live without.

> fuzzy history

Ctrl-R searches every query you ever ran, across machines, ranked by how often it worked.

> schema autocomplete

Tables, columns and foreign keys completed as you type, including joins it can infer.

> readable plans

EXPLAIN turned into a tree with costs, hot spots and a one-line suggestion.

> safe mode

UPDATE without WHERE asks twice. DROP in production asks you to type the table name.

> pipes

Send any result to jq, csv or your clipboard with a single pipe character.

> 4 MB binary

Static, no runtime, starts in 11 ms. Runs on Linux, macOS, Windows and your Raspberry Pi.

bench

Cold start to first result, 10k runs, M3 laptop, lower is better.

pricing

Free for you. Paid when your team wants shared history.


  
ternPreview · Nuancier Pro template Buy · €4.99