feat: Release v4.0.5 - Auto-install dependencies via bootstrap hooks
Fixed better-sqlite3 distribution by implementing self-bootstrapping hooks that auto-install dependencies on first run. This eliminates the need for users to have native compilation tools or manually install dependencies. ## Solution Instead of bundling 25MB of better-sqlite3 binaries in git or requiring manual npm install, hooks now bootstrap themselves on first execution: 1. Created `src/shared/bootstrap.ts` with `ensureDependencies()` function 2. Added bootstrap calls to all hook entry points (context, new, save, summary, cleanup) 3. Created `plugin/scripts/package.json` declaring better-sqlite3 dependency 4. Bootstrap checks if `node_modules` exists, runs `npm install` if missing 5. npm automatically downloads prebuilt better-sqlite3 binary for user's platform ## Changes **Core Bootstrap System:** - Added src/shared/bootstrap.ts: Auto-install dependencies using npm - Modified all hooks (context, new, save, summary, cleanup) to call ensureDependencies() - Created plugin/scripts/package.json with better-sqlite3 dependency **Build & Distribution:** - Removed node_modules copying logic from build script - Build output is now compact (hooks + package.json, no binaries) - Updated marketplace.json to point to GitHub for direct installation **Documentation:** - Updated README: GitHub Marketplace installation is now recommended method - Installation instructions emphasize no compilation needed - Version bumped to 4.0.5 throughout ## Benefits - ✅ No git bloat (repo stays small, no 25MB binaries committed) - ✅ No compilation needed (npm downloads prebuilt binaries) - ✅ Works on all platforms (npm handles platform-specific binaries) - ✅ Zero manual steps (hooks bootstrap themselves automatically) - ✅ Idempotent (skips install if dependencies already exist) Installation now works via simple: ``` /plugin marketplace add https://github.com/thedotmack/claude-mem /plugin install claude-mem ``` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
Claude-Mem seamlessly preserves context across sessions by automatically capturing tool usage observations, generating semantic summaries, and making them available to future sessions. This enables Claude to maintain continuity of knowledge about projects even after sessions end or reconnect.
|
||||
|
||||
[](LICENSE)
|
||||
[](package.json)
|
||||
[](package.json)
|
||||
[](package.json)
|
||||
|
||||
---
|
||||
@@ -184,12 +184,33 @@ SQLite database (`${CLAUDE_PLUGIN_ROOT}/data/claude-mem.db`) with tables:
|
||||
node --version # Should be >= 18.0.0
|
||||
```
|
||||
|
||||
### Method 1: Local Marketplace Installation (Recommended)
|
||||
### Method 1: GitHub Marketplace (Recommended)
|
||||
|
||||
Install using the local marketplace file:
|
||||
Install directly from GitHub:
|
||||
|
||||
```bash
|
||||
# Clone or download the repository
|
||||
# Add the marketplace
|
||||
/plugin marketplace add https://github.com/thedotmack/claude-mem
|
||||
|
||||
# Install the plugin
|
||||
/plugin install claude-mem
|
||||
```
|
||||
|
||||
The plugin will:
|
||||
- Automatically download prebuilt binaries (no compilation needed)
|
||||
- Install all dependencies (including PM2 and SQLite binaries)
|
||||
- Configure hooks for session lifecycle management
|
||||
- Set up the MCP search server
|
||||
- Auto-start the worker service on first session
|
||||
|
||||
**That's it!** The plugin is ready to use. Start a new Claude Code session and you'll see context from previous sessions automatically loaded.
|
||||
|
||||
### Method 2: Local Marketplace Installation
|
||||
|
||||
Install using the local marketplace file (useful for development or testing):
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/thedotmack/claude-mem.git
|
||||
cd claude-mem
|
||||
|
||||
@@ -200,15 +221,7 @@ cd claude-mem
|
||||
/plugin install claude-mem
|
||||
```
|
||||
|
||||
The plugin will:
|
||||
- Automatically install all dependencies (including PM2)
|
||||
- Configure hooks for session lifecycle management
|
||||
- Set up the MCP search server
|
||||
- Auto-start the worker service on first session
|
||||
|
||||
**That's it!** The plugin is ready to use. Start a new Claude Code session and you'll see context from previous sessions automatically loaded.
|
||||
|
||||
### Method 2: Clone and Build (For Development)
|
||||
### Method 3: Clone and Build (For Development)
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
@@ -229,7 +242,7 @@ npm run worker:start
|
||||
npm run worker:status
|
||||
```
|
||||
|
||||
### Method 3: NPM Package (Coming Soon)
|
||||
### Method 4: NPM Package (Coming Soon)
|
||||
|
||||
```bash
|
||||
# Install from NPM (when published)
|
||||
|
||||
Reference in New Issue
Block a user