OpenScope Packaging Guide
Step 1 — Archive, sign, and notarize in Xcode
Note: Skip the "Validate App" button in the Organizer — that's only for App Store submissions. Go straight to "Distribute App" as described below.
- Product → Archive — builds a release archive and opens the Organizer
- In the Organizer, click Distribute App
- Select Direct Distribution → click Distribute
- This is the Xcode 15+ name for Developer ID signing + automatic notarization
- ("Custom" also works but requires manually selecting the certificate type)
- Xcode signs, uploads to Apple for notarization, then prompts to export
- When asked where to save, choose the
dist/export/folder in this repo:
Xcode creates/path/to/openscope/dist/export/dist/export/OpenScope.app, already notarized and Gatekeeper-ready.
Step 2 — Build the PKG
scripts/build_pkg.sh --version 0.1.0
The script finds dist/export/OpenScope.app, auto-detects the Developer ID Installer
signing identity from your keychain, and produces dist/OpenScope-0.1.0.pkg.
If the app is at a different path:
scripts/build_pkg.sh --version 0.1.0 --app /path/to/OpenScope.app
The script will warn and prompt if the app hasn't been accepted by Gatekeeper (not notarized), giving you a chance to abort before producing a PKG pilots can't open.
Client-Only Linux Release For NemoClaw / OpenShell
To build a sandbox-side client-only release, use:
scripts/build_client_release.sh --version 0.1.0 --goos linux --goarch arm64
This produces a tarball such as:
dist/client/openscope-0.1.0-linux-arm64.tar.gz
The client archive contains only openscope. It is meant for sandboxed
NemoClaw/OpenShell environments that connect to a host or endpoint-local
openscoped broker over either:
OPENSCOPE_SOCKETOPENSCOPE_HTTP_URL
What the installer does
The PKG runs scripts/pkg/preinstall and scripts/pkg/postinstall as root:
- Stops any running
openscopeddaemon (upgrade safe) - Copies
OpenScope.appto/Applications - Installs
~/Library/LaunchAgents/com.ezblock.openscope.openscoped.plist - Starts
openscopedvialaunchctl bootstrap+kickstart - Creates
/usr/local/bin/openscopesymlink - Creates
/usr/local/bin/openscope-diagsymlink to the bundled pilot test script under/usr/local/lib/openscope/pilot/ - Installs bundled pilot assets for installation validation, including:
pilot_test.shnemoclaw_pilot_test.shrun_nemoclaw_demo_container.shsetup_nemoclaw_demo.sh- prebuilt Linux
openscopeclient binaries forarm64andamd64
- Seeds
~/.openscope/agents.yamlwith anopenclawagent andpolicies.yamlwith default Notes access plus MailInbox-only read access when those files do not already exist; existing user config is left untouched and can be reset intentionally withopenscope init --force - Seeds
/Library/Application Support/OpenScope/protected_folders.yamlwithprivateandhidden - Seeds
/Library/Application Support/OpenScope/mail_filters.yamlwith an empty sender-domain allowlist
Pilot distribution checklist
- Xcode archive + export to
dist/export/succeeds -
spctl --assess -v dist/export/OpenScope.app→accepted -
scripts/build_pkg.sh --version X.Y.Zexits cleanly -
sudo installer -pkg dist/OpenScope-X.Y.Z.pkg -target /succeeds -
openscope status && openscope doctorpass -
openscope-diagpasses on an installed system -
openscope notes list_notes --agent openclaw --folder Workreturns notes from Apple Notes
Xcode project setup
See macos/XcodeSetup.md for initial Xcode configuration. The Xcode Run Script build
phase (Bundle Go Binaries) builds openscope, openscoped, and asapple from source
during archive. No manual Go build step is needed before archiving.