PgStudio (formerly YAPE) is a comprehensive PostgreSQL database management extension featuring interactive SQL notebooks, real-time monitoring dashboard, AI-powered assistance, and advanced database operationsβall within VS Code.
π Documentation β’ π Marketplace β’ π€ Contributing
- π Secure Connections β VS Code SecretStorage encryption
- π Live Dashboard β Real-time metrics & query monitoring
- π SQL Notebooks β Interactive notebooks with AI assistance
- π³ Database Explorer β Browse tables, views, functions, types, FDWs
- π οΈ Object Operations β CRUD, scripts, VACUUM, ANALYZE, REINDEX
- π Foreign Data Wrappers β Manage foreign servers, user mappings & tables
- π€ AI-Powered β GitHub Copilot, OpenAI, Anthropic, Gemini
- π€ Export Data β Export results to CSV, JSON, or Excel
|
|
# Install from VS Code
ext install ric-v.postgres-explorer
# Or via command line
code --install-extension ric-v.postgres-explorerThen: PostgreSQL icon β Add Connection β Enter details β Connect!
yape/
βββ src/
β βββ extension.ts # Extension entry point
β βββ commands/ # Command implementations
β β βββ tables.ts # Table operations
β β βββ views.ts # View operations
β β βββ functions.ts # Function operations
β β βββ connection.ts # Connection commands
β β βββ notebook.ts # Notebook commands
β β βββ helper.ts # Shared helper utilities
β β βββ sql/ # SQL template modules
β β β βββ tables.ts # Table SQL templates
β β β βββ views.ts # View SQL templates
β β β βββ functions.ts # Function SQL templates
β β β βββ indexes.ts # Index SQL templates
β β β βββ ... # Other SQL templates
β β βββ ...
β βββ providers/ # VS Code providers
β β βββ DatabaseTreeProvider.ts # Tree view provider
β β βββ NotebookKernel.ts # Notebook kernel
β β βββ ChatViewProvider.ts # AI chat provider
β β βββ SqlCompletionProvider.ts # IntelliSense
β β βββ ...
β βββ services/ # Business logic
β β βββ ConnectionManager.ts # Connection handling
β β βββ SecretStorageService.ts # Credential storage
β βββ dashboard/ # Dashboard webview
β βββ common/ # Shared utilities
β βββ test/ # Unit tests
βββ resources/ # Icons & screenshots
βββ docs/ # Documentation & landing page
βββ dist/ # Compiled output (bundled)
βββ out/ # Compiled output (tsc)
βββ package.json # Extension manifest
βββ tsconfig.json # TypeScript config
βββ webpack.config.js # Webpack config
PgStudio integrates advanced AI capabilities directly into your workflow, but keeps YOU in control.
Describe what you need in plain English, and PgStudio will generate the SQL for you.
- Context-Aware: The AI understands your table schemas and columns.
- Smart Suggestions: Ask for "top selling products" and it knows to join
ordersandproducts.
We believe AI should assist, not take over. No query is ever executed automatically.
- Ask: You ask a question in the side panel.
- Review: The AI generates SQL code.
- Insert: You click "Open in Notebook" to place the code into a cell.
- Execute: You review the code and click "Run" when you are ready.
Turn any query result into beautiful, interactive charts in seconds.
- One-Click Charting: Instantly visualize your data directly from the notebook results.
- Customizable: Toggle between Bar, Line, Pie, Doughnut, and Scatter charts.
- Rich Data Display:
- Log Scale: Easily analyze data with wide variances.
- Blur/Glow Effects: Modern, high-fidelity chart aesthetics.
- Zoom & Pan: Inspect detailed data points interactively.
- Node.js β₯ 18.0.0
- VS Code β₯ 1.90.0
- PostgreSQL (for testing)
# Clone the repository
git clone https://github.com/dev-asterix/yape.git
cd yape
# Install dependencies
npm install
# Compile TypeScript
npm run compile| Command | Description |
|---|---|
npm run watch |
Watch mode (auto-recompile) |
npm run compile |
One-time TypeScript compilation |
npm run esbuild |
Bundle with esbuild (with sourcemaps) |
npm run esbuild-watch |
Bundle in watch mode |
npm run test |
Run unit tests |
npm run coverage |
Run tests with coverage |
npm run vscode:prepublish |
Build for production |
- Open the project in VS Code
- Press
F5to launch Extension Development Host - Or use Run and Debug (
Ctrl+Shift+D) β "Run Extension"
- Output Panel:
Ctrl+Shift+Uβ Select "PostgreSQL Explorer" - DevTools:
Ctrl+Shift+Iin Extension Development Host - Webview Debug: Right-click in webview β "Inspect"
# Run all tests
npm run test
# Run with coverage
npm run coverageTests are located in src/test/unit/ using Mocha + Chai + Sinon.
- π Report Bugs
- π‘ Request Features
- π§ Fork β Branch β PR
We follow Conventional Commits:
feat: add new feature
fix: resolve bug
docs: update documentation
refactor: code restructuring
test: add/update tests
chore: maintenance tasks
# Build VSIX package
npx vsce package
# Publish to VS Code Marketplace
npx vsce publish
# Publish to Open VSX
npx ovsx publish


