# PGlite Embeddable WASM Postgres for Browser and Node.js

> PGlite is a WASM build of Postgres packaged as a TypeScript library that runs a full Postgres database in the browser, Node.js, Bun, and Deno. At only 3.7MB gzipped, it enables local-first applications with real SQL capabilities and no external database dependencies.

- Skill: `agentskillexchange/pglite-embeddable-wasm-postgres-for-browser-and-node-js` (Agent Skill)
- Install (CLI): `npx skillmds@latest add agentskillexchange/pglite-embeddable-wasm-postgres-for-browser-and-node-js`
- Raw SKILL.md: https://api.skillmd.com/api/skills/agentskillexchange/pglite-embeddable-wasm-postgres-for-browser-and-node-js/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: agentskillexchange (https://skillmd.com/u/agentskillexchange)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/agentskillexchange/pglite-embeddable-wasm-postgres-for-browser-and-node-js

---


# PGlite Embeddable WASM Postgres for Browser and Node.js

PGlite is a WASM build of Postgres packaged as a TypeScript library that runs a full Postgres database in the browser, Node.js, Bun, and Deno. At only 3.7MB gzipped, it enables local-first applications with real SQL capabilities and no external database dependencies.

## Installation

Use the upstream install or setup path that matches your environment:
- npm install @electric-sql/pglite
- Docker is required to build the WASM module, along with Node (v20 or above) and [pnpm](https://pnpm.io/) for package management and building the TypeScript packages.
- git clone --recurse-submodules https://github.com/electric-sql/pglite
- pnpm install

Requirements and caveats from upstream:
- PGlite is a WASM Postgres build packaged into a TypeScript client library that enables you to run Postgres in the browser, Node.js, Bun and Deno, with no need to install any other dependencies. It is only 3mb gzipped...
- It can be used as an ephemeral in-memory database, or with persistence either to the file system (Node/Bun/Deno) or indexedDB (Browser).
- ## Node/Bun/Deno

Basic usage or getting-started notes:
- **NodeJS**
- bash
- **Bun**

- Source: https://github.com/electric-sql/pglite
- Extracted from upstream docs: https://raw.githubusercontent.com/electric-sql/pglite/HEAD/README.md

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/pglite-embeddable-wasm-postgres/)

