Skip to content

Commit f588f39

Browse files
authored
Add self-hosted Studio provider runner (#21)
1 parent b641805 commit f588f39

5 files changed

Lines changed: 989 additions & 1 deletion

File tree

docs/cli/commands.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,24 @@ Studio expose defaults to software H.264, realtime stream delivery, and the
5454
active codec/profile, and keeps the outbound bridge alive until Ctrl-C.
5555
`--video-codec hardware` opts back into the hardware encoder when that is preferable.
5656

57+
### `provider`
58+
59+
Run a self-hosted SimDeck Studio provider on an always-on Mac:
60+
61+
```sh
62+
simdeck provider connect --studio-url https://simdeck.djdev.me \
63+
--host-id <id> --host-token <token>
64+
simdeck provider run [--max-capacity 1] [--simulator-template "iPhone 17 Pro"]
65+
simdeck provider status
66+
```
67+
68+
`provider connect` stores the Studio host credential in
69+
`~/.simdeck/studio-provider.json` with user-only permissions. `provider run`
70+
starts or reuses the local daemon, heartbeats to Studio, polls for allocation
71+
jobs, clones simulators from the configured template, installs downloaded
72+
artifacts, launches the configured bundle id, proxies Studio API requests to the
73+
local daemon, and deletes session clones on release.
74+
5775
### `daemon start`
5876

5977
Start or reuse the project daemon without opening the browser:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"README.md",
1616
"bin/",
1717
"scripts/experimental/",
18+
"scripts/studio-host-provider.mjs",
1819
"scripts/studio-provider-bridge.mjs",
1920
"scripts/postinstall.mjs",
2021
"build/simdeck-bin",
@@ -73,7 +74,7 @@
7374
"test:e2e:webrtc": "node scripts/e2e-webrtc-reliability.mjs",
7475
"test:e2e:webrtc:headed": "SIMDECK_E2E_HEADFUL=1 node scripts/e2e-webrtc-reliability.mjs",
7576
"test:e2e:webrtc:stress": "node scripts/e2e-webrtc-stress.mjs",
76-
"test:studio-provider": "node --test scripts/studio-provider-bridge.test.mjs",
77+
"test:studio-provider": "node --test scripts/studio-provider-bridge.test.mjs scripts/studio-host-provider.test.mjs",
7778
"test:stress": "node scripts/stress/simdeck.mjs",
7879
"bench:encoder:build": "scripts/bench/build-encoder-benchmark.sh",
7980
"ci": "npm run lint && npm run build:all && npm run test && npm run package:vscode-extension",

0 commit comments

Comments
 (0)