Install on Linux / macOS
curl -fsSL https://raw.githubusercontent.com/shreyam1008/dbterm/main/install.sh | bashPractical reference for daily usage
This page documents the real app workflow from connection setup to production-safe operations. Keep it open while onboarding new users.
Install, connect, run SQL, then iterate in panel-focused flow.
curl -fsSL https://raw.githubusercontent.com/shreyam1008/dbterm/main/install.sh | bashpowershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://raw.githubusercontent.com/shreyam1008/dbterm/main/install.ps1 | iex"Use the shell installer for Linux/macOS or PowerShell installer for Windows.
Press N and enter the MySQL/PostgreSQL server login. The database is optional: Save & Connect opens every accessible database when no default is set.
Focus Query panel (Alt+Q), type SQL, and press Enter to run.
Use Alt+T and Alt+R to move between tables and results while refining SQL.
dbterm is optimized around panel focus and keyboard flow.
Scroll horizontally to inspect every column.
| Panel | Primary behavior | Core keys |
|---|---|---|
| Dashboard | Manage saved server logins, browse every accessible database, enter Backup Center, and reconnect quickly. | N, E, D, Enter, A, B, R |
| Query | Write SQL and execute it directly against the current database session. | Alt+Q, Enter, Shift+Enter |
| Tables | Browse grouped schema objects, type to jump, pin frequent tables, and load data into Results. | Alt+T, type, Space, F5, Ctrl+F5 |
| Results | Filter typed values, follow foreign keys, page and sort data, inspect full cells, and export selected/current/all-matching CSV. | Alt+R, /, V, F, S, PgUp/PgDn, Alt+E, Enter, +/− |
Use these to avoid context switching and keep query loops fast.
Scroll horizontally to inspect every shortcut and action.
| Shortcut | Action |
|---|---|
Ctrl + P | Fuzzy-search commands, database objects, and recent SQL (default binding) |
Alt + Q / T / R | Focus Query, Tables, or Results panel |
Space (Tables) | Pin or unpin the highlighted table at the top for this database connection |
Enter | Execute query (in Query panel) |
Shift + Enter | New line in query (multiline SQL) |
Alt + Y | Open per-connection query history |
Alt + A / Alt + C | Select all result rows / clear selection |
Space (Results) | Toggle current row selection |
C (Results) | Copy the selected cell's complete value |
/ / V (Results) | Build typed AND filters / filter the selected column by clipboard value |
F / Backspace (Results) | Follow a declared foreign key / return to the previous table |
Alt + E | Export selected rows, the current page, or all rows matching active table filters |
Alt + I | Open SQL import modal for active connection (PostgreSQL/MySQL) |
I (Dashboard) | Import SQL dump into selected saved PostgreSQL/MySQL connection |
A (Dashboard) | Browse every database visible through the highlighted PostgreSQL/MySQL server login |
G (Dashboard) / Alt + , | Open keymap settings page |
Alt + H | Toggle help + SQL cheatsheets |
Alt + D | Back to dashboard |
Alt + S | Open services dashboard |
Alt + K / B (Dashboard) | Open Backup Center for schedules, history, inspection, restore, and agent status |
Ctrl + B (Dashboard) | Create a backup policy from the highlighted saved connection |
F5 / Ctrl + F5 | Refresh current table / refresh list + table |
PgUp / PgDn, Home / End | Navigate previous/next and first/last result pages |
Alt + F | Toggle fullscreen results |
Alt + B | Instant backup from any workspace panel; F2 chooses a folder and F3 refreshes disk capacity |
N (Backup Center) | Choose an existing saved database or add one for a new plan |
Ctrl + N (plan form) | Add another saved database without leaving the backup workflow |
Alt + = / - / 0 | Adjust preview row limit |
Ctrl + = / - | Resize all columns (remembered per table) |
Ctrl + 0 | Reset this table's column widths |
+ / - | Resize selected column (remembered per table) |
Ctrl + C | Cancel an active query/import/export; otherwise quit |
Use Esc and Backspace to back out safely from most views if you lose focus.
One backup engine serves the TUI, CLI, and background agent. See the focused Backup Center guide for the complete operator model.
Press Alt+S from anywhere to view MySQL/PostgreSQL status and quick actions.
Inside services, use key 1 for MySQL and key 2 for PostgreSQL start/stop.
Use C or Enter, select a saved database login or enter credentials, and leave Database blank to browse every accessible database.
Press Alt+B from Tables, Query, or Results for a one-off engine-appropriate backup. Type a destination or press F2; F3 refreshes destination and staging capacity.
Highlight a saved connection and press Ctrl+B, or open Backup Center and press N to choose a saved database or add one. Essentials stay first; advanced controls expand only when needed.
Desktop mode needs no administrator access. Server mode registers at machine boot, uses explicit data paths, and clearly shows the elevated command required.
See the destination volume and free space before saving, then follow phase, bytes, elapsed time, rate, and ETA without a fabricated database-row percentage.
Combine count, age, and total-size retention; prune oldest eligible artifacts now; and notify by Gmail defaults or custom SMTP on failure, success, both, or never.
Press I. dbterm unwraps gzip, zstd, ZIP, or age and detects the database format from content before a destination can be selected.
dbterm backup keygen
dbterm backup service install
dbterm backup service status --all
dbterm backup logs --lines 200
dbterm backup inspect --identity ./age-identity.txt ./prod.dump.zst.age
dbterm backup restore --connection production --identity ./age-identity.txt --yes ./prod.dump.zst.ageScheduled destinations can be absolute local/mounted folders or rclone://remote/path locations. Configure rclone under the backup agent’s OS account. PostgreSQL/MySQL require their official clients; SQLite SQL restore requires sqlite3. Restore supports PostgreSQL, MySQL/MariaDB, and local SQLite. Merge is the restore default; clean restore is explicit and destructive.
Retention can combine newest-count, maximum-age, and total-size ceilings. Backup Center previews capacity and can apply the policy immediately; cleanup is restricted to verified artifacts recorded for that exact job, and always preserves its newest successful backup.
Per-job email can report failures, successes, both, or neither. Gmail defaults to STARTTLS on port 587; custom SMTP and implicit TLS are available. Test delivery before relying on it, and protect the locally stored app password.
Desktop scope is the no-admin default. Server scope runs at machine boot without an interactive login and requires elevation plus explicit existing config, state, and log paths. Runtime start/stop and startup enable/disable are deliberately separate controls.
XDG_CONFIG_HOME/dbtermXDG_STATE_HOME/dbterm
~/Library/Application Support/dbterm~/Library/Logs/dbterm
%AppData%\dbterm%LocalAppData%\dbterm
Run dbterm backup paths for exact resolved paths. Raw dumps are wrapped in private state staging before the finished artifact is published to your destination, so private state needs room for one uncompressed dump. The live view shows real phase, byte growth, elapsed time, rate, and ETA where a meaningful total exists. Uninstalling only the agent never removes completed artifacts.
Restore only trusted files: dbterm rechecks content, checksum, engine, and client-side commands, but valid SQL can still perform any server-side action allowed to the selected database account. Turso exports use one source transaction and reject virtual/FTS schemas; D1 uses Cloudflare's native export API, which can briefly make that database unavailable.
Inspection unwraps at most three layers. Every decoded gzip, zstd, ZIP, or age layer has a 1 GiB default cap and uses private OS temporary storage; raise it with the TUI’s Max Decoded GiB field or --max-decoded-gib N, with enough temporary disk space available.
backup keygen defaults the private identity into dbterm config. For recovery safety, --uninstall --purge refuses to remove a private age identity or backup-like file it discovers there; move the key somewhere safe or delete it explicitly before retrying.
Use CLI mode for updates, diagnostics, and uninstall operations.
dbterm
dbterm --help
dbterm --version
dbterm --info
dbterm --update
dbterm --update X.Y.Z
dbterm --uninstall
dbterm --uninstall --purge
dbterm --uninstall --yes
dbterm backup --help
dbterm backup list
dbterm backup run <job>
dbterm backup inspect <file>
dbterm backup restore --connection <target> --yes <file>
dbterm backup service install
dbterm backup service status --all
dbterm backup service enable
dbterm backup prune --yes <job>
dbterm backup notify-test <job>
dbterm backup logs --lines 200
dbterm backup keygen
dbterm backup pathsScroll horizontally to inspect every command and purpose.
| Command | Purpose |
|---|---|
dbterm | Launch interactive TUI |
dbterm --help | Show command help |
dbterm --version | Show version + build details |
dbterm --info | Show install path, config path, and runtime info |
dbterm --update | Update to latest release |
dbterm --update X.Y.Z | Update to a specific release |
dbterm --uninstall | Uninstall binary with confirmation |
dbterm --uninstall --purge | Remove binary + dbterm-owned config/state/logs; chosen backup artifacts stay |
dbterm --uninstall --yes | Uninstall without prompt |
dbterm backup --help | Show backup and agent commands |
dbterm backup list | List durable jobs and next runs |
dbterm backup run <job> | Run a job immediately |
dbterm backup inspect <file> | Detect wrappers, engine, checksum, and warnings |
dbterm backup restore --connection <target> --yes <file> | Run the guarded, content-inspected restore flow |
dbterm backup service install | Install and start the native current-user agent |
dbterm backup service status --all | Inspect desktop and server registrations, startup, runtime, and heartbeat |
dbterm backup service enable | Enable automatic startup independently of starting the agent now |
dbterm backup prune --yes <job> | Apply the job's retention ceilings immediately |
dbterm backup notify-test <job> | Send a test message using the job's SMTP settings |
dbterm backup logs --lines 200 | Read the bounded agent log tail locally or over SSH |
dbterm backup keygen | Generate an age X25519 identity and public recipient |
dbterm backup paths | Print OS-native config, state, log, and catalog paths |