Skip to content

Commit 3ad5534

Browse files
committed
Updated logo icon, added names and descriptions to rules
1 parent 0679e58 commit 3ad5534

7 files changed

Lines changed: 80 additions & 19 deletions

File tree

.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"homepage": "https://guide.sonatype.com",
1111
"repository": "https://github.com/sonatype/sonatype-guide-cursor-plugin",
1212
"license": "MIT",
13-
"logo": "assets/avatar.svg",
13+
"logo": "assets/Sonatype-guide-icon-reverse.png",
1414
"keywords": [
1515
"dependencies",
1616
"security",

INSTALL_TEST.md

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,26 @@ Use this to run **P0-3** from [SPRINT_PLAN.md](./SPRINT_PLAN.md): confirm the pl
1111

1212
---
1313

14-
## Option A: Install from GitHub (recommended)
14+
## Option A: Install from marketplace (only way `/add-plugin` works)
1515

16-
Use this if your plugin repo is on GitHub (e.g. `sonatype/sonatype-guide-cursor-plugin` or your fork).
16+
**Why `/add-plugin` with a GitHub URL does nothing:** Cursor only installs plugins that are **on the Cursor Marketplace**. Typing `/add-plugin sonatype/sonatype-guide-cursor-plugin` or a GitHub URL gives **no response** because the plugin is not in the marketplace yet.
1717

18-
1. **Push the plugin to GitHub** (if not already):
19-
- Create a repo and push this project.
20-
- Repo root must contain `.cursor-plugin/plugin.json`, `skills/`, `rules/`, `agents/`, `mcp.json`, etc.
18+
**To make the plugin installable:**
2119

22-
2. **In Cursor:**
23-
- Open **Settings** (Cmd+,) → **Plugins** (or **Cursor Settings****Plugins**).
24-
- Use **Add plugin** / **Install plugin**.
25-
- Enter the GitHub URL, e.g.:
26-
- `https://github.com/sonatype/sonatype-guide-cursor-plugin`, or
27-
- `sonatype/sonatype-guide-cursor-plugin`
28-
- If Cursor chat supports `/add-plugin`, you can try:
29-
- `/add-plugin sonatype/sonatype-guide-cursor-plugin`
30-
- or the full repo URL.
20+
1. **Submit the plugin** at [cursor.com/marketplace/publish](https://cursor.com/marketplace/publish) with repo URL:
21+
`https://github.com/sonatype/sonatype-guide-cursor-plugin`
22+
2. After approval, Cursor will list it on the marketplace (with a slug like `sonatype-guide`).
23+
3. **Then** users can run `/add-plugin sonatype-guide` in chat or install via **Settings → Plugins → Browse Marketplace**.
3124

32-
3. **Confirm install:** The plugin should appear in your installed plugins. Enable it if there’s a toggle.
25+
Until then, use **Option B** (local path) or **Option C** (clone into cache) below.
3326

3427
---
3528

3629
## Option B: Local install (for testing without publishing)
3730

3831
Use this to test the plugin from your machine without pushing to GitHub.
3932

40-
**Note:** Plugins added via the `local` section of `installed.json` may **not appear** in Settings → Plugins. Cursor’s UI typically lists plugins installed from the marketplace or by URL. If you need the plugin to show in the Installed list and have MCP/skills load, use **Option A (GitHub)** instead.
33+
**Note:** Plugins added via the `local` section of `installed.json` may **not appear** in Settings → Plugins. If the plugin still doesn’t show or load, try **Option C** (clone into cache) or submit to the marketplace (Option A).
4134

4235
1. **Back up Cursor’s plugin list** (optional but recommended):
4336
```bash
@@ -51,7 +44,7 @@ Use this to test the plugin from your machine without pushing to GitHub.
5144
```
5245
This script adds `sonatype-guide` to the `local` section of `~/.cursor/plugins/installed.json` (no copy to cache).
5346

54-
3. **Restart Cursor.** The plugin may still not appear under Installed; if so, install via GitHub (Option A).
47+
3. **Restart Cursor.** The plugin may still not appear under Installed.
5548

5649
4. **Uninstall (revert) when done testing:**
5750
```bash
@@ -60,6 +53,26 @@ Use this to test the plugin from your machine without pushing to GitHub.
6053

6154
---
6255

56+
## Option C: Clone into Cursor’s URL cache (experimental)
57+
58+
Cursor stores URL-installed plugins under `~/.cursor/plugins/cache/url/`. You can try copying this repo into that structure so Cursor might pick it up.
59+
60+
1. **Run the install-from-GitHub script** (clones into cache and adds to `user` list):
61+
```bash
62+
cd /Users/moliverio/projects/sonatype-guide-cursor
63+
./scripts/install-from-github-to-cache.sh
64+
```
65+
2. **Restart Cursor** and check **Settings → Plugins** for Sonatype Guide.
66+
3. If it doesn’t appear, the only reliable path is **Option A** (submit to marketplace).
67+
68+
4. **Uninstall (revert) when done testing:**
69+
```bash
70+
rm -rf ~/.cursor/plugins/cache/url/https---github-com-sonatype-sonatype-guide-cursor-plugin
71+
# Remove sonatype-guide from user array in ~/.cursor/plugins/installed.json if you added it
72+
```
73+
74+
---
75+
6376
## Verification checklist
6477

6578
After installing (A or B):

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ AI-powered dependency intelligence for Cursor. Check vulnerabilities, find safer
44

55
## Installation
66

7-
```bash
7+
**Important:** `/add-plugin` with a GitHub URL or `owner/repo` **does nothing** in Cursor (no response). Cursor only installs plugins that are on the **Cursor Marketplace**. So you must either submit this plugin at [cursor.com/marketplace/publish](https://cursor.com/marketplace/publish) first, or use a workaround below.
8+
9+
**After the plugin is on the marketplace**, in Cursor chat run:
10+
11+
```
812
/add-plugin sonatype-guide
913
```
1014

15+
**Workarounds before it’s published:**
16+
17+
- **Local / cache:** See [INSTALL_TEST.md](INSTALL_TEST.md) — Option B (local path in `installed.json`) or Option C (clone into Cursor’s plugin cache).
18+
1119
## Prerequisites
1220

1321
You need a Sonatype Guide account and API token.
26.4 KB
Loading

rules/dependency-hygiene.mdc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
name: dependency-hygiene
23
description: Proactive dependency guidance when editing package manifests. Suggests security checks before adding or updating dependencies.
34
alwaysApply: false
45
globs:

rules/security-first-deps.mdc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
name: security-first-deps
23
description: Security-focused dependency selection guidance. Prioritizes secure, well-maintained packages with compatible licenses.
34
alwaysApply: true
45
---
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
# Experimental: clone Sonatype Guide plugin into Cursor's URL cache so it might
3+
# be discovered. Cursor may only load plugins from marketplace; this is a workaround
4+
# when /add-plugin with a GitHub URL does nothing.
5+
6+
set -e
7+
CACHE="${CURSOR_PLUGINS:-$HOME/.cursor/plugins}/cache/url"
8+
SANITIZED="https---github-com-sonatype-sonatype-guide-cursor-plugin"
9+
REPO_URL="https://github.com/sonatype/sonatype-guide-cursor-plugin.git"
10+
PLUGIN_DIR="$CACHE/$SANITIZED/sonatype-guide-cursor-plugin"
11+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12+
LOCAL_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
13+
14+
echo "Target: $PLUGIN_DIR"
15+
16+
mkdir -p "$CACHE/$SANITIZED"
17+
18+
# If we're in the plugin repo and it has the manifest, copy locally (works before push)
19+
if [[ -f "$LOCAL_ROOT/.cursor-plugin/plugin.json" ]]; then
20+
echo "Using local plugin at $LOCAL_ROOT"
21+
rm -rf "$PLUGIN_DIR"
22+
cp -R "$LOCAL_ROOT" "$PLUGIN_DIR"
23+
rm -rf "$PLUGIN_DIR/.git" 2>/dev/null || true
24+
elif [[ -d "$PLUGIN_DIR/.git" ]]; then
25+
echo "Updating existing clone..."
26+
(cd "$PLUGIN_DIR" && git fetch origin && git reset --hard origin/main 2>/dev/null || git reset --hard origin/master 2>/dev/null || true)
27+
else
28+
echo "Cloning $REPO_URL ..."
29+
git clone --depth 1 "$REPO_URL" "$PLUGIN_DIR"
30+
fi
31+
32+
if [[ ! -f "$PLUGIN_DIR/.cursor-plugin/plugin.json" ]]; then
33+
echo "Error: .cursor-plugin/plugin.json not found in clone. Check repo structure."
34+
exit 1
35+
fi
36+
37+
echo "Done. Restart Cursor and check Settings → Plugins."
38+
echo "If the plugin still does not appear, submit it at https://cursor.com/marketplace/publish"

0 commit comments

Comments
 (0)