Shortcuts Bridge for Codex
Use this skill to run macOS Shortcuts through shortcuts_bridge.py.
Use the bundled CLI client for all requests:
shortcuts-bridge-codex-skill/scripts/bridge_client.py
Prerequisites
- •Create local config (private, gitignored):
bash
cp shortcuts_bridge.config.example.json shortcuts_bridge.local.json
- •Edit
shortcuts_bridge.local.jsonand set:
- •
allowed_shortcuts - •
savefile_path - •Optional hardening:
- •set
auth_token - •keep
allow_remote_clientsasfalse - •keep
enable_savefileasfalseunless required - •keep
cors_allowed_originsempty unless browser-based calls are required
- •set
- •Start the bridge server:
bash
python3 shortcuts_bridge.py
Server URL: http://127.0.0.1:9876
Step 1: Check Bridge Health and Allowed Shortcuts
Run:
bash
python3 shortcuts-bridge-codex-skill/scripts/bridge_client.py health
If auth_token is configured, first run:
bash
export SHORTCUTS_BRIDGE_TOKEN="your-token"
Only execute shortcuts listed in allowed_shortcuts.
Step 2: Trigger a Shortcut
Run:
bash
python3 shortcuts-bridge-codex-skill/scripts/bridge_client.py run \ --shortcut "SendText" \ --input "Running 10 minutes late"
This calls POST /run with shortcut and optional input.
Step 3: Save a File (Optional)
Run:
bash
python3 shortcuts-bridge-codex-skill/scripts/bridge_client.py savefile \ --filename "report.pdf" \ --from-file "/absolute/path/to/report.pdf"
This calls POST /savefile with base64 file data.
Step 4: Report Result
Success payload contains:
- •
success: true - •
shortcut - •
output(if any)
Failure payload contains:
- •
success: false - •
error - •
allowed(when shortcut is not allowlisted)
Troubleshooting
- •
Connection refused: startshortcuts_bridge.py. - •
not allowlisted: add shortcut name toallowed_shortcutsinshortcuts_bridge.local.json, then restart server. - •timeout/failure: test shortcut manually in Shortcuts.app and verify the shortcut accepts text input when required.
- •JSON fields differ from expectation: trust live
/healthoutput over stale docs.