Command Palette

Search for a command to run...

Installation

Installation

Memori-JS is designed to be lightweight and zero-dependency for the core runtime.

Package Manager

Install the package using your favorite package manager:

bash
1npm install memori-js
Also supported:
$pnpm add memori-js
$yarn add memori-js
$bun add memori-js

Environment Variables

Memori needs access to embedding models and (optionally) cloud databases. Configure these in your .env file.

bash
1# Required for default embeddings
2OPENAI_API_KEY=sk-...
3
4# Required if using Google Gemini for embeddings
5GOOGLE_API_KEY=AIza...
6
7# Optional: Remote Postgres (Supabase, Neon, etc.)
8# If not provided, defaults to local SQLite
9DATABASE_URL=postgresql://user:pass@host:5432/db

TypeScript Configuration

If you are using TypeScript, ensure your tsconfig.json is set up to handle ESM if you encounter issues, though Memori is bundled to support both CJS and ESM.