Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
datasets/
node_modules/
dist/
!installer/dist/
**/_tree-sitter/
*.log
.DS_Store
Expand Down
48 changes: 48 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Source code (dist/ and plugin/ are the shipped artifacts)
src/
scripts/
tests/
docs/
datasets/
private/
antipattern-czar/

# Heavy binaries installed at runtime via smart-install.js
plugin/node_modules/
plugin/scripts/claude-mem
plugin/bun.lock
plugin/data/
plugin/data.backup/

# Development files
*.ts
!*.d.ts
tsconfig*.json
.eslintrc*
.prettierrc*
.editorconfig
jest.config*
vitest.config*

# Git and CI
.git/
.github/
.gitignore
.claude/
.cursor/
.mcp.json
.plan/

# OS files
.DS_Store
*.log
*.tmp
*.temp
Thumbs.db

# Misc
Auto Run Docs/
~*/
http*/
https*/
.idea/
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,13 @@

## Quick Start

Start a new Claude Code session in the terminal and enter the following commands:
Install with a single command:

```bash
npx claude-mem install
```

Or install from the plugin marketplace inside Claude Code:

```
/plugin marketplace add thedotmack/claude-mem
Expand All @@ -120,7 +126,7 @@ Start a new Claude Code session in the terminal and enter the following commands

Restart Claude Code. Context from previous sessions will automatically appear in new sessions.

> **Note:** Claude-Mem is also published on npm, but `npm install -g claude-mem` installs the **SDK/library only** — it does not register the plugin hooks or set up the worker service. To use Claude-Mem as a plugin, always install via the `/plugin` commands above.
> **Note:** Claude-Mem is also published on npm, but `npm install -g claude-mem` installs the **SDK/library only** — it does not register the plugin hooks or set up the worker service. Always install via `npx claude-mem install` or the `/plugin` commands above.

### 🦞 OpenClaw Gateway

Expand Down
29 changes: 20 additions & 9 deletions docs/public/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,35 @@ description: "Install Claude-Mem plugin for persistent memory across sessions"

## Quick Start

Install Claude-Mem directly from the plugin marketplace:
### Option 1: npx (Recommended)

Install and configure Claude-Mem with a single command:

```bash
npx claude-mem install
```

The interactive installer will:
- Detect your installed IDEs (Claude Code, Cursor, Gemini CLI, Windsurf, etc.)
- Copy plugin files to the correct locations
- Register the plugin with Claude Code
- Install all dependencies (including Bun and uv)
- Auto-start the worker service

### Option 2: Plugin Marketplace

Install Claude-Mem directly from the plugin marketplace inside Claude Code:

```bash
/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem
```

That's it! The plugin will automatically:
- Download prebuilt binaries (no compilation needed)
- Install all dependencies (including SQLite binaries)
- Configure hooks for session lifecycle management
- Auto-start the worker service on first session

Start a new Claude Code session and you'll see context from previous sessions automatically loaded.
Both methods will automatically configure hooks and start the worker service. Start a new Claude Code session and you'll see context from previous sessions automatically loaded.

> **Important:** Claude-Mem is published on npm, but running `npm install -g claude-mem` installs the
> **SDK/library only**. It does **not** register plugin hooks or start the worker service.
> To use Claude-Mem as a persistent memory plugin, always install via the `/plugin` commands above.
> Always install via `npx claude-mem install` or the `/plugin` commands above.

## System Requirements

Expand Down
8 changes: 7 additions & 1 deletion docs/public/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ Claude-Mem seamlessly preserves context across sessions by automatically capturi

## Quick Start

Start a new Claude Code session in the terminal and enter the following commands:
Install with a single command:

```bash
npx claude-mem install
```

Or install from the plugin marketplace inside Claude Code:

```bash
/plugin marketplace add thedotmack/claude-mem
Expand Down
64 changes: 15 additions & 49 deletions install/public/install.sh
Original file line number Diff line number Diff line change
@@ -1,59 +1,25 @@
#!/bin/bash
set -euo pipefail

# claude-mem installer bootstrap
# Usage: curl -fsSL https://install.cmem.ai | bash
# or: curl -fsSL https://install.cmem.ai | bash -s -- --provider=gemini --api-key=YOUR_KEY

INSTALLER_URL="https://install.cmem.ai/installer.js"
# claude-mem installer redirect
# The old curl-pipe-bash installer has been replaced by npx claude-mem.
# This script now redirects users to the new install method.

# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
CYAN='\033[0;36m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color

error() { echo -e "${RED}Error: $1${NC}" >&2; exit 1; }
info() { echo -e "${CYAN}$1${NC}"; }

# Check Node.js
if ! command -v node &> /dev/null; then
error "Node.js is required but not found. Install from https://nodejs.org"
fi

NODE_VERSION=$(node -v | sed 's/v//')
NODE_MAJOR=$(echo "$NODE_VERSION" | cut -d. -f1)
if [ "$NODE_MAJOR" -lt 18 ]; then
error "Node.js >= 18 required. Current: v${NODE_VERSION}"
fi

info "claude-mem installer (Node.js v${NODE_VERSION})"

# Create temp file for installer
TMPFILE=$(mktemp "${TMPDIR:-/tmp}/claude-mem-installer.XXXXXX.mjs")

# Cleanup on exit
cleanup() {
rm -f "$TMPFILE"
}
trap cleanup EXIT INT TERM

# Download installer
info "Downloading installer..."
if command -v curl &> /dev/null; then
curl -fsSL "$INSTALLER_URL" -o "$TMPFILE"
elif command -v wget &> /dev/null; then
wget -q "$INSTALLER_URL" -O "$TMPFILE"
else
error "curl or wget required to download installer"
fi

# Run installer with TTY access
# When piped (curl | bash), stdin is the script. We need to reconnect to the terminal.
if [ -t 0 ]; then
# Already have TTY (script was downloaded and run directly)
node "$TMPFILE" "$@"
else
# Piped execution -- reconnect stdin to terminal
node "$TMPFILE" "$@" </dev/tty
fi
echo ""
echo -e "${YELLOW}The curl-pipe-bash installer has been replaced.${NC}"
echo ""
echo -e "${GREEN}Install claude-mem with a single command:${NC}"
echo ""
echo -e " ${CYAN}npx claude-mem install${NC}"
echo ""
echo -e "This requires Node.js >= 18. Get it from ${CYAN}https://nodejs.org${NC}"
echo ""
echo -e "For more info, visit: ${CYAN}https://docs.claude-mem.ai/installation${NC}"
echo ""
Loading