feat(cursor): automated plugin install via tarball download#395
Merged
Conversation
Replace the manual Team Marketplace URL instructions with automated
tarball-based installation, matching the opencode plugin install pattern.
`archgate plugin install --editor cursor` now downloads the Cursor
direct-install tarball from GET /api/cursor and extracts it into
~/.cursor/{skills,agents,rules}/, making archgate skills, agents, and
governance rules available globally for `cursor agent` sessions.
`archgate init --editor cursor` now writes project-level governance
files (.cursor/rules/archgate-governance.mdc + .cursor/hooks.json)
for cloud agent compatibility, and auto-installs the user-level
components when credentials are available.
Changes:
- Add installCursorPlugin() to plugin-install.ts (download + extract)
- Add mergeCursorHooks() for safe hooks.json merging
- Add cursorUserDir() path helper
- Update configureCursorSettings() to write project-level governance
- Update installForEditor/printManualInstructions for cursor
- Update tryInstallPlugin in init-project.ts for auto-install
- Update all cursor-related tests
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Deploying archgate-cli with
|
| Latest commit: |
4b8a3c0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a9cee2e0.archgate-cli.pages.dev |
| Branch Preview URL: | https://feat-cursor-direct-install.archgate-cli.pages.dev |
Contributor
Code Coverage
Full HTML report available in workflow artifacts. Per-directory breakdown
|
Cursor doesn't support user-level rule files — user rules are configured only via the Settings UI. The governance rule as a prompt-level hint can't enforce agent delegation, making it noise. Keep only .cursor/hooks.json (afterFileEdit → archgate check) which provides mechanical enforcement regardless of which agent is active. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
The plugins PR dropped the governance rule from the tarball, but the CLI still referenced ~/.cursor/rules/ in comments, JSDoc, and created the directory during install. Align with the merged plugins output: tarball contains only skills/, agents/, and hooks.json. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Adds 4 tests for installCursorPlugin matching the installOpencodePlugin pattern: success path, tar failure, 401 auth, and generic HTTP error. Fixes coverage dropping below the 90% threshold. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
DRY the tarball download+extract pattern shared by installCursorPlugin and installOpencodePlugin into a single downloadAndExtractTarball() function. Both callers now pass an options object (apiPath, token, targetDir, label, tempFile) and handle only their editor-specific post-extract logic (hooks merge for Cursor, settings config for opencode). Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Rewrites the Cursor integration guide and updates plugin/init reference
pages to reflect the new distribution model: tarball download to
~/.cursor/{skills,agents}/ instead of Team Marketplace URL + VSIX.
Key changes across all locales (en, pt-br, nb):
- Distribution: Team Marketplace + VSIX → authenticated tarball
- Generated files: .cursor/rules/archgate-governance.mdc → .cursor/hooks.json
- Skill names: architect/quality-manager → archgate-reviewer/archgate-lessons-learned
- New agents section: archgate-developer + archgate-planner
- New cloud agent support section
- Updated llms-full.txt with new Cursor content
Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Merged
rhuanbarreto
pushed a commit
that referenced
this pull request
Jun 9, 2026
# archgate ## [0.44.0](v0.43.0...v0.44.0) (2026-06-09) ### Features * **cursor:** automated plugin install via tarball download ([#395](#395)) ([41eb37e](41eb37e)) ### Bug Fixes * **opencode:** extract to config dir and clean stale files on install ([#400](#400)) ([51b41e7](51b41e7)) --- This PR was generated with [simple-release](https://github.com/TrigenSoftware/simple-release). <details> <summary>📄 Cheatsheet</summary> <br> You can configure the bot's behavior through a pull request comment using the `!simple-release/set-options` command. ### Command Format ````md !simple-release/set-options ```json { "bump": {}, "publish": {} } ``` ```` ### Useful Parameters #### Bump | Parameter | Type | Description | |-----------|------|-------------| | `version` | `string` | Force set specific version | | `as` | `'major' \| 'minor' \| 'patch' \| 'prerelease'` | Release type | | `prerelease` | `string` | Pre-release identifier (e.g., "alpha", "beta") | | `firstRelease` | `boolean` | Whether this is the first release | | `skip` | `boolean` | Skip version bump | | `byProject` | `Record<string, object>` | Per-project bump options for monorepos | #### Publish | Parameter | Type | Description | |-----------|------|-------------| | `skip` | `boolean` | Skip publishing | | `access` | `'public' \| 'restricted'` | Package access level | | `tag` | `string` | Tag for npm publication | ### Usage Examples #### Force specific version ````md !simple-release/set-options ```json { "bump": { "version": "2.0.0" } } ``` ```` #### Force major bump ````md !simple-release/set-options ```json { "bump": { "as": "major" } } ``` ```` #### Create alpha pre-release ````md !simple-release/set-options ```json { "bump": { "prerelease": "alpha" } } ``` ```` #### Publish with specific access and tag ````md !simple-release/set-options ```json { "bump": { "prerelease": "beta" }, "publish": { "access": "public", "tag": "beta" } } ``` ```` ### Access Restrictions The command can only be used by users with permissions: - repository owner - organization member - collaborator ### Notes - The last comment with `!simple-release/set-options` command takes priority - JSON must be valid, otherwise the command will be ignored - Parameters apply only to the current release execution - The command can be updated by editing the comment or adding a new one </details> <!-- Please do not edit this comment. simple-release-pull-request: true simple-release-branch-from: release simple-release-branch-to: main --> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Merged
rhuanbarreto
pushed a commit
that referenced
this pull request
Jun 10, 2026
# archgate ## [0.45.0](v0.43.0...v0.45.0) (2026-06-10) ### Features * **cursor:** automated plugin install via tarball download ([#395](#395)) ([41eb37e](41eb37e)) ### Bug Fixes * **opencode:** extract to config dir and clean stale files on install ([#400](#400)) ([51b41e7](51b41e7)) * **tests:** eliminate user-scope pollution and global module mocks in tests ([#401](#401)) ([0cff642](0cff642)) --- This PR was generated with [simple-release](https://github.com/TrigenSoftware/simple-release). <details> <summary>📄 Cheatsheet</summary> <br> You can configure the bot's behavior through a pull request comment using the `!simple-release/set-options` command. ### Command Format ````md !simple-release/set-options ```json { "bump": {}, "publish": {} } ``` ```` ### Useful Parameters #### Bump | Parameter | Type | Description | |-----------|------|-------------| | `version` | `string` | Force set specific version | | `as` | `'major' \| 'minor' \| 'patch' \| 'prerelease'` | Release type | | `prerelease` | `string` | Pre-release identifier (e.g., "alpha", "beta") | | `firstRelease` | `boolean` | Whether this is the first release | | `skip` | `boolean` | Skip version bump | | `byProject` | `Record<string, object>` | Per-project bump options for monorepos | #### Publish | Parameter | Type | Description | |-----------|------|-------------| | `skip` | `boolean` | Skip publishing | | `access` | `'public' \| 'restricted'` | Package access level | | `tag` | `string` | Tag for npm publication | ### Usage Examples #### Force specific version ````md !simple-release/set-options ```json { "bump": { "version": "2.0.0" } } ``` ```` #### Force major bump ````md !simple-release/set-options ```json { "bump": { "as": "major" } } ``` ```` #### Create alpha pre-release ````md !simple-release/set-options ```json { "bump": { "prerelease": "alpha" } } ``` ```` #### Publish with specific access and tag ````md !simple-release/set-options ```json { "bump": { "prerelease": "beta" }, "publish": { "access": "public", "tag": "beta" } } ``` ```` ### Access Restrictions The command can only be used by users with permissions: - repository owner - organization member - collaborator ### Notes - The last comment with `!simple-release/set-options` command takes priority - JSON must be valid, otherwise the command will be ignored - Parameters apply only to the current release execution - The command can be updated by editing the comment or adding a new one </details> <!-- Please do not edit this comment. simple-release-pull-request: true simple-release-branch-from: release simple-release-branch-to: main --> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the Cursor direct-install story started in archgate/plugins#114. Replaces the manual Team Marketplace URL instructions with automated tarball-based installation.
Key changes:
archgate plugin install --editor cursornow downloads the direct-install tarball fromGET /api/cursorand extracts skills, agents, rules, and hooks into~/.cursor/— matching the opencode install patternarchgate init --editor cursornow writes project-level governance files (.cursor/rules/archgate-governance.mdc+.cursor/hooks.json) for cloud agent compatibility, and auto-installs user-level components when credentials are availableinstallCursorPlugin(token)— download, extract to~/.cursor/{skills,agents,rules}/, merge hooks.jsonmergeCursorHooks()— safely merges archgate hooks into existing~/.cursor/hooks.jsonwithout overwriting user hookscursorUserDir()— path helper for~/.cursor/configureCursorSettings()— upgraded from no-op to write project-level governance rule + hooksDepends on
GET /api/cursorendpoint and generates the tarballTest plan
bun run validatepasses (1252 tests, 0 fail)archgate checkpasses (39/39 rules)knipclean (no unused exports)