koishi-database-memory is an in-memory database implementation for the Koishi chatbot framework (v4.x). Version 1.2.0 provides a lightweight, zero-configuration database backend that stores all data in memory, suitable for development, testing, or small-scale deployments where persistence is not required. It ships with TypeScript types and requires koishi-core ^1.12.0 as a peer dependency. Unlike SQL-based databases (e.g., koishi-database-sqlite or koishi-database-mysql), it offers the fastest read/write speeds but no data persistence across restarts. The package is maintained as part of the Koishi monorepo and follows its release cadence. It is intended for use cases where temporary storage suffices, and can be easily swapped with a persistent database later.
npm install koishi-database-memoryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to install and use the MemoryDatabase plugin in a Koishi app, including extending a model and creating a record.
Replace import { MemoryDatabase } from 'koishi-plugin-memory' with import { MemoryDatabase } from 'koishi-database-memory'.Use the plugin system: app.plugin(MemoryDatabase, {})Use a persistent database like SQLite or MySQL for production. MemoryDatabase is intended for development/testing.
Refer to Koishi database API limitations; use SQL databases for advanced queries.
Run 'npm install koishi-database-memory' and ensure it is listed in package.json dependencies.
Use `app.plugin(MemoryDatabase, options)` — do not instantiate directly.
Use ESM import syntax: `import { MemoryDatabase } from 'koishi-database-memory'`.Ensure `app.plugin(MemoryDatabase)` is called before any database operations.