Terminal

A scoped database shell embedded in the editor — for the moments SQL alone won't do.

Last updated

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

CommandNotes
\d, \dt, \dv, \dfList relations, tables, views, functions (Postgres-style; works on all dialects).
\d <name>Describe a table, view, or function.
\lList databases.
\use <db>Switch active database (within the same connection).
\timing on/offToggle query timing display.
\qClose terminal.
\editOpen 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 SQLExecuted 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 users instead 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.