π NexQL
July 9, 2026 Β· View on GitHub
π NexQL
Professional Database Management for VS Code
NexQL (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 β’ π v2.2.0 Release Notes β’ π Full Changelog
πΊ Video Guides
1. Setup

2. More Settings

3. AI Assistant

4. AI Copilot

5. Dashboard

6. DB Operations

7. Power Editor

8. More Features

β¨ Key Features
- π Secure Connections β VS Code SecretStorage encryption
- π‘οΈ Connection Safety β Environment tagging (π΄ PROD, π‘ STAGING, π’ DEV), read-only mode, query safety analyzer
- β±οΈ Performance Tracking β Historical query execution monitoring with degradation alerts
- π Live Dashboard β Real-time metrics & query monitoring
- π¦ Dashboard Health Signals β Status badges, lock/wait indicators, and performance-focused telemetry cards
- π SQL Notebooks β Interactive notebooks with AI assistance
- ποΈ Notebook Manager β Open/create notebooks with searchable picker and improved metadata context
- πΎ Saved Queries β Tag-based organization, connection context restoration, AI metadata generation, edit & reuse
- π³ Database Explorer β Browse tables, views, functions, types, FDWs
- π οΈ Object Operations β CRUD, scripts, VACUUM, ANALYZE, REINDEX, plus triggers/sequences/domains/rules/partitions/publications/event triggers/tablespaces/aggregates
- ποΈ Visual Table Designer β Create/Edit tables with a robust GUI
- π§ Definition Viewer (SQL Preview) β Open object DDL with toggleable SQL preview, copy/edit workflows, and routine scaffolding
- π Index & Constraint Manager β Visual management of DB constraints
- π§ Schema Intelligence β Schema search, index advisor, and migration generator workflows
- π Smart Paste β Context-aware clipboard actions (SQL/CSV/JSON)
- π Table Intelligence β Profile, activity monitor, index usage, definition viewer
- π EXPLAIN CodeLens β One-click query analysis directly in notebooks
- ποΈ Advanced Result UX β Column stats, transpose view, enhanced filtering, sliding-window streaming for large
SELECTs, configurablebyteadisplay, and structured in-grid editing with explicit commit confirmation - π‘οΈ Auto-LIMIT β Intelligent query protection (configurable, default 1000 rows)
- π Foreign Data Wrappers β Manage foreign servers, user mappings & tables
- π€ AI-Powered β Zero-configuration NexQL Free AI (Smart/Engineer/Architect tiers), plus GitHub Models, OpenAI, Anthropic, Gemini, and VS Code LM. Generate, optimize, explain & analyze with guided follow-ups.
- π§© Flexible SQL Assistant Layout β Open SQL Assistant in editor tabs and keep multiple assistant tabs open simultaneously
- πΌοΈ Vision AI β Paste or upload images directly in the SQL Assistant; sent to vision-capable AI providers
- π File Preview β Click attached file chips to open them as preview tabs in the editor
- π€ Export Data β Export results to CSV, JSON, or Excel
π― Why NexQL?
π¨ Modern Interface
|
β‘ Powerful Features
|
π‘οΈ Production-Ready Safety
|
π Performance Insights
|
π Feature Matrix
| Area | NexQL v2.2.0+ | Notes |
|---|---|---|
| Core PostgreSQL object operations | β | Tables, views, mat views, functions, roles, extensions, FDWs, and more |
| AI-assisted SQL workflows | β | Generate, optimize, explain, and analyze with notebook-first execution |
| Production safety controls | β | Read-only mode, risk scoring, confirmation prompts, Auto-LIMIT |
| Real-time monitoring dashboard | β | Activity and health views in VS Code |
| Interactive SQL notebooks | β | Native .pgsql notebook execution with completions |
| In-grid result editing parity with desktop IDEs | β οΈ Partial | Stronger commit flow and tooling in v1.2.x; full parity still evolving |
| ERD/schema visualization parity | β οΈ Partial | Schema designer exists; ERD depth still evolving |
| Advanced replication administration | β οΈ Partial | Additional publication/subscription depth planned |
π Platform Compatibility
NexQL works with any database that speaks the PostgreSQL wire protocol β not just self-hosted Postgres.
| Platform | Status | Tip |
|---|---|---|
| PostgreSQL 12β17 | β Fully supported | Integration-tested every release |
| Neon | β Works | Use the direct (non--pooler) endpoint, SSL require |
| Supabase | β Works | Use direct or session pooler (port 5432); avoid transaction pooler (6543) |
| TimescaleDB / Timescale Cloud | β Fully compatible | It's a Postgres extension β everything works |
| YugabyteDB (YSQL) | β Mostly works | Port 5433; version-gated features fall back automatically |
| AWS RDS / Aurora, Cloud SQL / AlloyDB, Azure Flexible | β Works | Set SSL Mode require |
π Full matrix, connection guides, and caveats: docs/COMPATIBILITY.md. First-class platform support (auto-detection, capability-aware menus, connection-string paste) is planned β see the roadmap.
π Quick Start
# Install from VS Code
ext install ric-v.postgres-explorer
# Or via command line
code --install-extension ric-v.postgres-explorer
Then: PostgreSQL icon β Add Connection β Enter details β Connect!
Telemetry Setup
NexQL ships with a privacy-first telemetry client designed for anonymous product analytics.
- No SQL text, schema/object names, hostnames, database names, usernames, or credentials are collected.
- VS Code global telemetry setting is a hard gate; when disabled globally, NexQL telemetry is disabled.
- Event payloads are allowlisted and bucketed (durations/result sizes) to avoid raw sensitive values.
Configure telemetry mode
Set these in VS Code settings:
postgresExplorer.telemetry.mode:off | basic | detailed(defaultbasic)postgresExplorer.telemetry.allowUsage: allow anonymous usage counters (defaulttrue)postgresExplorer.telemetry.allowPerformance: allow anonymized performance buckets (defaultfalse)
Configure PostHog sink (optional)
For remote telemetry ingestion:
postgresExplorer.telemetry.posthogHost: defaulthttps://us.i.posthog.compostgresExplorer.telemetry.posthogApiKey: your PostHog project key
If posthogApiKey is empty, telemetry stays local (debug sink only).
What to expect from telemetry
- Lifecycle: extension/session start and end events
- Activity: command and feature usage counters
- Connections: opened/closed/error with coarse error category
- Query execution: success/failure with duration/result-size buckets (detailed/performance-enabled mode)
- AI usage: provider-level success/failure counters
π Documentation Map
README.md- Product overview, installation, development, and troubleshootingdocs/COMPATIBILITY.md- Platform compatibility matrix (Neon, Supabase, TimescaleDB, YugabyteDB, RDS, β¦)docs/ARCHITECTURE.md- System architecture and component/data-flow detailsdocs/STYLING_GUIDE.md- Centralized styling/templates and UI refactoring patternsdocs/WEBSITE_CONTEXT.md- Website architecture and content contextdocs/API_STABILITY.md- v1.x API stability and deprecation policydocs/SECURITY_REVIEW.md- v1.0 security controls and release checklistdocs/RELEASE_NOTES_v2.0.0.md- v2.0 highlights and release notes (rebranding, licensing & subscription)docs/RELEASE_NOTES_v1.0.0.md- v1.0 highlights and release notesdocs/MIGRATION_GUIDE_0.x_to_1.0.0.md- upgrade path from 0.9.x to 1.0.0SECURITY.md- Security policy and vulnerability reporting guidanceCHANGELOG.md- Release notes and what changed across versions
Stable: v2.2.0 | Nightly: v2.2.0+ β NexQL Free AI is now Generally Available as the default zero-configuration AI assistant. See CHANGELOG.md; v2.0 launch materials remain in Release Notes and older v1.0 details in v1.0.0 Release Notes.
ποΈ Project Structure
NexQL/
βββ 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
πΎ Saved Queries Library
Organize, manage, and reuse your most important queries with intelligent tagging and context preservation.
Features
- π·οΈ Tag-Based Organization β Group queries by topic (e.g., "analytics", "maintenance", "daily-reports")
- π Connection Context β Queries remember their original connection, database, and schema
- π Quick Reopening β Click "Open in Notebook" to restore the query with full context in a new notebook
- βοΈ Edit Anytime β Modify title, description, tags, and SQL without creating duplicates
- π€ AI Metadata β Auto-generate titles, descriptions, and tags using AI
- π Rich Metadata Display β Hover to see creation date, last used, database, and schema
Usage
- Save Query: Click "Save Query" CodeLens button on any SQL cell in a notebook
- Add Metadata: Enter title, description, and tags (AI can help auto-generate)
- Organize: Use tags to group related queries
- Reuse: Click a saved query β "Open in Notebook" to restore with original context
- Edit: Right-click any saved query β "Edit Query" to modify it
π€ AI-Powered Operations
NexQL integrates advanced AI capabilities directly into your workflow, but keeps YOU in control.
π NexQL Free AI β Zero-Config (Default)
No API keys, no provider accounts, no setup. NexQL Free AI is the default AI provider, powered by managed models behind a secure gateway proxy. Three tiered models available:
- π§ Smart (free) β Daily-use AI for queries, explanations, and schema help. ~600K tokens/month.
- π§ Engineer (Sponsor Β· $2/month) β Advanced model for tough optimization and migration problems. ~3M tokens/month (~5Γ free).
- ποΈ Architect (Singularity Β· $9/month) β The best AI for database engineering. ~10M tokens/month (~16Γ free).
Configure your AI provider: Open VS Code Settings β search postgresExplorer.ai.chat.provider or run NexQL: Open AI Settings from the Command Palette. AI Settings documentation β
π Bring Your Own Provider
Prefer your own keys? NexQL supports GitHub Models, OpenAI, Anthropic, Gemini, VS Code LM, Ollama, LM Studio, and custom endpoints. See AI Settings for per-provider configuration.
π GitHub Models via GitHub Sign-In
Use GitHub Models without manually managing a PAT in normal VS Code authentication flows.
- Native Sign-In: Connect with your GitHub account from AI Settings.
- Model Catalog Access: List and select available GitHub-hosted models.
- Session-Based Auth: Uses VS Code GitHub authentication sessions instead of storing provider tokens.
π§© SQL Assistant Tabs
Use SQL Assistant where you work, not only in the sidebar.
- Open in Editor Tab: Run
SQL Assistant: Open in Editor Tabfrom Command Palette. - Parallel Assistants: Open multiple SQL Assistant tabs for separate tasks (e.g., optimization, migration, and schema exploration).
πͺ Generate Query (Natural Language β SQL)
Describe what you need in plain English (e.g., "Show me top 10 users by order count"), and NexQL will generate the SQL for you using your schema context.
- Command Palette:
AI: Generate Query - Context-Aware: The AI understands your table schemas, columns, and relationships.
β‘ Performance Optimization
Click the Optimize button on any successful query result.
- Explain Scripts: Generates
EXPLAIN ANALYZEcommands for deeper profiling. - Static Analysis: Suggests missing indexes, query rewrites, or schema improvements.
π Data Analysis
Click the Analyze Data button in result tables.
- Clean Workflow: Automatically exports data to a temporary CSV and attaches it to the chat.
- Actionable Insights: AI summarizes patterns, trends, and outliers in your result sets.
β¨ Error Handling (Explain & Fix)
When a query fails, get instant help directly in the error cell.
- Explain Error: Translates cryptic Postgres errors into plain English.
- Fix Query: Suggests corrected SQL to resolve the error.
π MCP Server β New in v2.2.0
NexQL ships a built-in Model Context Protocol (MCP) server that exposes your connected PostgreSQL database as live-indexed tools, consumable by Copilot, Cursor, Claude Desktop, and any other MCP-compatible AI agent.
- Auto-Discovery β Registers with VS Code's MCP registry automatically; no manual URL or config needed.
- Read-Only DB Tools β Schema discovery, safe SQL execution, EXPLAIN, join-path traversal, and performance analytics.
- Schema Grounding β Agents are instructed to verify live schema before writing SQL, preventing hallucinated table names.
- Session Security β Per-session bearer token, idle TTL sweep, and 200 req/min rate limit.
- Configure via NexQL Settings β Preferences β enable/disable, view port/token, toggle auto-start.
π‘οΈ Safe Execution Model (Notebook-First)
We believe AI should assist, not take over. No query is ever executed automatically.
- Ask/Trigger: You use one of the AI features.
- Review: The AI generates SQL or suggestions in the chat.
- Insert: You click "Open in Notebook" to place code into a cell.
- Execute: You review the code and click "Run" when you are ready.
π Advanced Visualizations
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.
π οΈ Local Development
Prerequisites
- Node.js β₯ 18.0.0
- VS Code β₯ 1.90.0
- PostgreSQL (for testing)
Setup
# Clone the repository
git clone https://github.com/dev-asterix/NexQL.git
cd NexQL
# Install dependencies
npm install
# Compile TypeScript
npm run compile
Development Commands
| 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 |
Running the Extension
- Open the project in VS Code
- Press
F5to launch Extension Development Host - Or use Run and Debug (
Ctrl+Shift+D) β "Run Extension"
Debugging Tips
- Output Panel:
Ctrl+Shift+Uβ Select "NexQL" - DevTools:
Ctrl+Shift+Iin Extension Development Host - Webview Debug: Right-click in webview β "Inspect"
π§ͺ Testing
Quick Start
# Install dependencies
npm ci
# Run all tests
npm run test:all
# Run tests with coverage
npm run coverage
# Run specific test types
npm run test:unit # Unit tests
npm run test:integration # Integration tests with Docker
npm run test:renderer # Renderer component tests
Docker-Based Integration Tests
# Start PostgreSQL containers (12-17)
make docker-up
# Run integration tests
npm run test:integration
# Stop containers
make docker-down
Using Make
make test-unit # Unit tests
make test-integration # Integration tests
make test-renderer # Renderer component tests
make test-all # All tests
make coverage # Coverage report
make test-full # Full suite with Docker
Using Test Scripts
Linux/macOS:
./scripts/test.sh --unit
./scripts/test.sh --integration --pg 16
./scripts/test.sh --coverage
Windows:
scripts\test.bat --unit
scripts\test.bat --integration --pg 16
scripts\test.bat --coverage
Testing Infrastructure
NexQL includes comprehensive testing infrastructure:
- Unit Tests (50%+ coverage): Mocha + Chai + Sinon
- Integration Tests: Connection lifecycle, SSL, pool exhaustion, version compatibility
- Component Tests: Renderer with jsdom, tree views, forms, dashboards
- Docker Containers: PostgreSQL 12, 14, 15, 16, 17 for compatibility testing
- CI/CD Pipeline: GitHub Actions with Matrix testing (Node 18-22, PostgreSQL 12-17)
π Testing docs: Use the scripts listed above and CI workflow in .github/workflows/test.yml.
π€ Contributing
- π Report Bugs
- π‘ Request Features
- π§ Fork β Branch β PR
- π§ͺ Ensure all tests pass:
npm run test:all && npm run coverage
Commit Convention
We follow Conventional Commits:
feat: add new feature
fix: resolve bug
docs: update documentation
refactor: code restructuring
test: add/update tests
chore: maintenance tasks
π¦ Building & Publishing
# Build VSIX package
npx vsce package
# Publish to VS Code Marketplace
npx vsce publish
# Publish to Open VSX
npx ovsx publish
Stable And Nightly Channels
- Stable releases are published from version tags (
v*) via.github/workflows/publish.yml. - Nightly releases are published on every merge to
mainvia.github/workflows/publish-nightly.yml.
VS Code Marketplace channel behavior:
- Stable extension ID:
ric-v.postgres-explorer - Nightly is published as a pre-release of the same extension ID.
- Users can opt in/out directly from the extension page with:
Switch to Pre-Release VersionSwitch to Release Version
Open VSX channel behavior:
- Stable extension ID:
ric-v.postgres-explorer - Nightly companion extension ID:
ric-v.postgres-explorer-nightly - To opt out of nightly on Open VSX-based editors, uninstall the nightly companion extension and install stable.
Nightly versioning policy:
- Nightly builds use an odd minor stream and CI run number as patch.
- Example format:
0.9.<run_number> - This keeps nightly versions monotonically increasing for reliable updates.
π License
π§ Troubleshooting
Connection Issues
SSL Connection Failures
Problem: SSL connection failed or certificate verify failed
Solutions:
- Disable SSL (development only): Set SSL Mode to
disable - Use
prefermode (tries SSL, falls back to non-SSL) - Provide CA certificate: SSL Mode
verify-ca+ CA Certificate path
Connection Timeout
Problem: Connection timeout or ETIMEDOUT
Solutions:
- Increase connection timeout in settings
- Check firewall rules
- Verify PostgreSQL
pg_hba.confallows remote connections - Ensure PostgreSQL is listening on correct interface
SSH Tunnel Issues
Problem: SSH tunnel failed to establish
Solutions:
- Verify SSH credentials and host
- Test SSH connection manually:
ssh user@host -p port - Check SSH key permissions:
chmod 600 ~/.ssh/id_rsa - Ensure SSH server allows port forwarding
Performance Issues
Large Result Sets
Problem: Querying large tables causes freezes
Solution: Results are automatically limited to 10,000 rows. Use LIMIT clause for specific row counts.
Slow Tree View
Problem: Database tree takes long to load
Solutions:
- Use search filter to narrow objects
- Collapse unused schemas
- Disable object count badges in settings
Common Error Messages
| Error | Cause | Solution |
|---|---|---|
password authentication failed | Wrong credentials | Verify username/password |
database does not exist | Database name typo | Check database name |
permission denied | Insufficient privileges | Grant SELECT permission |
too many connections | Pool exhausted | Close unused connections |
no pg_hba.conf entry | Access control | Add entry to pg_hba.conf |
π Feature Comparison
| Feature | NexQL | pgAdmin | DBeaver | TablePlus |
|---|---|---|---|---|
| VS Code Integration | β Native | β | β | β |
| SQL Notebooks | β Interactive | β | β | β |
| AI Assistant | β Built-in | β | β | β |
| Real-time Dashboard | β | β | β οΈ Limited | β οΈ Limited |
| Inline Cell Editing | β | β | β | β |
| Export Formats | CSV, JSON, Excel | CSV, JSON | CSV, JSON, Excel | CSV, JSON, SQL |
| SSH Tunneling | β | β | β | β |
| Foreign Data Wrappers | β Full | β | β οΈ Limited | β |
| License | MIT (Free) | PostgreSQL (Free) | Apache 2.0 (Free) | Proprietary (Paid) |
Unique to NexQL
- π€ AI-powered query generation and optimization
- π Interactive SQL notebooks with persistent state
- π Infinite scrolling for large result sets (10k rows)
- π¨ Modern UI integrated into VS Code
- π Hybrid connection pooling for performance