Cursor & workflow

How Gary builds: an editor, a headless agent, cloud agents and the Grok CLI.

1. Cursor editor

Install from cursor.com, sign in, then open any project folder. Use ⌘L for chat/agent, ⌘K for inline edits, and keep a short rules file in the repo so the agent knows how to build.

# install the shell command: Cursor → ⌘⇧P → "Install 'cursor' command"
cursor ~/Projects/DeviceRadar

2. cursor-agent CLI (headless)

Run the agent from Terminal for one-shot jobs. -p prints the result non-interactively; --force lets it apply edits and run commands without asking.

curl https://cursor.com/install -fsS | bash
cd ~/runelite-shamegrin-hd
cursor-agent -p --force "Build with ./gradlew run and fix any compile errors"

Watch credit burn with UsageMonitor; its KILL CREDITS button stops local workers.

3. Cursor cloud agents on GitHub

Connect GitHub in Cursor settings, then launch a background agent against a repo (e.g. GitFaster/PixelDreamRush). It works on a branch such as cursor/fix-… and opens a PR to review and merge. Cloud agents keep running remotely — stop them in the Cursor agents dashboard; local kill scripts can't.

4. Grok CLI

~/.grok/bin/agent --always-approve "Deploy the static site in ./out to the dev server"

--always-approve skips confirmations — use it only in folders you trust.

Typical loop

  1. Describe the change in plain words.
  2. Agent edits, builds and runs.
  3. Review the diff, test on device, commit & push.
  4. Deploy (Xcode for iOS, scp/systemd for web).

Connectors / Integrations

CRON
every 30 min
GITHUB API
public repos
GITHUB.JSON
/data/github.json
SITE
rendered in browser

How the GitHub sync works

A server script, /usr/local/bin/devsite-github-sync, runs every 30 minutes from cron. It calls the GitHub API for user GitFaster, lists public repos only, and writes data/github.json (name, description, language, stars, last push, URL, README excerpt). The GitHub page renders that JSON in the browser.

An optional access key raises the API rate limit. It is read only from /root/.config/devsite/github_token (root-owned, mode 600, outside the web root) and sent as an Authorization: Bearer header. It is never written to the JSON, logs or pages. Without it, the public unauthenticated API is used.

# on the server, as root
nano /root/.config/devsite/github_token   # paste token, save
chmod 600 /root/.config/devsite/github_token
/usr/local/bin/devsite-github-sync   # run once now