Skip to content

fix: support cursor host in setup#1326

Open
cropsgg wants to merge 1 commit intogarrytan:mainfrom
cropsgg:fix-cursor-setup-host
Open

fix: support cursor host in setup#1326
cropsgg wants to merge 1 commit intogarrytan:mainfrom
cropsgg:fix-cursor-setup-host

Conversation

@cropsgg
Copy link
Copy Markdown

@cropsgg cropsgg commented May 5, 2026

Summary

This PR makes the documented ./setup --host cursor install path work as a first-class host install.

The README already lists Cursor as supported and documents skills installing under ~/.cursor/skills/gstack-*/, but the setup script rejected cursor during host validation with:

Unknown --host value: cursor

That made the documented install path unusable even though the repo already has Cursor host generation config in hosts/cursor.ts.

Related issues:

What changed

  • Added cursor to the accepted --host values and error messages.
  • Added Cursor install flags and path constants:
    • ~/.cursor/skills
    • ~/.cursor/skills/gstack
  • Added optional auto-detection via command -v cursor, while preserving the existing fallback behavior when no hosts are detected.
  • Generate Cursor-specific skill docs with bun run gen:skill-docs --host cursor when Cursor install is selected.
  • Added a minimal Cursor runtime root at ~/.cursor/skills/gstack with only runtime assets and root skill files:
    • bin
    • browse/dist
    • browse/bin
    • selected review/*.md runtime files
    • ETHOS.md
    • root SKILL.md
    • gstack-upgrade/SKILL.md
  • Added link_cursor_skill_dirs() to link generated Cursor skills from .cursor/skills/gstack-* into ~/.cursor/skills/.
  • Added a repo-local .cursor/skills/gstack sidecar for generated Cursor skills, matching the existing runtime-root pattern while avoiding recursive duplicate skill discovery.

A key detail here is that Cursor installs now use the Cursor-generated skill docs, not Codex-generated docs. I checked this carefully because Codex docs set defaults like ~/.codex/skills/gstack; Cursor skills need their preamble and repo-local fallback to resolve through ~/.cursor/skills/gstack and .cursor/skills/gstack.

Why this shape

Cursor's skill layout is very close to the existing generated-host flow, but it needs its own install target and generated host output. The implementation follows the same setup-script structure already used by Codex, Factory, and OpenCode:

  • one INSTALL_CURSOR flag
  • one runtime-root creation helper
  • one generated-skill linking helper
  • one install block
  • one sidecar setup path for generated skills

The runtime root intentionally does not symlink the entire review/ or qa/ directories, because those source directories contain SKILL.md files. Exposing them through the runtime root could create duplicate skill discovery. Instead, the installer links only the runtime markdown files that skills read directly.

Local verification

Verified on my laptop from this repo checkout.

Commands run:

bash -n setup
GSTACK_SKIP_COREUTILS=1 ./setup --host cursor
GSTACK_SKIP_COREUTILS=1 ./setup --host auto

Manual install checks:

ls -la ~/.cursor/skills/
ls -la ~/.cursor/skills/gstack/

Additional checks performed:

  • Confirmed ./setup --host cursor exits successfully and prints gstack ready (cursor).
  • Confirmed ~/.cursor/skills contains the generated gstack-* skill links.
  • Confirmed 45 gstack-* Cursor skill directories are present.
  • Confirmed every installed Cursor skill has a SKILL.md.
  • Confirmed installed Cursor skill links point to .cursor/skills/..., not .agents/skills/....
  • Confirmed a generated Cursor skill preamble resolves to ~/.cursor/skills/gstack and repo-local .cursor/skills/gstack, not Codex paths.
  • Confirmed runtime assets exist under ~/.cursor/skills/gstack:
    • bin
    • browse/dist
    • browse/bin
    • review/checklist.md
    • review/design-checklist.md
    • review/greptile-triage.md
    • review/TODOS-format.md
    • ETHOS.md
    • SKILL.md
    • gstack-upgrade/SKILL.md
  • Confirmed there is no duplicate review/SKILL.md or qa/SKILL.md exposed under the global runtime root.
  • Confirmed there is no duplicate review/SKILL.md or qa/SKILL.md exposed under the repo-local .cursor/skills/gstack runtime sidecar.
  • Confirmed ./setup --host auto still runs successfully.

Notes

I did not add Slate support here. This PR is intentionally scoped to the documented Cursor install path and the open Cursor setup issue.

Enable the documented Cursor install path by wiring setup to generate Cursor-specific skills and install them under ~/.cursor/skills with a minimal gstack runtime root.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

setup for cursor is broken.

1 participant