Skip to content

dev-asterix/yape

Repository files navigation

🐘 PostgreSQL Explorer

Professional Database Management for VS Code

Version Downloads Rating Status

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


πŸ“Έ Preview

Dashboard


✨ Key Features

  • πŸ”Œ 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
  • πŸ› οΈ Object Operations β€” CRUD, scripts, VACUUM, ANALYZE, REINDEX
  • πŸ€– AI-Powered β€” GitHub Copilot, OpenAI, Anthropic, Gemini

πŸš€ 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!


πŸ—οΈ Project Structure

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
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ 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

πŸ› οΈ 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/yape.git
cd yape

# 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

  1. Open the project in VS Code
  2. Press F5 to launch Extension Development Host
  3. Or use Run and Debug (Ctrl+Shift+D) β†’ "Run Extension"

Debugging Tips

  • Output Panel: Ctrl+Shift+U β†’ Select "PostgreSQL Explorer"
  • DevTools: Ctrl+Shift+I in Extension Development Host
  • Webview Debug: Right-click in webview β†’ "Inspect"

πŸ§ͺ Testing

# Run all tests
npm run test

# Run with coverage
npm run coverage

Tests are located in src/test/unit/ using Mocha + Chai + Sinon.


🀝 Contributing

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

πŸ“ License

MIT License


Made with ❀️ for the PostgreSQL Community

Made with TypeScript PostgreSQL VS Code

Also on Open VSX

About

YAPE - Yet Another Postgres Extension for VS Code!!!

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages