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-jsAlso supported:
$
pnpm add memori-js$
yarn add memori-js$
bun add memori-jsEnvironment Variables
Memori needs access to embedding models and (optionally) cloud databases. Configure these in your .env file.
bash
1# Required for default embeddings2OPENAI_API_KEY=sk-...34# Required if using Google Gemini for embeddings5GOOGLE_API_KEY=AIza...67# Optional: Remote Postgres (Supabase, Neon, etc.)8# If not provided, defaults to local SQLite9DATABASE_URL=postgresql://user:pass@host:5432/dbTypeScript 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.