GitHub in Cursor.
Cursor can work on code and pull requests, but only in the GitHub repos you pick. This is for Cursor on your own Mac or Linux computer.
passed Nov 16 · GitHub CLI
fieldtrip add ghNew to fieldtrip? Install it first: curl -fsSL fieldtrip.sh/install | sh
Cursor can
- Read and write code.
- Open and update pull requests.
Can't do
- Change your settings or billing.
- Touch repos you didn't pick.
Try asking Cursor
Paste one into Cursor. Underneath: what it runs.
What pull requests are open on my-app?
gh pr list --repo you/my-appShow me what pull request 12 changes.
gh pr diff 12Open a pull request for this branch.
gh pr create --title "…" --body "…"Make a release called v1.0 with this zip.
gh release create v1.0 app.zip
How it’s set up for Cursor
| the key | Cursor has no settings file for keys, so the key stays in fieldtrip's own locked file. Cursor's AI runs each gh command through fieldtrip, which adds the key for that one command and nothing else. |
|---|---|
| the note | Saved as a skill in ~/.claude/skills/gh and ~/.agents/skills/gh; Cursor reads both. It also tells Cursor to run gh through fieldtrip. It says how to use GitHub, and what to check with you about first. |
| after setup | Nothing to restart for the key. If Cursor doesn't seem to know about GitHub yet, start a new chat. |
| two checks | Cursor can ask before it runs a command, depending on your settings. fieldtrip's note adds a check that doesn't depend on them. |
| check it | Ask Cursor on your computer to run fieldtrip doctor. It should say “Running in Cursor” and show a ✓ beside GitHub. |
Do this once.
- Make a fine-grained key on GitHub, for only the repos you want your AI to access. fieldtrip will give you the link and tell you which boxes to tick, and why.
- Paste your key when fieldtrip asks you to.
Your key goes into your Terminal when fieldtrip asks. It never goes through Cursor’s chat.
Checked every night
Yes. GitHub 2.104.0 passed all five checks, Mon, Nov 16 · 11:09 AM CST.
Each square is one night.
Other AIs
← All of GitHub: every AI, every version · GitHub in Claude Code → · GitHub in Codex → · What’s a CLI?