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
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

All notable changes to claude-mem.

## [v10.6.0] - 2026-03-03

## CLI: Command Line Interface

This release introduces a comprehensive **CLI tool** for managing Claude-Mem from the terminal, providing system diagnostics, data management, and configuration without needing to interact with the web UI.

### New Commands (11 Total)

**System Commands (4):**
- **`doctor`** — Run comprehensive health checks on plugin, worker, database, Bun, and Node.js. Includes `--fix` flag for automatic repairs.
- **`repair`** — Interactive repair wizard for common issues. Supports `--dry-run` and `--force` flags.
- **`config`** — Manage settings with validation. Subcommands: `get`, `set`, `list`, `reset`, `validate`.
- **`shell`** — Shell completion support for Bash, Zsh, and Fish.

**Worker Commands (1):**
- **`logs`** — View and manage worker logs with `--tail`, `--follow`, `--level` filters, and `--clean` for old log removal.

**Data Commands (6):**
- **`backup`** — Create backups (full, database-only, settings-only). List with `--list`.
- **`stats`** — Display database statistics including observations, sessions, activity, and top projects. Supports `--json` output.
- **`search`** — Full-text memory search with filters for project, type, and date. Includes `--recent` and `--projects` flags.
- **`clean`** — Remove old data (sessions, observations, logs, failed records). Supports `--dry-run`.
- **`export`** — Export observations to JSON or Markdown with date/project filters.
- **`import`** — Import observations from JSON with validation and `--dry-run` support.

### Key Features

- **Health Diagnostics**: Automatic detection of plugin, worker, database, and runtime issues
- **Validation**: Real-time validation for PORT (1024-65535), LOG_LEVEL (DEBUG/INFO/WARN/ERROR), and other settings
- **Colorized Output**: Clear visual feedback with ✓/✗/⚠ symbols
- **JSON Mode**: All commands support `--json` for programmatic access
- **Cross-Platform**: Works on Windows, macOS, and Linux
- **35 Unit Tests**: Comprehensive test coverage for utils and services

### Documentation

- New comprehensive CLI guide at `docs/CLI_GUIDE.md`
- Updated README.md with CLI quick reference
- Full command documentation with examples

## [v10.5.5] - 2026-03-09

### Bug Fix
Expand Down
5 changes: 5 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ Claude-mem is a Claude Code plugin providing persistent memory across sessions.

**5 Lifecycle Hooks**: SessionStart → UserPromptSubmit → PostToolUse → Summary → SessionEnd

**CLI** (`src/cli/`) - Command line interface for managing Claude-Mem:
- 11 commands: doctor, repair, config, shell, logs, backup, stats, search, clean, export, import
- Built with Commander.js, provides system diagnostics and data management
- Entry point: `src/cli/index.ts`

**Hooks** (`src/hooks/*.ts`) - TypeScript → ESM, built to `plugin/scripts/*-hook.js`

**Worker Service** (`src/services/worker-service.ts`) - Express API on port 37777, Bun-managed, handles AI processing asynchronously
Expand Down
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<img src="https://img.shields.io/badge/License-AGPL%203.0-blue.svg" alt="License">
</a>
<a href="package.json">
<img src="https://img.shields.io/badge/version-6.5.0-green.svg" alt="Version">
<img src="https://img.shields.io/badge/version-10.6.0-green.svg" alt="Version">
</a>
<a href="package.json">
<img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg" alt="Node">
Expand Down Expand Up @@ -122,6 +122,38 @@ Restart Claude Code. Context from previous sessions will automatically appear in

> **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.

### 🖥️ Command Line Interface (CLI)

Claude-Mem includes a powerful CLI for managing your memory system:

```bash
# System diagnostics and repair
claude-mem doctor # Run health checks
claude-mem doctor --fix # Auto-fix detected issues
claude-mem repair # Interactive repair wizard

# View and manage logs
claude-mem logs --tail 100 # View last 100 lines
claude-mem logs --follow # Follow logs in real-time
claude-mem logs --clean 30 # Remove logs older than 30 days

# Data management
claude-mem backup # Create backup
claude-mem backup --list # List available backups
claude-mem stats # Show statistics
claude-mem search "auth" # Search memories
claude-mem clean --logs 30 # Clean old logs
claude-mem export --format md # Export to Markdown

# Configuration
claude-mem config list # Show all settings
claude-mem config get PORT # Get specific setting
claude-mem config set PORT 37778 # Update setting
claude-mem shell install bash # Install shell completion
```

See [CLI Documentation](https://docs.claude-mem.ai/cli) for detailed usage.

### 🦞 OpenClaw Gateway

Install claude-mem as a persistent memory plugin on [OpenClaw](https://openclaw.ai) gateways with a single command:
Expand Down
Loading