Fix: install by name always fetches from GitHub (#180)

* feat(cursor): add Cursor CLI as target provider

Add converter, writer, types, and tests for converting Claude Code
plugins to Cursor-compatible format (.mdc rules, commands, skills,
mcp.json). Agents become Agent Requested rules (alwaysApply: false),
commands are plain markdown, skills copy directly, MCP is 1:1 JSON.

* docs: add Cursor spec and update README with cursor target

* chore: bump CLI version to 0.5.0 for cursor target

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: note Cursor IDE + CLI compatibility in README

* fix: install by name always fetches from GitHub

Previously, `install compound-engineering` would resolve to any local
directory named `compound-engineering` in the current working directory
before trying GitHub. This broke installs when users had a same-named
directory that wasn't a valid plugin.

Now bare names always go to GitHub. Only explicit paths (starting with
./ or / or ~) are treated as local paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Kieran Klaassen
2026-02-12 15:24:58 -06:00
committed by GitHub
parent 0aaca5a7a7
commit 20446e9add
2 changed files with 70 additions and 5 deletions

View File

@@ -131,12 +131,15 @@ type ResolvedPluginPath = {
}
async function resolvePluginPath(input: string): Promise<ResolvedPluginPath> {
const directPath = path.resolve(input)
if (await pathExists(directPath)) return { path: directPath }
const pluginsPath = path.join(process.cwd(), "plugins", input)
if (await pathExists(pluginsPath)) return { path: pluginsPath }
// Only treat as a local path if it explicitly looks like one
if (input.startsWith(".") || input.startsWith("/") || input.startsWith("~")) {
const expanded = expandHome(input)
const directPath = path.resolve(expanded)
if (await pathExists(directPath)) return { path: directPath }
throw new Error(`Local plugin path not found: ${directPath}`)
}
// Otherwise, always fetch the latest from GitHub
return await resolveGitHubPluginPath(input)
}