-- launch-ori.applescript — start (or restart) the "ori" sandbox, wait for the-- ori server to answer on the published host port, then open ori-desktop.---- Run from a terminal: osascript scripts/launch-ori.applescript-- Build a double-clickable app:-- osacompile -o "scripts/Launch Ori.app" scripts/launch-ori.applescript---- The repository root is derived from this file's location (<repo>/scripts/…);-- set repoDirOverride if you move the script or the compiled app elsewhere.propertysandboxName:"ori"propertytemplateRef:"k33g/ori:0.0.2"propertykitPath:"./kits/ori"propertyhostPort:5555propertysandboxPort:8888propertyhealthTimeoutSeconds:90propertydesktopAppRelPath:"ori-desktop/build/bin/ori-desktop.app"propertyrepoDirOverride:""onrunsetrepoDirtomyresolveRepoDir()-- Finder / Spotlight launches get a minimal PATH without Homebrew.setshellPrefixto"export PATH=/opt/homebrew/bin:/usr/local/bin:$PATH; cd ""ed formofrepoDir&"; "setserverURLto"http://localhost:"&hostPortsetappPathtorepoDir&"/"&desktopAppRelPathtrydo shell script"test -d ""ed formofappPathonerrordisplay alert"ori-desktop.app not found"message"Expected at:"&return&appPath&return&return&"Build it first:"&return&"cd ori-desktop && wails build && xattr -cr build/bin/ori-desktop.app"ascriticalreturnendtryifmysandboxExists(shellPrefix)then-- `sbx run -d --name ori` restarts a stopped sandbox without attaching.-- If it is already running sbx may complain; the health check below-- decides whether that matters, so we only notify here.displaynotification"Restarting existing sandbox “"&sandboxName&"”…"withtitle"Ori"trydo shell scriptshellPrefix&"sbx run -d --name ""ed formofsandboxNameonerrorerrMsgdisplaynotification"sbx run --name: "&errMsgwithtitle"Ori"endtryelsedisplaynotification"Creating sandbox “"&sandboxName&"” from "&templateRef&"…"withtitle"Ori"trydo shell scriptshellPrefix&"sbx run -d claude . --template ""ed formoftemplateRef&" --kit ""ed formofkitPath&" --name ""ed formofsandboxName&" -p "&hostPort&":"&sandboxPort&"/tcp"onerrorerrMsgdisplay alert"sbx run failed"messageerrMsg&return&return&"Is Docker Desktop running?"ascriticalreturnendtryendififmywaitForServer(serverURL)thendisplaynotification"Server ready at "&serverURLwithtitle"Ori"elsedisplaynotification"No answer on "&serverURL&"/healthz after "&healthTimeoutSeconds&" s — opening the app anyway. Check: sbx exec ori cat /var/log/sbx-kit-startup.log"withtitle"Ori"endifdo shell script"open ""ed formofappPathendrun-- <repo>/scripts/<this file or app> → <repo>onresolveRepoDir()ifrepoDirOverrideis not""thenreturnrepoDirOverridesetscriptPathtoPOSIXpathof(path tome)returndo shell script"d=""ed formofscriptPath&"; d=${d%/}; cd \"$(dirname \"$d\")/..\" && pwd"endresolveRepoDironsandboxExists(shellPrefix)setnamestodo shell scriptshellPrefix&"sbx ls -q 2>/dev/null || true"return(paragraphsofnames)containssandboxNameendsandboxExists-- Poll GET <url>/healthz every 2 s until it answers 2xx or the budget runs out.onwaitForServer(serverURL)setattemptstohealthTimeoutSecondsdiv2trydo shell script"for i in $(seq 1 "&attempts&"); do curl -sf -m 2 ""ed formof(serverURL&"/healthz")&" >/dev/null && exit 0; sleep 2; done; exit 1"returntrueonerrorreturnfalseendtryendwaitForServer
One first-party cookie so a repeat visit isn't counted twice. No cross-site tracking, nothing stored until you accept. Cookie Policy.