Skip to content

Remove jq and git endpoint dependencies#13

Open
sibicramesh wants to merge 1 commit into
mainfrom
remove-jq-git-endpoint-deps
Open

Remove jq and git endpoint dependencies#13
sibicramesh wants to merge 1 commit into
mainfrom
remove-jq-git-endpoint-deps

Conversation

@sibicramesh

Copy link
Copy Markdown
Contributor

Why

The Cursor runner failed on stock macOS endpoints under an MDM:

  • xcode-select: error: No developer tools were found …/usr/bin/git is a Command Line Tools stub that can't self-install in a headless (no-GUI) root session.
  • render.sh: error: jq is requiredjq isn't present without Homebrew.

Both dependencies are now removed, so render.sh/runner.sh run with only tools that ship with macOS and Linux.

What changed

  • runner.sh — fetches the repo tarball via curl + tar from codeload.github.com/.../tar.gz/$REF instead of git init/fetch/checkout. Same source of truth and REF pinning; only the transport changed.
  • render.sh — builds config JSON with printf + a small awk/sed JSON escaper instead of jq. Output matches jq's pretty-print byte-for-byte.
  • render-plist.sh — builds the profile envelope with printf and lets plutil parse + convert it (which also validates), dropping jq. plutil stays (macOS-native, required to emit a real profile).
  • examples/claude/settings.windows.json — regenerated (it was stale vs. even the previous generator).
  • Docs — prerequisites now state each script's real requirements (curl+tar, plutil, sh+awk+sed).

Verification

  • All five examples/ reproduce byte-for-byte from the rewritten scripts, run under a system-only PATH (/usr/bin:/bin:/usr/sbin:/sbin) to prove no jq/git/Homebrew.
  • Semantic equivalence to the old jq output confirmed across every agent × OS combination, including hostile credentials/--env values (quotes, backslash, $, spaces).
  • sh -n clean; bad-input paths still reject with a nonzero exit.

No behavior change to the generated configs — only the tooling used to produce them.

The runner failed on stock macOS endpoints: /usr/bin/git is an Xcode CLT
stub that dies headless (no GUI session), and jq isn't present without
Homebrew. Both are now gone, so render/runner work with only system tools.

- runner.sh: fetch the repo tarball via curl + tar (codeload) instead of
  git init/fetch/checkout.
- render.sh: build config JSON with printf + a small awk/sed escaper instead
  of jq; output matches jq's pretty-print byte-for-byte.
- render-plist.sh: build the profile envelope with printf and let plutil parse
  + convert it (plutil also validates), dropping jq. plutil stays (macOS-native).
- Regenerated examples/claude/settings.windows.json (was stale vs the generator).
- Docs: state each script's real prerequisites.

All five examples reproduce byte-for-byte from the rewritten scripts under a
system-only PATH.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.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.

1 participant