VSDB - VSCode Database Client

A full-featured database client extension for Visual Studio Code. Connect to MySQL and PostgreSQL databases, browse schema, edit data, and execute SQL queries - all within VSCode.
Features
🔌 Connection Management
- Auto-scan project - Automatically discover database connections from:
.env files (DATABASE_URL, DB_HOST, etc.)
docker-compose.yml (MySQL/PostgreSQL services)
- Framework configs (TypeORM, Laravel, Django, Prisma)
- Project-level & Global connections - Share connections across projects or keep them private
- Encrypted password storage - Secure credentials via VSCode SecretStorage API
🗄️ Database Explorer
- Browse databases, tables, columns, views, procedures
- View table structure with indexes, constraints, triggers
- Column details: type, nullable, primary key, auto-increment
📝 SQL Editor
- Syntax highlighting with Monaco Editor
- Query history with pin support
- Result grid with pagination (large datasets use streaming)
- Inline data editing
📊 Data Operations
- Export to CSV, JSON, SQL
- Import from CSV, JSON
- Search tables, columns, and data
🔄 Smart Behaviors
- Auto-connect on expand - Click or expand a disconnected connection node to connect
- Connection recovery - Auto-restart after worker crash
Installation
From VSCode Marketplace
- Open VSCode
- Press
Ctrl+Shift+X (Extensions)
- Search for "VSDB" or "bigfish.vsdb"
- Click Install
From Source
git clone https://github.com/bigfish/vsdb.git
cd vsdb
npm install --legacy-peer-deps
npm run compile
cd webview-ui && npm install && npm run build
Then in VSCode: Press F5 to run in development mode.
Usage
Quick Start
- Open VSDB sidebar (database icon in Activity Bar)
- Click Add Connection or Scan Project
- Expand connection node to connect
- Browse tables and run queries
Commands
| Command |
Description |
VSDB: Add Connection |
Add a new database connection |
VSDB: Scan Project |
Auto-discover connections from project files |
VSDB: New Query |
Open SQL Editor |
VSDB: Connect |
Connect to selected database |
VSDB: Disconnect |
Disconnect from database |
Keyboard Shortcuts
- Right-click on tree items for context menu actions
Supported Databases
| Database |
Status |
| MySQL |
✅ Full support |
| PostgreSQL |
✅ Full support |
| Redis |
🔜 Planned |
| SQLite |
🔜 Planned |
| MongoDB |
🔜 Planned |
Architecture
VSDB uses a dual-process architecture for stability:
┌─────────────────────────────────────┐
│ VSCode Extension Host │
│ - UI (TreeView, Webview) │
│ - Connection Management │
│ - IPC Messaging │
└─────────────────┬───────────────────┘
│ IPC (child_process)
┌─────────────────┴───────────────────┐
│ Worker Process │
│ - Database Drivers │
│ - Query Execution │
│ - Schema Inspection │
└─────────────────────────────────────┘
Benefits:
- Database operations isolated from VSCode
- Auto-recovery from crashes
- Non-blocking UI during heavy queries
Configuration
Connection files are stored in:
- Project-level:
.vsdb/connections.json
- Global:
~/.vsdb/connections.json
Passwords are encrypted in VSCode SecretStorage.
Development
# Watch mode for extension
npm run watch
# Build webview UI
cd webview-ui && npm run build
# Run tests
npm run test
# Package extension
vsce package
Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
License
MIT License
Issues & Feedback
Report bugs or request features at GitHub Issues.
Enjoy managing your databases in VSCode! 🎉