From 5ce656037e6cc73f44f198cae82ce3663d2b1601 Mon Sep 17 00:00:00 2001 From: Alex Newman Date: Sat, 20 Dec 2025 17:16:20 -0500 Subject: [PATCH] Refactor worker commands from npm scripts to claude-mem CLI - Updated all instances of `npm run worker:restart` to `claude-mem restart` in documentation and code comments for consistency. - Modified error messages and logging to reflect the new command structure. - Adjusted worker management commands in various troubleshooting documents. - Changed the worker status check message to guide users towards the new command. --- README.md | 2 +- .../architecture/pm2-to-bun-migration.mdx | 8 ++--- .../architecture/search-architecture.mdx | 2 +- docs/public/architecture/worker-service.mdx | 2 +- docs/public/configuration.mdx | 10 +++--- docs/public/development.mdx | 4 +-- docs/public/endless-mode.mdx | 4 +-- docs/public/hooks-architecture.mdx | 2 +- docs/public/platform-integration.mdx | 2 +- docs/public/troubleshooting.mdx | 16 ++++----- docs/public/usage/getting-started.mdx | 2 +- docs/public/usage/private-tags.mdx | 2 +- docs/public/usage/search-tools.mdx | 2 +- plugin/scripts/cleanup-hook.js | 24 ++++++------- plugin/scripts/context-hook.js | 24 ++++++------- plugin/scripts/mcp-server.cjs | 2 +- plugin/scripts/new-hook.js | 26 +++++++------- plugin/scripts/save-hook.js | 26 +++++++------- plugin/scripts/summary-hook.js | 32 ++++++++---------- plugin/scripts/user-message-hook.js | 24 ++++++------- plugin/scripts/worker-cli.js | 4 +-- plugin/skills/mem-search.zip | Bin 33029 -> 33036 bytes .../mem-search/operations/formatting.md | 2 +- .../operations/automated-fixes.md | 10 +++--- .../troubleshoot/operations/common-issues.md | 8 ++--- .../troubleshoot/operations/database.md | 4 +-- .../troubleshoot/operations/reference.md | 2 +- .../skills/troubleshoot/operations/worker.md | 12 +++---- src/servers/mcp-server.ts | 2 +- src/utils/error-messages.ts | 18 ++-------- .../error-handling/hook-error-logging.test.ts | 8 ++--- 31 files changed, 130 insertions(+), 156 deletions(-) diff --git a/README.md b/README.md index 238fb112..60c1cb00 100644 --- a/README.md +++ b/README.md @@ -396,7 +396,7 @@ If you're experiencing issues, describe the problem to Claude and the troublesho **Common Issues:** -- Worker not starting → `npm run worker:restart` +- Worker not starting → `claude-mem restart` - No context appearing → `npm run test:context` - Database issues → `sqlite3 ~/.claude-mem/claude-mem.db "PRAGMA integrity_check;"` - Search not working → Check FTS5 tables exist diff --git a/docs/public/architecture/pm2-to-bun-migration.mdx b/docs/public/architecture/pm2-to-bun-migration.mdx index e9b2db84..d026cd7e 100644 --- a/docs/public/architecture/pm2-to-bun-migration.mdx +++ b/docs/public/architecture/pm2-to-bun-migration.mdx @@ -106,7 +106,7 @@ pm2 logs claude-mem-worker # View logs ```bash npm run worker:start # Start worker npm run worker:stop # Stop worker -npm run worker:restart # Restart worker +claude-mem restart # Restart worker npm run worker:status # Check status npm run worker:logs # View logs ``` @@ -305,7 +305,7 @@ No migration logic runs on subsequent sessions. | `pm2 list` | `npm run worker:status` | Shows worker status | | `pm2 start