diff --git a/.cursor-plugin/marketplace.json b/.cursor-plugin/marketplace.json new file mode 100644 index 0000000..8c61778 --- /dev/null +++ b/.cursor-plugin/marketplace.json @@ -0,0 +1,12 @@ +{ + "name": "gcore-fastedge-marketplace", + "owner": { + "name": "Gcore" + }, + "plugins": [ + { + "name": "gcore-fastedge", + "source": "./plugins/gcore-fastedge-cursor" + } + ] +} diff --git a/.github/workflows/validate-cursor-plugin.yaml b/.github/workflows/validate-cursor-plugin.yaml index 2c653a3..a371e39 100644 --- a/.github/workflows/validate-cursor-plugin.yaml +++ b/.github/workflows/validate-cursor-plugin.yaml @@ -3,13 +3,13 @@ name: Validate Cursor Plugin # Runs scripts/validate-cursor-plugin.sh on PRs that touch the Cursor plugin, # the Claude plugin it is generated from, or the generation scripts. # -# The Cursor target commits no generated files, so on a fresh checkout the -# generate -> mirror -> docs-index steps below double as a from-scratch -# bootstrap smoke test (guards the PR #90 ordering bug). +# Regenerate derived files before validation to verify source consistency and +# preserve the from-scratch bootstrap smoke test (guards the PR #90 ordering bug). on: pull_request: paths: + - ".cursor-plugin/**" - "plugins/gcore-fastedge-cursor/**" - "plugins/gcore-fastedge/**" - "scripts/validate-cursor-plugin.sh" diff --git a/README.md b/README.md index 244ca05..4a90ed8 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# Gcore FastEdge Plugin for Claude Code +# Gcore FastEdge Plugins -Build, deploy, and manage serverless WebAssembly applications on [Gcore FastEdge](https://gcore.com/fastedge) — directly from Claude Code. +Build, deploy, and manage serverless WebAssembly applications on [Gcore FastEdge](https://gcore.com/fastedge) from Claude Code, Codex, or Cursor. -FastEdge runs Wasm workloads on 210+ global edge Points of Presence with sub-millisecond cold starts. This plugin gives Claude the skills to scaffold projects, deploy apps, and manage your edge infrastructure through natural language. +FastEdge runs Wasm workloads on 210+ global edge Points of Presence with sub-millisecond cold starts. The plugins in this repository let AI coding agents scaffold projects, deploy apps, and manage edge infrastructure through natural language. -## Installation +## Claude Code Installation **Option 1: Install from GitHub (recommended)** @@ -49,7 +49,7 @@ codex plugin add gcore-fastedge@gcore-marketplace **Option 2: Install from a local clone (for development or air-gapped use)** -Clone the repo (same repo hosts both plugins): +Clone the repo (the same repository hosts all runtime targets): ```bash git clone https://github.com/G-Core/fastedge-plugin.git @@ -64,13 +64,35 @@ codex plugin add gcore-fastedge@gcore-fastedge-codex-marketplace See [docs/codex-quickstart.md](docs/codex-quickstart.md) for full Codex setup details. +## Cursor Installation + +Add this repository as a personal Cursor marketplace: + +```bash +agent plugin marketplace add https://github.com/G-Core/fastedge-plugin.git +``` + +Then run `agent`, enter `/plugin`, open the **Marketplace** tab, and install +**Gcore FastEdge** at user or project scope. Cursor currently performs plugin +installation interactively; the CLI command above registers the marketplace. + +To refresh or remove the marketplace later: + +```bash +agent plugin marketplace update gcore-fastedge-marketplace +agent plugin marketplace remove gcore-fastedge-marketplace +``` + +See [docs/cursor-quickstart.md](docs/cursor-quickstart.md) for credential setup, +team marketplace installation, and troubleshooting. + --- ## Setup ### Prerequisites -The plugin runs build, deploy, and management operations through the [FastEdge MCP server](https://github.com/G-Core/FastEdge-mcp-server) — a Docker image that ships the toolchains (Rust, Node, wasm targets) and FastEdge API client. Installing the plugin auto-loads its bundled `.mcp.json`, which launches the MCP server on demand. +The plugins run build, deploy, and management operations through the [FastEdge MCP server](https://github.com/G-Core/FastEdge-mcp-server) — a Docker image that ships the toolchains (Rust, Node, wasm targets) and FastEdge API client. Installing a plugin auto-loads its bundled MCP configuration, which launches the server on demand. You need: @@ -137,6 +159,20 @@ An `export` in your shell rc gives you a personal default across all projects. > Whatever value is in the shell when you launch `codex` is the value forwarded to the server. If a stale `GCORE_API_KEY` is exported in your rc, it will shadow everything else — unset or fix it there. +### Credentials for Cursor on macOS + +Cursor CLI inherits `GCORE_API_KEY` from the shell that launches it. The macOS +GUI does not normally inherit variables exported from `.zshrc`, so set the key +in the GUI session and restart Cursor: + +```bash +launchctl setenv GCORE_API_KEY "your-api-key" +launchctl setenv GCORE_API_BASE "https://api.gcore.com" +``` + +The Cursor plugin forwards these variables by name to the MCP Docker container; +the key is not stored in the plugin or marketplace manifest. + ### Optional: preprod testing Set `GCORE_API_BASE` (via any of the methods above) to override the API host (default: `https://api.gcore.com`; preprod: `https://api.preprod.world`). The MCP server appends `/fastedge/v1` itself. @@ -147,12 +183,13 @@ If you decline to run Docker, the deploy and manage skills can fall back to your ## Available Skills -The two plugins share the same skill set but use different command prefixes: +The three plugins share the same skill set but use different invocation styles: -| CLI | Prefix | Example | -| --------------- | ------------------------ | ------------------------------ | -| **Claude Code** | `/gcore-fastedge:` | `/gcore-fastedge:deploy` | +| CLI | Prefix | Example | +| --------------- | ------------------ | ------------------------ | +| **Claude Code** | `/gcore-fastedge:` | `/gcore-fastedge:deploy` | | **Codex** | `$gcore-fastedge:` | `$gcore-fastedge:deploy` | +| **Cursor** | `/` | `/deploy` | | Skill | Claude Code command | Description | | ------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | @@ -164,11 +201,13 @@ The two plugins share the same skill set but use different command prefixes: | **Live-test** | `/gcore-fastedge:live-test` | Build, deploy, and run scenario fixtures against the live edge | | **Docs** | Auto-invoked | FastEdge platform docs, SDK reference, and best practices | -Replace `/gcore-fastedge:` with `$gcore-fastedge:` for the equivalent Codex command. +Replace `/gcore-fastedge:` with `$gcore-fastedge:` for Codex. In Cursor, invoke +the corresponding skill as `/scaffold`, `/deploy`, `/manage`, `/test`, `/debug`, +or `/live-test`, or ask the agent naturally. ## Example Usage -Ask Claude naturally: +Ask your coding agent naturally: - **"Scaffold a new HTTP app called my-api"** — creates a TypeScript project from SDK blueprints - **"Deploy this app to FastEdge"** — builds the Wasm binary and deploys it to the edge @@ -182,6 +221,8 @@ fastedge-plugin/ ├── .claude-plugin/ │ ├── marketplace.json # Claude Code marketplace descriptor │ └── plugin.json +├── .cursor-plugin/ +│ └── marketplace.json # Cursor marketplace descriptor └── plugins/ ├── gcore-fastedge/ # Claude Code plugin │ ├── .claude-plugin/plugin.json @@ -198,10 +239,16 @@ fastedge-plugin/ │ ├── live-test/ # Verify against the deployed edge │ └── fastedge-docs/ # Auto-invoked SDK / platform docs │ └── reference/ # http/, cdn/, platform/ + SDK references - └── gcore-fastedge-codex/ # Codex plugin (shares the same MCP server) - ├── .codex-plugin/ - ├── .mcp.json + ├── gcore-fastedge-codex/ # Codex plugin (shares the same MCP server) + │ ├── .codex-plugin/ + │ ├── .mcp.json + │ ├── docs-index.json + │ └── skills/ + └── gcore-fastedge-cursor/ # Cursor plugin + ├── .cursor-plugin/plugin.json + ├── mcp.json ├── docs-index.json + ├── rules/ └── skills/ ``` diff --git a/context/PLUGIN_DISTRIBUTION.md b/context/PLUGIN_DISTRIBUTION.md index e3c0464..ab530d9 100644 --- a/context/PLUGIN_DISTRIBUTION.md +++ b/context/PLUGIN_DISTRIBUTION.md @@ -1,4 +1,4 @@ -# Plugin Distribution — One Repo, Two Marketplaces, Three Artifacts +# Plugin Distribution — One Repo, Three Marketplaces, Four Artifacts **Status:** Architectural baseline (2026-05-20). **Audience:** Maintainers; future agents implementing pipeline changes. @@ -8,7 +8,7 @@ ## Why this doc exists -`fastedge-plugin` is one repository that ships **two installable plugins** (Claude Code, Codex) and **one shared reference-docs artifact** consumed by `FastEdge-mcp-server`. The structure is intentional — explained here so future agents don't try to split the repo, duplicate the pipeline, or cross-reference between plugin folders at install time. +`fastedge-plugin` is one repository that ships **three installable plugins** (Claude Code, Codex, Cursor) and **one shared reference-docs artifact** consumed by `FastEdge-mcp-server`. The structure is intentional — explained here so future agents don't try to split the repo, duplicate the pipeline, or cross-reference between plugin folders at install time. If you're touching: distribution, marketplace descriptors, install instructions, or how the MCP server pulls reference content — read this first. @@ -20,6 +20,7 @@ If you're touching: distribution, marketplace descriptors, install instructions, fastedge-plugin/ ├── .claude-plugin/marketplace.json # Claude Code marketplace descriptor ├── .agents/plugins/marketplace.json # Codex marketplace descriptor +├── .cursor-plugin/marketplace.json # Cursor marketplace descriptor ├── plugins/ │ ├── gcore-fastedge/ # Claude plugin (source of truth for reference docs) │ │ ├── .claude-plugin/plugin.json # version: lockstep with codex @@ -29,13 +30,19 @@ fastedge-plugin/ │ │ └── skills/ │ │ ├── fastedge-docs/reference/ # reference markdown — pipeline source-of-truth │ │ └── ... -│ └── gcore-fastedge-codex/ # Codex plugin (mirrors reference docs) -│ ├── .codex-plugin/plugin.json # version: lockstep with claude -│ ├── .mcp.json # MCP server registration (loaded on install) -│ ├── docs-index.json # generated alongside Claude's at release time +│ ├── gcore-fastedge-codex/ # Codex plugin (mirrors reference docs) +│ │ ├── .codex-plugin/plugin.json # version: lockstep with claude +│ │ ├── .mcp.json # MCP server registration (loaded on install) +│ │ ├── docs-index.json # generated alongside Claude's at release time +│ │ └── skills/ +│ │ ├── fastedge-docs/reference/ # MIRRORED from Claude plugin at release time +│ │ └── ... +│ └── gcore-fastedge-cursor/ # Cursor plugin (generated from Claude) +│ ├── .cursor-plugin/plugin.json # version: lockstep with claude +│ ├── mcp.json # MCP server registration (loaded on install) +│ ├── docs-index.json # generated alongside the other targets +│ ├── rules/ │ └── skills/ -│ ├── fastedge-docs/reference/ # MIRRORED from Claude plugin at release time -│ └── ... ├── scripts/sync/ # reference-docs pipeline (the work of this repo) ├── agent-intent-skills/ # generator instructions per source repo ├── sources.json # pipeline config (v2) @@ -45,21 +52,22 @@ fastedge-plugin/ └── validate-codex-plugin.yml # structural checks for Codex plugin ``` -**Key rule:** Within the repo, the Claude plugin folder is the source of truth for reference markdown. The Codex plugin folder receives a mirror at release time. Neither plugin should read across its own folder at runtime once an end user has installed it. +**Key rule:** Within the repo, the Claude plugin folder is the source of truth for reference markdown. The Codex and Cursor plugin folders receive mirrors at release time. No plugin should read across its own folder at runtime once an end user has installed it. --- -## Three published artifacts per release +## Four published artifacts per release -A single weekly release produces three consumable outputs from the same tag (`vX.Y.Z`): +A single weekly release produces four consumable outputs from the same tag (`vX.Y.Z`): | # | Artifact | Consumer | How they get it | |---|---|---|---| | 1 | Claude plugin (`plugins/gcore-fastedge/`) | Claude Code users | `/plugin marketplace add G-Core/gcore-marketplace` → `/plugin install gcore-fastedge@gcore-marketplace` (canonical). Local/air-gapped fallback: add this repo directly → `gcore-fastedge@gcore-fastedge-marketplace` | | 2 | Codex plugin (`plugins/gcore-fastedge-codex/`) | Codex CLI users | `codex plugin marketplace add G-Core/gcore-marketplace` → `gcore-fastedge@gcore-marketplace` (canonical). Local/air-gapped fallback: add this repo directly; resolves via `.agents/plugins/marketplace.json` (`gcore-fastedge-codex-marketplace`) | -| 3 | Reference-docs tarball (`fastedge-reference-docs-vX.Y.Z.tar.gz`) | `FastEdge-mcp-server` CI | Attached to the GitHub Release. Pulled by MCP server CI on `repository_dispatch: plugin-release` | +| 3 | Cursor plugin (`plugins/gcore-fastedge-cursor/`) | Cursor users | `agent plugin marketplace add https://github.com/G-Core/fastedge-plugin.git` → interactive installation through `/plugin` | +| 4 | Reference-docs tarball (`fastedge-reference-docs-vX.Y.Z.tar.gz`) | `FastEdge-mcp-server` CI | Attached to the GitHub Release. Pulled by MCP server CI on `repository_dispatch: plugin-release` | -All three share **one version number**. `scripts/bump-version.sh` writes the same version to both `plugin.json` files in lockstep. The MCP server pins to the same `vX.Y.Z` after each release. +All four share **one version number**. `scripts/bump-version.sh` writes the same version to all three `plugin.json` files in lockstep. The MCP server pins to the same `vX.Y.Z` after each release. --- @@ -67,12 +75,18 @@ All three share **one version number**. `scripts/bump-version.sh` writes the sam ### Canonical: the central `G-Core/gcore-marketplace` repo -The documented install path for both runtimes is the central **`gcore-marketplace`** repo — a thin index that fetches this plugin **in place** via `git-subdir` (no code is copied or forked). It carries two descriptors mirroring this repo's two runtimes: +The documented install path for Claude Code and Codex is the central **`gcore-marketplace`** repo — a thin index that fetches this plugin **in place** via `git-subdir` (no code is copied or forked). It carries two descriptors mirroring this repo's corresponding runtimes: - `.claude-plugin/marketplace.json` → fetches `plugins/gcore-fastedge` from `G-Core/fastedge-plugin@main` - `.agents/plugins/marketplace.json` → fetches `plugins/gcore-fastedge-codex` from `G-Core/fastedge-plugin@main` -Both list the plugin as `gcore-fastedge` under a marketplace named `gcore-marketplace`, so the install is `gcore-fastedge@gcore-marketplace` in both CLIs. Version still comes from this repo's own `plugin.json` files (the git-subdir source resolves them). **Nothing in this repo needs to change to feed the central marketplace** — keep the two subdirs self-contained and the version fields current. +Both list the plugin as `gcore-fastedge` under a marketplace named `gcore-marketplace`, so the install is `gcore-fastedge@gcore-marketplace` in both CLIs. Version still comes from this repo's own `plugin.json` files (the git-subdir source resolves them). + +Cursor marketplace manifests only document relative plugin sources within the +same repository. They do not support Claude/Codex-style cross-repository +`git-subdir` sources. Cursor therefore indexes this repository directly through +`.cursor-plugin/marketplace.json`, which points to +`plugins/gcore-fastedge-cursor`. The two in-repo descriptors below are retained as the **local-clone / air-gapped fallback** (add this repo directly by path). They keep their original marketplace names. @@ -90,9 +104,16 @@ The two in-repo descriptors below are retained as the **local-clone / air-gapped - **Install:** Resolves `gcore-fastedge` plugin, sources from `./plugins/gcore-fastedge-codex/` per the `source.path` field. - **What ships to the user:** only files under `plugins/gcore-fastedge-codex/`. The sibling Claude folder is **not** present in the install. -### Why both descriptors can coexist +### Cursor (canonical descriptor) + +- **Descriptor:** `.cursor-plugin/marketplace.json` at the repository root. +- **Discovery:** Users run `agent plugin marketplace add https://github.com/G-Core/fastedge-plugin.git`. +- **Install:** Run `agent`, enter `/plugin`, and install `gcore-fastedge` interactively at user or project scope. +- **Source:** `./plugins/gcore-fastedge-cursor`, resolved within the same repository checkout. + +### Why all three descriptors can coexist -Claude Code's marketplace reader scans `.claude-plugin/marketplace.json`. Codex's reader scans `.agents/plugins/marketplace.json`. Different conventions, different scan paths, no collision. Each marketplace lists only the plugin its runtime can consume. +Claude Code scans `.claude-plugin/marketplace.json`, Codex scans `.agents/plugins/marketplace.json`, and Cursor scans `.cursor-plugin/marketplace.json`. Different conventions and scan paths avoid collisions. Each marketplace lists only the plugin its runtime can consume. --- @@ -135,7 +156,7 @@ Considered alternatives: | Option | Pros | Cons | Verdict | |---|---|---|---| -| **Current: one repo with both plugins + pipeline** | Single source of truth for reference content; one PR queue; pipeline writes directly to plugin folders; lockstep versioning trivial | Repo hosts two install targets — needs clear README; sibling-folder coupling must be solved via vendoring | **Chosen** | +| **Current: one repo with all plugins + pipeline** | Single source of truth for reference content; one PR queue; pipeline writes directly to plugin folders; lockstep versioning trivial | Repo hosts three install targets — needs clear README; sibling-folder coupling must be solved via generation and vendoring | **Chosen** | | Three repos: `fastedge-plugin-claude`, `fastedge-plugin-codex`, `fastedge-reference-docs` (pipeline) | Each plugin has its own marketplace URL; clean separation | Pipeline must fan out to multiple repos (3× PR review, 3× version drift risk); lockstep releases need cross-repo orchestration; coordinator-of-coordinators problem | Rejected — operational cost outweighs cosmetic benefit | | Two repos: one for plugins (both), one for pipeline | Pipeline isolation | Pipeline still has to publish to a separate repo; no real win | Rejected — adds boundary without separation of concern | @@ -147,9 +168,9 @@ If we ever want to split, the natural seam is pulling the pipeline into its own | Belongs here | Belongs elsewhere | |---|---| -| Both plugin folders + skills + reference docs | Source repos' own examples (consumed by pipeline) | +| All plugin folders + skills + reference docs | Source repos' own examples (consumed by pipeline) | | Sync pipeline scripts + workflows | MCP server implementation (`FastEdge-mcp-server` repo) | -| Marketplace descriptors (both runtimes) | MCP server's `repository_dispatch` consumer (lives in MCP repo) | +| Marketplace descriptors (all runtimes) | MCP server's `repository_dispatch` consumer (lives in MCP repo) | | Release workflow + version bumper | Docker image rebuild logic (lives in MCP repo) | | Reference-docs artifact emission | npm packages (none of the plugins are npm-published) | @@ -157,9 +178,11 @@ If you find yourself wanting to add a Docker file, an MCP tool definition, or an --- -## README updates owed +## Installation documentation -`README.md` and `docs/quickstart.md` were written when only the Claude plugin existed. They need a pass to add Codex install instructions and clarify the dual-runtime model. Track under `REFERENCE_ARTIFACT_PIPELINE.md` Task 7. +Runtime-specific installation guides live in `docs/quickstart.md`, +`docs/codex-quickstart.md`, and `docs/cursor-quickstart.md`. Keep the root README +and each plugin README aligned with those guides when marketplace behavior changes. --- @@ -180,7 +203,8 @@ If you find yourself wanting to add a Docker file, an MCP tool definition, or an | Date | Decision | Rationale | |---|---|---| -| 2026-05-20 | Keep `fastedge-plugin` as a single repo hosting both plugins + pipeline | Pipeline-driven content is the core asset; splitting fans out the pipeline with no real separation gain | +| 2026-05-20 | Keep `fastedge-plugin` as a single repo hosting all plugins + pipeline | Pipeline-driven content is the core asset; splitting fans out the pipeline with no real separation gain | +| 2026-08-04 | Add a repository-local Cursor marketplace descriptor | Cursor marketplace sources are relative paths; indexing this repo directly avoids unsupported cross-repository sources | | 2026-05-20 | Reference docs ship as a GitHub Release tarball attachment, not npm | MCP server CI can pin and download by tag; npm publish adds an account/credential surface for marginal benefit | | 2026-05-20 | Codex plugin gets vendored reference docs (not runtime fetch) | Plugins must be offline-functional after install; runtime fetch adds a failure mode for no real win | | 2026-05-20 | Plugin version and reference-doc artifact version are the same string | One coordinate to reason about; MCP server pins to `vX.Y.Z` and that pin means "this exact plugin release + this exact docs content" | diff --git a/docs/INDEX.md b/docs/INDEX.md index d73f514..9603976 100644 --- a/docs/INDEX.md +++ b/docs/INDEX.md @@ -6,6 +6,7 @@ AI plugin repository for Gcore FastEdge. - Claude plugin: `plugins/gcore-fastedge` - Codex plugin: `plugins/gcore-fastedge-codex` +- Cursor plugin: `plugins/gcore-fastedge-cursor` ## Documentation @@ -13,6 +14,7 @@ AI plugin repository for Gcore FastEdge. |----------|----------|-------------| | [Quickstart](quickstart.md) | Claude users | Install Claude plugin and run first skills | | [Codex Quickstart](codex-quickstart.md) | Codex users | Configure Codex MCP + local indexed docs flow | +| [Cursor Quickstart](cursor-quickstart.md) | Cursor users | Install the GitHub marketplace and configure credentials | | [README](../README.md) | Users | Main plugin overview | | [CLAUDE.md](../CLAUDE.md) | Developers | Repository structure and maintenance guide | | [Context Index](../context/CONTEXT_INDEX.md) | Developers | Discovery guide for context docs | @@ -25,6 +27,7 @@ Reference docs are generated in `plugins/gcore-fastedge/skills/*/reference/` and This is the single source of truth consumed by Claude plugin, Codex plugin, and MCP server sync. -Codex marketplace metadata lives at: +Marketplace metadata lives at: - `.agents/plugins/marketplace.json` +- `.cursor-plugin/marketplace.json` diff --git a/docs/cursor-quickstart.md b/docs/cursor-quickstart.md new file mode 100644 index 0000000..f53a0fe --- /dev/null +++ b/docs/cursor-quickstart.md @@ -0,0 +1,105 @@ +# Cursor Quickstart + +## Prerequisites + +- [Cursor CLI](https://cursor.com/docs/cli/installation) installed +- Docker running locally +- A Gcore account with FastEdge activated +- A Gcore API key from the [Gcore portal](https://portal.gcore.com/api-keys) + +The plugin starts `ghcr.io/g-core/fastedge-mcp-server:latest` on demand. The +container provides the FastEdge build toolchains and API client. + +## Configure Credentials + +Cursor CLI inherits environment variables from its shell: + +```bash +export GCORE_API_KEY="your-api-key" +export GCORE_API_BASE="https://api.gcore.com" +``` + +On macOS, Cursor launched from Finder or the Dock does not normally inherit +variables exported from `.zshrc`. Set them in the GUI session, then fully quit +and reopen Cursor: + +```bash +launchctl setenv GCORE_API_KEY "your-api-key" +launchctl setenv GCORE_API_BASE "https://api.gcore.com" +``` + +The marketplace and plugin manifests contain no credentials. The plugin passes +the two variables by name to the MCP Docker container. + +## Personal Installation + +Add the GitHub repository as a Cursor marketplace: + +```bash +agent plugin marketplace add https://github.com/G-Core/fastedge-plugin.git +``` + +To test a particular branch, tag, or commit, add `--git-ref `. + +Start Cursor CLI: + +```bash +agent +``` + +Enter `/plugin`, open the **Marketplace** tab, select **Gcore FastEdge**, and +install it at user or project scope. Cursor currently installs the plugin +interactively after the marketplace has been registered. + +## Team Installation + +Cursor Teams and Enterprise administrators can distribute the plugin from the +same GitHub repository: + +1. Open **Dashboard → Plugins**. +2. Select **Add Marketplace → Import from Repo**. +3. Enter `https://github.com/G-Core/fastedge-plugin`. +4. Configure access groups and choose Default Off, Default On, or Required. + +Team marketplace import is a Teams/Enterprise feature. Personal marketplaces use +the CLI flow above. + +## Verify the Installation + +List registered marketplaces: + +```bash +agent plugin marketplace list +``` + +Open a FastEdge project in Cursor and ask: + +```text +How does the FastEdge KV store work? +``` + +The plugin should load FastEdge documentation through its MCP server. Docker +should show a running `ghcr.io/g-core/fastedge-mcp-server` container after the +first tool call. + +## Update or Remove + +```bash +agent plugin marketplace update gcore-fastedge-marketplace +agent plugin marketplace remove gcore-fastedge-marketplace +``` + +Use `/plugin` to manage the installed plugin itself. + +## Troubleshooting + +- **`GCORE_API_KEY is required`**: the key did not reach the Cursor process. + Configure it before launching Cursor and restart the application. +- **`401 Invalid API token`**: replace the expired or invalid API key, then + restart Cursor so the MCP container receives the new value. +- **`403 FastEdge ... is not fully activated`**: the key is valid, but FastEdge + is not enabled for the account. Contact the account administrator. +- **MCP server not starting**: verify Docker is running and can pull from + `ghcr.io`. +- **Wrong MCP server starts**: check for another `fastedge-assistant` entry in + personal Cursor MCP configuration and rename the duplicate. diff --git a/docs/quickstart.md b/docs/quickstart.md index 8d1d7d1..a4ccd7c 100644 --- a/docs/quickstart.md +++ b/docs/quickstart.md @@ -18,7 +18,7 @@ From inside Claude Code, add the Gcore marketplace from GitHub and install: /plugin install gcore-fastedge@gcore-marketplace ``` -This persists across sessions. For a local-clone or air-gapped install, see the [README](../README.md#installation). +This persists across sessions. For a local-clone or air-gapped install, see the [README](../README.md#claude-code-installation). ## Create Your First App diff --git a/plugins/gcore-fastedge-cursor/README.md b/plugins/gcore-fastedge-cursor/README.md index f6de149..8116d90 100644 --- a/plugins/gcore-fastedge-cursor/README.md +++ b/plugins/gcore-fastedge-cursor/README.md @@ -9,6 +9,40 @@ This is the **third target** alongside the Claude Code (`gcore-fastedge`) and Co same [FastEdge MCP server](https://github.com/G-Core/FastEdge-mcp-server); only the manifest/packaging differs per CLI. +## Install from GitHub + +Add this repository as a personal Cursor marketplace: + +```bash +agent plugin marketplace add https://github.com/G-Core/fastedge-plugin.git +``` + +Then run `agent`, enter `/plugin`, open the **Marketplace** tab, and install +**Gcore FastEdge** at user or project scope. + +The marketplace follows the repository's default branch. Pin a branch, tag, or +commit when testing a specific release: + +```bash +agent plugin marketplace add \ + https://github.com/G-Core/fastedge-plugin.git \ + --git-ref main +``` + +Refresh or remove the marketplace with: + +```bash +agent plugin marketplace update gcore-fastedge-marketplace +agent plugin marketplace remove gcore-fastedge-marketplace +``` + +Cursor Teams and Enterprise administrators can instead import the same repository +from **Dashboard → Plugins → Add Marketplace → Import from Repo**, then configure +the plugin as Default Off, Default On, or Required. + +See the [Cursor quickstart](../../docs/cursor-quickstart.md) for prerequisites, +credentials, installation verification, and troubleshooting. + ## Layout ``` @@ -47,18 +81,18 @@ API calls succeeded). The only wrinkle is getting the vars **into** Cursor's environment in the first place — on macOS-GUI that means `launchctl setenv` (see gotcha #1 below), not a missing manifest declaration. -## Local testing (no publish needed) +## Local development -On a fresh clone this folder is mostly empty — the `skills/*/SKILL.md`, the -`rules/*.mdc` knowledge rule, and `reference/` are generated at release time -(gitignored on `main`). Materialize them first: +Generated skills, rules, reference files, and `docs-index.json` are committed in +release snapshots. Regenerate them after changing the Claude source files: ```bash node scripts/sync/generate-cursor-plugin.mjs bash scripts/sync/mirror-reference.sh gcore-fastedge-cursor +bash scripts/sync/generate-docs-index.sh ``` -Then load it as a local plugin: symlink (or copy) this folder into +Load the working tree as a local plugin by symlinking (or copying) this folder into `~/.cursor/plugins/local/`, then fully restart Cursor. ```bash @@ -99,5 +133,6 @@ should appear in `docker ps` once a FastEdge tool is used. ## Publishing -Requires a **public** repo. Submit at https://cursor.com/marketplace/publish. -Blocked on the same SecOp review as making this repo public. +The GitHub marketplace installation above does not publish the plugin to Cursor's +official public marketplace. Official publication requires the public repository +to be submitted for review at https://cursor.com/marketplace/publish. diff --git a/scripts/validate-cursor-plugin.sh b/scripts/validate-cursor-plugin.sh index 4039f8f..b01749e 100755 --- a/scripts/validate-cursor-plugin.sh +++ b/scripts/validate-cursor-plugin.sh @@ -21,6 +21,7 @@ Usage: bash scripts/validate-cursor-plugin.sh Checks: - Required committed and generated files exist (see header for generators) + - marketplace.json exposes the Cursor plugin from the repository root - plugin.json is valid; name and version in lockstep with the Claude plugin - mcp.json declares the fastedge-assistant docker server config - every Claude skill has a generated Cursor SKILL.md (frontmatter + no @@ -45,6 +46,7 @@ command -v jq >/dev/null 2>&1 || { echo "ERROR: jq is required but not found. In CLAUDE_DIR="${REPO_ROOT}/plugins/gcore-fastedge" PLUGIN_DIR="${REPO_ROOT}/plugins/gcore-fastedge-cursor" +MARKETPLACE_JSON="${REPO_ROOT}/.cursor-plugin/marketplace.json" PLUGIN_JSON="${PLUGIN_DIR}/.cursor-plugin/plugin.json" MCP_JSON="${PLUGIN_DIR}/mcp.json" RULE_MDC="${PLUGIN_DIR}/rules/fastedge-knowledge.mdc" @@ -61,6 +63,7 @@ check_file() { GENERATE_HINT="run: node scripts/sync/generate-cursor-plugin.mjs && bash scripts/sync/mirror-reference.sh gcore-fastedge-cursor && bash scripts/sync/generate-docs-index.sh" +check_file "$MARKETPLACE_JSON" check_file "$PLUGIN_JSON" check_file "$MCP_JSON" check_file "${PLUGIN_DIR}/README.md" @@ -71,11 +74,19 @@ ok "Required committed files exist" [[ -f "$DOCS_INDEX_JSON" ]] || err "Missing generated docs-index: $DOCS_INDEX_JSON — $GENERATE_HINT" ok "Generated files exist" +jq empty "$MARKETPLACE_JSON" >/dev/null || err "Invalid JSON: $MARKETPLACE_JSON" jq empty "$PLUGIN_JSON" >/dev/null || err "Invalid JSON: $PLUGIN_JSON" jq empty "$MCP_JSON" >/dev/null || err "Invalid JSON: $MCP_JSON" jq empty "$DOCS_INDEX_JSON" >/dev/null || err "Invalid JSON: $DOCS_INDEX_JSON" ok "JSON files parse" +marketplace_name="$(jq -r '.name // empty' "$MARKETPLACE_JSON")" +[[ "$marketplace_name" == "gcore-fastedge-marketplace" ]] || err "marketplace.json name must be gcore-fastedge-marketplace (got: ${marketplace_name:-})" + +marketplace_plugin_count="$(jq '[(.plugins // [])[] | select(.name == "gcore-fastedge" and .source == "./plugins/gcore-fastedge-cursor")] | length' "$MARKETPLACE_JSON")" +[[ "$marketplace_plugin_count" -eq 1 ]] || err "marketplace.json must expose gcore-fastedge from ./plugins/gcore-fastedge-cursor exactly once" +ok "marketplace.json Cursor plugin source valid" + plugin_name="$(jq -r '.name' "$PLUGIN_JSON")" [[ "$plugin_name" == "gcore-fastedge" ]] || err "plugin.json name must be gcore-fastedge (got: $plugin_name)"