If this extension saves you time, you can buy me a coffee ☕ — thank you!

A lightweight database client for VS Code — manage databases, object storage, message queues and SSH servers right from the sidebar, no external tools needed.
| Server type |
What you can do |
| PostgreSQL |
databases → schemas → tables (Columns / Indexes / Triggers / Foreign Keys), query, edit data, users & roles |
| MySQL / MariaDB |
same as above (no schema layer) |
| SQL Server |
same as above, batches run with SET XACT_ABORT |
| MongoDB |
databases → collections (Fields / Indexes), mongosh-style filters, JSON view, edit documents |
| Redis |
db0–15 → keys, key editor (string/hash/list/set/zset), TTL, rename, pattern search |
| S3 (AWS / MinIO / R2 / FPT Cloud) |
buckets → folders → objects, upload/download, image & video preview, presigned URLs |
| RabbitMQ |
queues & exchanges via the Management API (port 15672) |
| SSH / SFTP |
browse server files, edit + Cmd+S saves back (with sudo), upload/download, stream images/videos, open terminal at a folder |
Installation
code --install-extension longnguyen-db-<version>.vsix
Then click the LNSwissTool icon in the activity bar (the vertical bar on the left).
Connecting
- Click + on the sidebar title bar → pick a server type.
- Fill in the details → Test Connection → Save. Passwords are stored only in the OS keychain (VS Code SecretStorage), never in settings.
- Click a connection to connect; expand the arrow to browse the tree.
Notes per type:
- Connection string: for SQL/Mongo/Redis, tick "Use Connection String" and paste a URI (e.g.
mongodb://user:pass@host:27017/mydb) instead of filling individual fields.
- S3: Username = Access Key ID, Password = Secret Access Key. If your key is scoped to a single bucket (no ListAllBuckets permission — e.g. FPT Cloud), put the bucket name in the Bucket field. Set Endpoint for MinIO/R2/FPT.
- RabbitMQ: the port is the Management API port (default 15672), not the AMQP port 5672.
- SSH: log in with a password or a Private Key (path to the key on this machine, e.g.
~/.ssh/id_rsa; the password field then holds the key's passphrase). Start Path = the root folders to browse, comma-separated: ~, /srv/www — leave empty for the home dir.
- DB Filter (SQL/Mongo): only show databases whose names contain the given substrings (comma-separated) — keeps the tree tidy on servers with dozens of databases.
Ordering & grouping connections
- Drag and drop connections in the sidebar to reorder them.
- Tabs/Groups: assign connections to groups (dev/prod…) when creating them or via right-click → Tabs / Groups…. Switch the active group with the layers icon on the title bar. A connection can belong to several groups.
- Right-click a connection: Edit / Close / Copy Connection String (for SSH it copies a ready-to-paste
ssh user@host -p ... command) / Delete (kept at the bottom of the menu so you don't hit it by accident).
Syncing between machines
… menu on the sidebar title → Export Connections…: exports all connections + tabs + ordering to a single JSON file. Enter a passphrase to encrypt the passwords inside the file (AES-256-GCM); on the other machine use Import Connections… and re-enter the passphrase. Connections with the same id are updated, never duplicated.
Data grid (click a table/collection)
- WHERE + ORDER BY inputs on the toolbar (Mongo: FILTER
{status: 'active'} + SORT {createdAt: -1}), with autocomplete for column names + keywords (Tab/Enter to insert). Press Enter or Apply to run.
- Per-column filter: funnel icon on each header. Sort: click a column name (click again to reverse, once more to clear). Every active filter/sort shows as a chip with a ✕ below the toolbar.
- Editing: double-click a cell to edit (type
NULL to set null), edited cells get a yellow outline. + adds a row, checkboxes select rows (header checkbox: check all / shows − when partially selected, click to clear) then 🗑 deletes. Save (shows the pending count) runs in a transaction; Discard reverts. Tables without a primary key are read-only.
- Export the current result (with active filters) to CSV/JSON — capped at 50,000 rows. Import from CSV/JSON (capped at 10,000 rows).
- Mongo: a toggle switches between grid ↔ JSON document view.
- Column resize: drag the right edge of a header. Pagination + page size selector in the footer.
- Mock Data: right-click a table → Mock Data… — pick a generator per column (inferred from the name/type) and insert N random rows for testing.
SQL editor & queries
- New Query (icon on a connection/database) opens a SQL file bound to that connection — run with Cmd+Enter (only the selection runs if you have one), or the ▶ button. The status bar shows which server/db the file is bound to.
- SELECT TOP 100: right-click a table.
- Queries folder in the tree (per connection and per database): store reusable
.sql files — create with the 📄 icon, rename/delete via right-click. Any open SQL file can also be saved there with the Save button on the editor title.
- Query History (clock icon on the title bar): the last 500 statements, stored on this machine (never in the database), re-run or open to edit, with a Clear button.
Redis
- Click a key to open the key editor: edit the value in its native shape (string = raw text; hash/zset = JSON object; list/set = JSON array), Cmd+S to save — the existing TTL is preserved. Rename / Delete / Reload buttons and a TTL row (Apply / Persist).
- On a db node: 🔍 Search Keys by pattern (
user:*), ➕ New Key.
S3
- Browse bucket → folder → object; click an object: text opens in the editor, images/videos/audio open a preview (video streams via a presigned URL — the whole file is never downloaded).
- Right-click a folder: Upload Files (with % progress), New Folder. Right-click an object: Download (with %), Copy Presigned URL (shareable link valid for 1 hour), Delete.
SSH / SFTP
- The tree shows your configured root paths. The 📌 icon on the connection pins a new root (e.g.
/srv/www) without opening the edit form; right-click a root → Unpin This Path to remove it.
- Click a text file → it opens as a real editor tab; Cmd+S writes straight back to the server. Root-owned file (e.g.
/etc/nginx/nginx.conf)? It automatically falls back to sudo: tries sudo -n first, then your SSH password — the file's owner/permissions are preserved, and the status bar shows 🛡 saved with sudo. Delete/rename/mkdir/upload have the same sudo fallback.
- Click an image/video → instant streaming preview (only the parts you watch are fetched, nothing is written to disk — multi-GB videos start playing immediately and seek freely).
- Every folder has 3 inline icons: Upload (multiple files, % progress), New Folder, Terminal — opens a VS Code terminal already SSH'd into that exact folder (
cd included). Files: Download (%), Rename, Delete (with confirm).
Security (users & roles)
The Security section in the tree for Postgres/MySQL/MSSQL/Mongo: list users + roles, create/drop users, change passwords, grant/revoke roles, click a user for its detailed privileges.
Shortcuts & tips
| Action |
Keys |
| Run query (bound SQL file) |
Cmd+Enter / Ctrl+Enter |
| Save remote SSH file / Redis value |
Cmd+S |
| Autocomplete in WHERE/ORDER BY |
type a few chars → Tab/Enter to insert |
- Hover any toolbar icon for a tooltip naming its function.
- The grid's reload button spins while data is loading.
| |