Sandbox.create(), list(), and every instance method reuse the baseUrl/authToken you pass in, or fall back to the SANDKILN_DAEMON_URL/SANDKILN_AUTH_TOKEN environment variables — see Auth.
A failed command doesn’t reject the promise
runCommand reports whatever the command actually did — exit code and stderr included — it doesn’t throw just because the exit code was non-zero. Check result.exitCode the same way a shell script checks $?:
SandkilnApiError is reserved for the request itself failing — a bad sandbox id, an unreachable daemon, a validation error. Calling any method after stop() (without resume()-ing it first) is the everyday way to see one:
Next
- Give the sandbox a name so you can find it again later: Named sandboxes & persistent stop.
- Boot from your own image instead of the daemon’s default: Boot from a custom image.
- Full method reference: JS/TS SDK.