Datapilot
A VS Code extension for managing PostgreSQL databases directly from your editor.
Features
- 🗄️ Database Explorer - Browse and manage PostgreSQL connections and databases
- 🔗 Connection Management - Easily connect, disconnect, and manage multiple database connections
- 📊 Database Diagrams - Visualize database schemas with interactive entity relationship diagrams
- 📝 Schema Management - View and manage schemas within your databases
- 🛠️ Database Operations - Create schemas, view properties, and manage database structure
Installation
- Open VS Code
- Go to the Extensions marketplace (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Datapilot"
- Click Install
Getting Started
Connecting to a PostgreSQL Database
- Open the Datapilot sidebar by clicking the Datapilot icon in the activity bar
- Click on the Connections view
- Add a new database connection by configuring your PostgreSQL connection details
Viewing Database Structure
- Expand a database in the Connections view to see its schemas
- Expand a schema to view its tables, functions, and users
- Right-click on items to access context menu options
Viewing Database Diagrams
- Right-click on a schema in the Connections view
- Select View Diagram
- The diagram panel will display an interactive visualization of the schema
Available Commands
- Refresh Database - Refresh database information
- Disconnect - Disconnect from a database
- Create New Schema - Create a new schema in the database
- Properties - View database properties
- Drop Database - Remove a database
- View Diagram - Display an entity relationship diagram for a schema
Requirements
- VS Code 1.107.0 or higher
- PostgreSQL database (local or remote)
Dependencies
pg - PostgreSQL client for Node.js
Development
Prerequisites
- Node.js and pnpm
- VS Code Extension development environment
Setup
# Install dependencies
pnpm install
# Watch for changes and rebuild
pnpm run watch
# Run tests
pnpm run test
Building
# Compile the extension
pnpm run compile
# Package for distribution
pnpm run package
# Publish to VS Code marketplace
pnpm run publish
Extension Structure
src/
├── extension.ts # Main extension entry point
├── commands/ # Command implementations
├── config/ # Configuration files
├── db/pg/ # PostgreSQL client implementation
├── tree/ # Tree view provider and nodes
├── types/ # TypeScript type definitions
├── ui/ # UI components
└── webview/ # Database diagram webview
License
MIT
Author
wilmervasquez
For more information and updates, visit the VS Code Marketplace.
| |