From 110d055b8b9e700bc9aede183aa376438ffdd9b6 Mon Sep 17 00:00:00 2001 From: Alex Newman Date: Mon, 29 Dec 2025 22:40:03 -0500 Subject: [PATCH] refactor(cursor): Update installation instructions for clarity and consistency --- cursor-hooks/QUICKSTART.md | 8 ++++---- cursor-hooks/README.md | 32 ++++++++++++++++---------------- cursor-hooks/STANDALONE-SETUP.md | 12 ++++++------ cursor-hooks/install.sh | 27 +++------------------------ 4 files changed, 29 insertions(+), 50 deletions(-) diff --git a/cursor-hooks/QUICKSTART.md b/cursor-hooks/QUICKSTART.md index f0cf769a..99cd550e 100644 --- a/cursor-hooks/QUICKSTART.md +++ b/cursor-hooks/QUICKSTART.md @@ -20,12 +20,12 @@ If you're using Cursor without Claude Code, see [STANDALONE-SETUP.md](STANDALONE ## Installation (1 minute) ```bash -# Install for current project -claude-mem cursor install - -# Or install globally for all projects +# Install globally for all projects (recommended) claude-mem cursor install user +# Or install for current project only +claude-mem cursor install + # Check installation status claude-mem cursor status ``` diff --git a/cursor-hooks/README.md b/cursor-hooks/README.md index 95aa954d..b581eb11 100644 --- a/cursor-hooks/README.md +++ b/cursor-hooks/README.md @@ -62,11 +62,11 @@ See [CONTEXT-INJECTION.md](CONTEXT-INJECTION.md) for details. ### Quick Install (Recommended) ```bash -# Install for current project -claude-mem cursor install - -# Or install globally for all projects +# Install globally for all projects (recommended) claude-mem cursor install user + +# Or install for current project only +claude-mem cursor install ``` ### Manual Installation @@ -74,7 +74,18 @@ claude-mem cursor install user
Click to expand manual installation steps -**Project-level** (recommended for team sharing): +**User-level** (recommended - applies to all projects): +```bash +# Copy hooks.json to your home directory +cp cursor-hooks/hooks.json ~/.cursor/hooks.json + +# Copy hook scripts +mkdir -p ~/.cursor/hooks +cp cursor-hooks/*.sh ~/.cursor/hooks/ +chmod +x ~/.cursor/hooks/*.sh +``` + +**Project-level** (for per-project hooks): ```bash # Copy hooks.json to your project mkdir -p .cursor @@ -86,17 +97,6 @@ cp cursor-hooks/*.sh .cursor/hooks/ chmod +x .cursor/hooks/*.sh ``` -**User-level** (applies to all projects): -```bash -# Copy hooks.json to your home directory -cp cursor-hooks/hooks.json ~/.cursor/hooks.json - -# Copy hook scripts -mkdir -p ~/.cursor/hooks -cp cursor-hooks/*.sh ~/.cursor/hooks/ -chmod +x ~/.cursor/hooks/*.sh -``` -
### After Installation diff --git a/cursor-hooks/STANDALONE-SETUP.md b/cursor-hooks/STANDALONE-SETUP.md index 5a3e7c23..cc6eb77b 100644 --- a/cursor-hooks/STANDALONE-SETUP.md +++ b/cursor-hooks/STANDALONE-SETUP.md @@ -106,11 +106,11 @@ EOF ## Step 3: Install Cursor Hooks ```bash -# From the claude-mem repo directory -bun run cursor:install - -# Or for user-level (all projects): +# From the claude-mem repo directory (recommended - all projects) bun run cursor:install -- user + +# Or for project-level only: +bun run cursor:install ``` This installs: @@ -196,8 +196,8 @@ If you hit the 1500 requests/day limit: | Command | Purpose | |---------|---------| -| `bun run cursor:install` | Install hooks for current project | -| `bun run cursor:install -- user` | Install hooks for all projects | +| `bun run cursor:install -- user` | Install hooks for all projects (recommended) | +| `bun run cursor:install` | Install hooks for current project only | | `bun run cursor:status` | Check installation status | | `bun run worker:start` | Start the background worker | | `bun run worker:stop` | Stop the background worker | diff --git a/cursor-hooks/install.sh b/cursor-hooks/install.sh index 33b1571d..f27a98d2 100755 --- a/cursor-hooks/install.sh +++ b/cursor-hooks/install.sh @@ -4,7 +4,7 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -INSTALL_TYPE="${1:-user}" # 'user', 'project', or 'enterprise' +INSTALL_TYPE="${1:-user}" # 'user' (recommended) or 'project' echo "Installing claude-mem Cursor hooks (${INSTALL_TYPE} level)..." @@ -20,25 +20,9 @@ case "$INSTALL_TYPE" in TARGET_DIR="${HOME}/.cursor" HOOKS_DIR="${HOME}/.cursor/hooks" ;; - "enterprise") - if [[ "$OSTYPE" == "darwin"* ]]; then - TARGET_DIR="/Library/Application Support/Cursor" - HOOKS_DIR="/Library/Application Support/Cursor/hooks" - elif [[ "$OSTYPE" == "linux-gnu"* ]]; then - TARGET_DIR="/etc/cursor" - HOOKS_DIR="/etc/cursor/hooks" - else - echo "Enterprise installation not supported on this OS" - exit 1 - fi - if [ "$EUID" -ne 0 ]; then - echo "Enterprise installation requires root privileges" - exit 1 - fi - ;; *) echo "Invalid install type: $INSTALL_TYPE" - echo "Usage: $0 [user|project|enterprise]" + echo "Usage: $0 [user (recommended)|project]" exit 1 ;; esac @@ -63,16 +47,11 @@ if [ "$INSTALL_TYPE" = "project" ]; then tmp_file=$(mktemp) sed 's|\./cursor-hooks/|\./\.cursor/hooks/|g' "$TARGET_DIR/hooks.json" > "$tmp_file" mv "$tmp_file" "$TARGET_DIR/hooks.json" -elif [ "$INSTALL_TYPE" = "user" ]; then +else # For user-level, use absolute paths tmp_file=$(mktemp) sed "s|\./cursor-hooks/|${HOOKS_DIR}/|g" "$TARGET_DIR/hooks.json" > "$tmp_file" mv "$tmp_file" "$TARGET_DIR/hooks.json" -elif [ "$INSTALL_TYPE" = "enterprise" ]; then - # For enterprise, use absolute paths - tmp_file=$(mktemp) - sed "s|\./cursor-hooks/|${HOOKS_DIR}/|g" "$TARGET_DIR/hooks.json" > "$tmp_file" - mv "$tmp_file" "$TARGET_DIR/hooks.json" fi echo ""