pglite

Embed PostgreSQL 17.4 in browsers and Node.js via WebAssembly.

14|5|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/oakoss/agent-skills --skill pglite
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pglite
Source: https://github.com/oakoss/agent-skills/tree/main/skills/pglite
Command: npx skills add https://github.com/oakoss/agent-skills --skill pglite

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a full PostgreSQL 17.4 database engine that runs directly in the browser or Node.js via WebAssembly, under 3MB gzipped, eliminating the need for external database servers for many applications.

Core Features & Use Cases

  • In-Browser PostgreSQL: Run complex SQL queries, transactions, and use extensions like pgvector directly in the client.
  • Local-First & Offline Apps: Enables robust local data storage and querying for PWAs and offline-first applications.
  • Use Case: Develop a data visualization dashboard that runs entirely in the browser, fetching and querying data locally using PGlite, and syncing with a remote backend when online.

Quick Start

Use the pglite skill to create a new PGlite instance with IndexedDB storage for a database named 'my-app'.

Frequently Asked Questions about pglite

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run PostgreSQL in the browser using WebAssembly?

You can run PostgreSQL in the browser by using this Skill to embed the full PostgreSQL 17.4 engine via WebAssembly, requiring under 3MB gzipped without external database servers.

Can I use pgvector and other PostgreSQL extensions in a local-first WASM database?

Yes, this local-first WASM database supports extensions including pgvector, pg_trgm, pgcrypto, uuid-ossp, pg_uuidv7, hstore, ltree, bloom, and full-text search directly in the browser or Node.js.

What storage backends are available for an in-browser PostgreSQL instance?

An in-browser PostgreSQL instance supports memory, IndexedDB, OPFS-AHP, and filesystem storage backends, enabling robust local data persistence for offline-first applications and PWAs.

Does offline PostgreSQL in Node.js support live queries and React integration?

Offline PostgreSQL in Node.js supports live queries and React integration, alongside a multi-tab worker architecture with leader election and Electric sync for seamless frontend data synchronization.

What is the best way to build a data visualization dashboard that queries data locally?

The best way to build a local data visualization dashboard is using this Skill to fetch and query data locally via PostgreSQL WASM, syncing with a remote backend only when online to ensure offline accessibility.