nerve_bridge
Bi-directional control of Trae via macOS AppleScript with built-in feedback mechanism. Use when needing to execute code/commands in Trae IDE and wait for completion confirmation.
- License 许可
- MIT
- 最近更新
- 2026-06-10
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- nerve_bridge
- metadata
- { "openclaw": { "emoji": "⚡️", "install": [ { "id": "system", "kind": "system", "label": "macOS System Environment", "description": "Depends on system Python and AppleScript. No extra installation required." } ], "requires": { "bins": [ "python3", "osascript" ] } } }
- description
- Bi-directional control of Trae via macOS AppleScript with built-in feedback mechanism. Use when needing to execute code/commands in Trae IDE and wait for completion confirmation.
03 SKILL.md 正文
Nerve Bridge (v2)
Direct neural link to Trae with closed-loop feedback via macOS AppleScript.
Quick Start
Send instruction and wait for confirmation:
python3 nerve_bridge.py "<instruction>"
Example:
python3 nerve_bridge.py "Create a new Python file and add a simple 'Hello World' function. After creating, add a print statement to test it."
How It Works
-
Signal Injection:
- Payload is copied to system clipboard via
pbcopy - AppleScript activates Trae and simulates: Space (wake) → Delete → Cmd+V → Enter
- Payload is copied to system clipboard via
-
Feedback Loop:
- Instruction must include a Python hook that writes to
~/.openclaw/workspace/trae_feedback.jsonwhen done - Script waits up to 5 minutes (300 seconds) for the signal file
- Returns JSON feedback when received
- Instruction must include a Python hook that writes to
Required Hook Pattern
When crafting instructions, include this pattern at the end:
import json, time
with open("~/.openclaw/workspace/trae_feedback.json", "w") as f:
json.dump({"status": "success", "timestamp": time.time()}, f)
Environment
- Platform: macOS only
- Dependencies: System Python (
python3), AppleScript (osascript) - Permissions: System Events and Terminal must have "Accessibility" permissions
- Output File:
~/.openclaw/workspace/trae_feedback.json(created by the script)
Troubleshooting
- No output from Trae: Check if Trae window is active and input is focused
- Timeout: Trae didn't complete within 5 minutes
- Permission denied: macOS may need to grant Terminal System Events permission
04 同仓库更多 Skills
youtube-content
YouTube transcripts to summaries, threads, blogs.
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
touchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.