Skip to content

feat(vd): add vd install cursor - #99

Merged
vanducng merged 3 commits into
mainfrom
cursor/install-cursor-a94f
Aug 22, 2026
Merged

feat(vd): add vd install cursor#99
vanducng merged 3 commits into
mainfrom
cursor/install-cursor-a94f

Conversation

@vanducng

@vanducng vanducng commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Add a first-class vd install cursor agent, then make bare vd install auto-detect local agents and install at user scope.

Why Cursor exists

Inventory already treated Cursor as a platform (PlatformCursor, ~/.cursor or $VD_CURSOR_HOME), but vd install had no Cursor target. Cursor Cloud Agents load skills from ~/.cursor/skills/ and project .cursor/skills. This is a dedicated Cursor destination, not a hidden alias of vd install codex.

Destinations (unchanged)

Scope Path
User (default) $HOME/.cursor/skills/<name>
User + $VD_CURSOR_HOME $VD_CURSOR_HOME/skills/<name>
Repo (--scope repo) .cursor/skills/<name> in the current repo

Transport matches Codex/Droid/Pi: relative symlinks on Unix, copies on Windows.

Bare vd install is now auto-detect

The numbered picker is no longer the no-arg default. vd install looks for agent homes and installs user-level into each one that exists:

Agent Present when User destination
Claude ~/.claude ~/.claude/skills via claude --dev (per-skill symlinks — the filesystem analog; not the marketplace plugin)
Codex ~/.agents or $VD_CODEX_HOME ~/.agents/skills
Cursor ~/.cursor or $VD_CURSOR_HOME ~/.cursor/skills
Droid ~/.factory ~/.factory/skills
Pi ~/.pi ~/.pi/agent/skills
  • Missing homes are skipped.
  • --scope repo / snapshot-copy are not guessed. --scope repo without an explicit agent errors (vd install cursor --scope repo).
  • Zero agents: clear error, plus the existing bootstrap-if-empty offer when no skills repo is found.
  • --pick / --interactive restores the old numbered picker.
  • --dry-run, --force, --copy, and named skills apply to every detected agent.
  • Explicit vd install cursor, vd install codex, vd install claude, etc. are unchanged.

Test plan

  • go test ./... -count=1 — all packages passed
  • vd install --dry-run with Cursor+Codex homes shows both user dests and no picker
  • vd install cursor still works
  • --scope repo without an agent is rejected
  • zero agents prints a clear message
  • Claude auto-detect uses --dev (~/.claude/skills), not the marketplace plugin
Open in Web Open in Cursor 

Install local skills into Cursor discovery paths with the same
symlink-or-copy flow as Codex, Droid, and Pi. User scope writes
$HOME/.cursor/skills (or $VD_CURSOR_HOME/skills); repo scope writes
.cursor/skills. Skills-only — no plugin or marketplace install.

Co-authored-by: Duc Nguyen <me@vanducng.dev>
@munmiu

munmiu Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

OpenCodeReview: Review complete: 0 finding(s) across 2 selected item(s).

@vanducng
vanducng marked this pull request as ready for review August 22, 2026 01:51
@munmiu

munmiu Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Result: P2 | medium | 1

What changed:

  • Adds a first-class cursor install target (internal/install/cursor.go) mirroring the Codex/Droid/Pi symlink/copy flow; user scope writes $VD_CURSOR_HOME/skills or ~/.cursor/skills, repo scope writes .cursor/skills.
  • Changes bare vd install from an interactive picker to auto-detect: new inventory.DetectInstallAgents checks ~/.claude, ~/.agents (or $VD_CODEX_HOME), ~/.cursor (or $VD_CURSOR_HOME), ~/.factory, ~/.pi, and installs user-scope skills into each; Claude uses the --dev symlink flow. The old picker stays behind --pick/--interactive.
  • Wires cursor through agent normalization, dispatch, picker entries 12-14, all expansion, variant-conflict rejection, and error strings.
  • Adds unit tests for the Cursor installer, detection, and the auto-install path (no agents, cursor-only, several agents, repo-scope rejection, copy passthrough, pick interactivity, claude dev).
  • Updates README and docs for the new agent, detection table, and…

⚠️ Open (1)

Priority Issue Location Opened
🟡 P2 Codex detection home disagrees with install destination internal/inventory/detect.go:42 0afa775

✅ Resolved (1)

Priority Issue Location Resolved
🔵 P3 Docs landing page misses the new Cursor agent README.md:32 b9437db0afa775
Review reference

Run again

  • Run locally: miucr review --pr https://github.com/vanducng/vd-cli/pull/99 -o pretty

Priority

  • P0 · immediate blocker: security, data loss, outage, or auth bypass
  • P1 · fix before merge: major breakage or no safe workaround
  • P2 · should fix soon: real defect with limited impact or workaround
  • P3 · can wait: minor defect, edge case, or maintainability risk
  • P4 · optional FYI: non-blocking suggestion or observation

Review context

  • L · estimated review size
  • full · the model saw the complete diff

Last reviewed commit 0afa775 · Review attempts: 3 · Posted by miu-cr v0.89.8

Comment thread README.md
| **OpenAI Codex** | ✅ first-class | `.agents/skills/<name>` repo-scope symlinks; `vd install codex` for user scope; prompt-context hooks via `vd install hooks` |
| **Factory Droid** | ✅ skills | `.factory/skills/<name>` repo entries (relative symlinks on Unix, copies on Windows); `vd install droid` for user scope |
| **Pi** | ✅ skills | `.pi/skills/<name>` repo entries (relative symlinks on Unix, copies on Windows); `vd install pi` for user scope |
| **Cursor** | ✅ skills | `vd install cursor` writes `$HOME/.cursor/skills/<name>` (or `$VD_CURSOR_HOME/skills`); `--scope repo` writes `.cursor/skills/<name>` (relative symlinks on Unix, copies on Windows) |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 · documentation

Docs landing page misses the new Cursor agent

The new Cursor agent is documented in README.md, docs/content/commands.md, and docs/content/usage.md, but docs/content/index.mdx (the docs site landing page that mirrors this README) was not updated.

  • Its Quick start block still ends at vd install pi with no vd install cursor step.
  • Its Supported agents table has no Cursor row and still says only "Droid and Pi support covers skills only, not plugins, hooks, extensions, or observability."

So the published docs site will not list the agent this PR adds. Was leaving docs/content/index.mdx unchanged intentional?

cursoragent and others added 2 commits August 22, 2026 02:04
Bare vd install now detects which agent homes exist and installs
skills at user scope into each one. The numbered picker moves behind
--pick / --interactive. --scope repo still requires an explicit agent.
Claude auto-detect uses --dev so skills land in ~/.claude/skills.

Co-authored-by: Duc Nguyen <me@vanducng.dev>
The site overview in docs/content/index.mdx still stopped at Pi.
Add the Cursor agent, the auto-detect vd install default, and
skills-only wording so the published docs match README.

Co-authored-by: Duc Nguyen <me@vanducng.dev>
@vanducng
vanducng merged commit 9c54cee into main Aug 22, 2026
2 checks passed
func installAgentHomes(userHome string) []InstallAgent {
return []InstallAgent{
{Name: "claude", Home: filepath.Join(userHome, ".claude")},
{Name: "codex", Home: envOr("VD_CODEX_HOME", filepath.Join(userHome, ".agents"))},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 · bug (per correctness)

Codex detection home disagrees with install destination

Detection treats $VD_CODEX_HOME as the Codex home, but the user-scope installer it triggers writes to ~/.agents/skills unconditionally: codexDest in internal/install/codex.go never reads VD_CODEX_HOME.

Two concrete failures on the new auto path:

  • VD_CODEX_HOME set to an existing dir while ~/.agents is absent: vd install reports Codex detected, then creates and populates ~/.agents/skills, a location the user's override (and inventory scanning, Service.platformRoots) never reads. Skills land where nothing discovers them.
  • VD_CURSOR_HOME-style mismatch in reverse: VD_CODEX_HOME pointing at a missing dir while ~/.agents exists causes Codex to be silently skipped even though the actual write target is present.

The Cursor pair in this same diff does it consistently: cursorHome() honors VD_CURSOR_HOME and both installAgentHomes and cursorDest share it. Droid (~/.factory), Pi (~/.pi), and Claude (~/.claude) also match. Codex is the only detection/install mismatch, and docs/content/commands.md now documents the inconsistency ("Present when: $HOME/.agents or $VD_CODEX_HOME" but destination always $HOME/.agents/skills).

Which side should move: should codexDest honor VD_CODEX_HOME like cursorHome does, or should detection use ~/.agents only?

Suggested change
{Name: "codex", Home: envOr("VD_CODEX_HOME", filepath.Join(userHome, ".agents"))},
{Name: "codex", Home: filepath.Join(userHome, ".agents")},

@vanducng
vanducng deleted the cursor/install-cursor-a94f branch August 22, 2026 02:13
@munmiu munmiu Bot mentioned this pull request Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants