refactor(cursor): Update installation instructions for clarity and consistency
This commit is contained in:
@@ -20,12 +20,12 @@ If you're using Cursor without Claude Code, see [STANDALONE-SETUP.md](STANDALONE
|
|||||||
## Installation (1 minute)
|
## Installation (1 minute)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install for current project
|
# Install globally for all projects (recommended)
|
||||||
claude-mem cursor install
|
|
||||||
|
|
||||||
# Or install globally for all projects
|
|
||||||
claude-mem cursor install user
|
claude-mem cursor install user
|
||||||
|
|
||||||
|
# Or install for current project only
|
||||||
|
claude-mem cursor install
|
||||||
|
|
||||||
# Check installation status
|
# Check installation status
|
||||||
claude-mem cursor status
|
claude-mem cursor status
|
||||||
```
|
```
|
||||||
|
|||||||
+16
-16
@@ -62,11 +62,11 @@ See [CONTEXT-INJECTION.md](CONTEXT-INJECTION.md) for details.
|
|||||||
### Quick Install (Recommended)
|
### Quick Install (Recommended)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install for current project
|
# Install globally for all projects (recommended)
|
||||||
claude-mem cursor install
|
|
||||||
|
|
||||||
# Or install globally for all projects
|
|
||||||
claude-mem cursor install user
|
claude-mem cursor install user
|
||||||
|
|
||||||
|
# Or install for current project only
|
||||||
|
claude-mem cursor install
|
||||||
```
|
```
|
||||||
|
|
||||||
### Manual Installation
|
### Manual Installation
|
||||||
@@ -74,7 +74,18 @@ claude-mem cursor install user
|
|||||||
<details>
|
<details>
|
||||||
<summary>Click to expand manual installation steps</summary>
|
<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
|
```bash
|
||||||
# Copy hooks.json to your project
|
# Copy hooks.json to your project
|
||||||
mkdir -p .cursor
|
mkdir -p .cursor
|
||||||
@@ -86,17 +97,6 @@ cp cursor-hooks/*.sh .cursor/hooks/
|
|||||||
chmod +x .cursor/hooks/*.sh
|
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>
|
</details>
|
||||||
|
|
||||||
### After Installation
|
### After Installation
|
||||||
|
|||||||
@@ -106,11 +106,11 @@ EOF
|
|||||||
## Step 3: Install Cursor Hooks
|
## Step 3: Install Cursor Hooks
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# From the claude-mem repo directory
|
# From the claude-mem repo directory (recommended - all projects)
|
||||||
bun run cursor:install
|
|
||||||
|
|
||||||
# Or for user-level (all projects):
|
|
||||||
bun run cursor:install -- user
|
bun run cursor:install -- user
|
||||||
|
|
||||||
|
# Or for project-level only:
|
||||||
|
bun run cursor:install
|
||||||
```
|
```
|
||||||
|
|
||||||
This installs:
|
This installs:
|
||||||
@@ -196,8 +196,8 @@ If you hit the 1500 requests/day limit:
|
|||||||
|
|
||||||
| Command | Purpose |
|
| Command | Purpose |
|
||||||
|---------|---------|
|
|---------|---------|
|
||||||
| `bun run cursor:install` | Install hooks for current project |
|
| `bun run cursor:install -- user` | Install hooks for all projects (recommended) |
|
||||||
| `bun run cursor:install -- user` | Install hooks for all projects |
|
| `bun run cursor:install` | Install hooks for current project only |
|
||||||
| `bun run cursor:status` | Check installation status |
|
| `bun run cursor:status` | Check installation status |
|
||||||
| `bun run worker:start` | Start the background worker |
|
| `bun run worker:start` | Start the background worker |
|
||||||
| `bun run worker:stop` | Stop the background worker |
|
| `bun run worker:stop` | Stop the background worker |
|
||||||
|
|||||||
+3
-24
@@ -4,7 +4,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
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)..."
|
echo "Installing claude-mem Cursor hooks (${INSTALL_TYPE} level)..."
|
||||||
|
|
||||||
@@ -20,25 +20,9 @@ case "$INSTALL_TYPE" in
|
|||||||
TARGET_DIR="${HOME}/.cursor"
|
TARGET_DIR="${HOME}/.cursor"
|
||||||
HOOKS_DIR="${HOME}/.cursor/hooks"
|
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 "Invalid install type: $INSTALL_TYPE"
|
||||||
echo "Usage: $0 [user|project|enterprise]"
|
echo "Usage: $0 [user (recommended)|project]"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -63,16 +47,11 @@ if [ "$INSTALL_TYPE" = "project" ]; then
|
|||||||
tmp_file=$(mktemp)
|
tmp_file=$(mktemp)
|
||||||
sed 's|\./cursor-hooks/|\./\.cursor/hooks/|g' "$TARGET_DIR/hooks.json" > "$tmp_file"
|
sed 's|\./cursor-hooks/|\./\.cursor/hooks/|g' "$TARGET_DIR/hooks.json" > "$tmp_file"
|
||||||
mv "$tmp_file" "$TARGET_DIR/hooks.json"
|
mv "$tmp_file" "$TARGET_DIR/hooks.json"
|
||||||
elif [ "$INSTALL_TYPE" = "user" ]; then
|
else
|
||||||
# For user-level, use absolute paths
|
# For user-level, use absolute paths
|
||||||
tmp_file=$(mktemp)
|
tmp_file=$(mktemp)
|
||||||
sed "s|\./cursor-hooks/|${HOOKS_DIR}/|g" "$TARGET_DIR/hooks.json" > "$tmp_file"
|
sed "s|\./cursor-hooks/|${HOOKS_DIR}/|g" "$TARGET_DIR/hooks.json" > "$tmp_file"
|
||||||
mv "$tmp_file" "$TARGET_DIR/hooks.json"
|
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
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user