refactor(cursor): Update installation instructions for clarity and consistency

This commit is contained in:
Alex Newman
2025-12-29 22:40:03 -05:00
parent 101d2dd514
commit 110d055b8b
4 changed files with 29 additions and 50 deletions
+4 -4
View File
@@ -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
```
+16 -16
View File
@@ -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
<details>
<summary>Click to expand manual installation steps</summary>
**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
```
</details>
### After Installation
+6 -6
View File
@@ -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 |
+3 -24
View File
@@ -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 ""