Terminal
A scoped database shell embedded in the editor — for the moments SQL alone won't do.
The terminal is a database-aware shell that runs inside Cocobox. It exposes a small set of safe, useful commands without giving you arbitrary OS access — the bastion stays hardened.
Open
Cmd/Ctrl + ` (backtick) toggles the terminal. The connection at the top of the editor is the active terminal connection.
Commands
| Command | Notes |
|---|---|
\d, \dt, \dv, \df | List relations, tables, views, functions (Postgres-style; works on all dialects). |
\d <name> | Describe a table, view, or function. |
\l | List databases. |
\use <db> | Switch active database (within the same connection). |
\timing on/off | Toggle query timing display. |
\q | Close terminal. |
\edit | Open the last statement in the editor. |
\export <format> <file> | Export the last result (csv, json, ndjson). |
explain <stmt> | Run EXPLAIN (or dialect equivalent) and pretty-print. |
| any SQL | Executed against the current connection at your role’s permissions. |
There’s no ! or shell-out. The terminal is sandboxed.
Multi-line input
End a line with \ to continue. End with ; to execute. Up/down arrow walks history.
Streaming output
Long-running queries stream rows as they arrive (where the dialect supports it). Hit Ctrl+C to cancel — the underlying query is killed server-side.
History
Per-user, per-connection. Persisted across sessions. Searchable with Ctrl+R (reverse-i-search).
Why use it over the editor?
- Quick
\d usersinstead of clicking through the schema browser. - One-shot scripts: paste 20 short statements and run them sequentially.
- Faster than mouse navigation for power users.
For anything you’ll re-run, save it as a snippet instead.