Skip to content

fix(setup): wire --host cursor through bash dispatch and install path (closes #1358)#1526

Open
mvanhorn wants to merge 1 commit into
garrytan:mainfrom
mvanhorn:fix/1358-gstack-setup-host-cursor-wiring
Open

fix(setup): wire --host cursor through bash dispatch and install path (closes #1358)#1526
mvanhorn wants to merge 1 commit into
garrytan:mainfrom
mvanhorn:fix/1358-gstack-setup-host-cursor-wiring

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Summary

./setup --host cursor now works end-to-end. Skills install to ~/.cursor/skills/gstack-*/ as the README has advertised since hosts/cursor.ts shipped. Pre-fix, the bash entrypoint had no cursor case and exited with Unknown --host value: cursor.

Why this matters

The README and hosts/cursor.ts both advertise Cursor as a supported host (skills install to ~/.cursor/skills/gstack-*/), but the bash entrypoint setup never got the corresponding wiring. As a result ./setup --host cursor fails immediately with Unknown --host value: cursor, and there is no way for a Cursor user to install gstack through the documented quick-start command.

That's @hhlqsmy on #1358, tested on v1.27.1.0 7b4738b. Bug confirmed against current v1.39.1.0. The TypeScript host registry has cursor wired up in hosts/cursor.ts and hosts/index.ts; the bash glue that dispatches to per-host install logic was the missing piece.

Changes

This PR mirrors the existing opencode wiring pattern across the setup script. Cursor is an IDE host that DOES install skills (unlike openclaw/hermes/gbrain which print informational messages and exit), so it follows the opencode/factory shape, not the openclaw shape.

Touches 4 sites in setup:

  • Path vars at the top: CURSOR_SKILLS="$HOME/.cursor/skills" and CURSOR_GSTACK="$CURSOR_SKILLS/gstack".
  • Lines 87, 100, 135: cursor added to the --host expected/accept/error list. The error message at line 135 already complained about cursor not being valid; that bug now goes the other way.
  • Auto-detect at line 199: command -v cursor populates INSTALL_CURSOR=1. The if [ "$HOST" = "cursor" ] branch added at line 220.
  • Phase 1e: bun run gen:skill-docs --host cursor regenerates .cursor/skills/ when not already produced by bun run build.
  • New create_cursor_runtime_root and link_cursor_skill_dirs helpers, structurally identical to the opencode equivalents.
  • Phase 6d: INSTALL_CURSOR -eq 1 block creates the ~/.cursor/skills dir, calls the runtime root creator, and links per-skill dirs.

Testing

bun test test/gen-skill-docs.test.ts: 389 pass / 0 fail. Two new cases pin the cursor path vars and install section structure; the existing --host arg-list assertions and auto-detect assertions are updated to include cursor.

Note: PR #1326 (against related #1269 "setup for cursor is broken") is open and may overlap. If garrytan prefers that PR's approach, this one can close as superseded - I checked and #1326 is materially different (it touches different parts of setup), so this PR is additive rather than competing.

Fixes #1358.

AI was used for assistance.

Closes garrytan#1358.

Adds the missing bash side of Cursor host support that hosts/cursor.ts and the README already advertised. Mirrors the opencode wiring pattern end-to-end so 'setup --host cursor' actually installs skills to ~/.cursor/skills/gstack-*/ as the README documents.

Touches 4 sites in setup:
- Lines 87, 100, 135: cursor added to --host expected/accept/error list
- Lines 198-218: INSTALL_CURSOR variable + auto-detect ('command -v cursor') + dispatch branch
- Phase 1e: gen .cursor/ skill docs via 'bun run gen:skill-docs --host cursor'
- New create_cursor_runtime_root + link_cursor_skill_dirs helpers (opencode-shaped)
- Phase 6d: install for Cursor (mkdir + create runtime root + link skill dirs)

Plus CURSOR_SKILLS / CURSOR_GSTACK path vars at the top of setup.

test/gen-skill-docs.test.ts: 389 pass / 0 fail. Two new cases pin the cursor path vars and the install section structure; existing --host arg-list assertions updated to include cursor.

Reported by @hhlqsmy.
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 --host cursor errors out despite README + hosts/cursor.ts declaring full Cursor support

1 participant