A comprehensive suite of tools for managing and analyzing LLM memory systems, built with a modular architecture.
This project is organized as a monorepo with four main packages:
@llm-mem/shared- Core utilities, memory services, and types@llm-mem/cli- Command-line interface for memory coverage analysis@llm-mem/mem-tools- CLI tools for memory management operations@llm-mem/mcp- MCP server for LLM integration
- Workspace Management: Uses pnpm workspaces
- Scripts: Orchestrates builds across all packages
- Dev Dependencies: Shared development tools
- Shared Dependencies: Common across multiple packages
- Workspace Dependencies: Internal package references using
workspace:* - External Dependencies: Only included where needed
- Root tsconfig.json: Base configuration for all packages
- Package tsconfig.json: Extends root with package-specific settings
- Shared Types: All packages can import from @llm-mem/shared
- Node.js 24+
- pnpm 10.12.4+
# Clone the repository
git clone git@github.com:kernpunkt/llm-mem.git
cd llm-mem
# Install dependencies
pnpm install
# allow build scripts this will automatically build all packages and rebuild sqlite3 for your plattform
pnpm approve-buildsYou can install the entire monorepo as an optional (since it is only used locally) dependency into any Node.js project to use the CLI and MCP tools:
# Install the entire monorepo (recommended)
pnpm add --save-optional git+ssh://git@github.com:kernpunkt/llm-mem.git#main
# allow build scripts, this will automatically install all dependencies and build all packages and rebuild sqlite3 for your plattform
pnpm approve-buildssee individual README.md files in the package directories
packages/shared/
βββ src/
β βββ memory/ # Memory management services
β βββ utils/ # Utility functions
β βββ index.ts # Main export file
βββ dist/ # Built JavaScript files
βββ package.json # Package configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # Package documentation
packages/cli/
βββ src/
β βββ cli.ts # Main CLI entry point
β βββ coverage-service.ts
β βββ file-scanner.ts
β βββ source-parser.ts
β βββ report-generator.ts
β βββ config-parser.ts
β βββ validation.ts
β βββ types.ts
βββ dist/ # Built CLI executable
βββ package.json # Package configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # Package documentation
packages/mem-tools/
βββ src/
β βββ cli.ts # Main CLI entry point
β βββ commands/ # Command implementations
β βββ config.ts # Configuration handling
β βββ config-parser.ts # Config file parsing
β βββ types.ts # Type definitions
βββ dist/ # Built CLI executable
βββ package.json # Package configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # Package documentation
packages/mcp/
βββ src/
β βββ index.ts # MCP server entry point
β βββ assets/ # Static assets
βββ dist/ # Built MCP server
βββ package.json # Package configuration
βββ tsconfig.json # TypeScript configuration
βββ README.md # Package documentation
- Shared Package: Core utilities and services
- CLI Package: Depends on shared package
- Mem-Tools Package: Depends on shared package
- MCP Package: Depends on shared package
- TypeScript Compilation: All packages compile to individual
dist/directories - Asset Copying: MCP package copies assets to dist
- Executable Permissions: CLI package sets executable permissions
# Build all packages
pnpm build
# Build specific package
pnpm build:shared
pnpm build:cli
pnpm build:mem-tools
pnpm build:mcp
# Development mode (watch for changes)
pnpm dev# Run all tests
pnpm test
# Run tests for specific package
pnpm test:shared
pnpm test:cli
pnpm test:mem-tools
pnpm test:mcp
# Watch mode
pnpm test:watch
# Coverage report
pnpm test:coverage- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
MIT License - see LICENSE for details.