Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

482 B
Raw Blame
// docs: test="swift"
import Cua

let cua = try Cua.embedded()
let sb = try await cua.sandboxes().create(options: SandboxCreateOptions(
    on: "local",  // or "aws"
    image: try Image.linux(),
    name: "dev",
    waitFor: [ReadinessProbe(service: "env")]  // until its spacesd answers
))
let guest = try await sb.spacesd(probeTimeoutMs: nil)
let out = try await guest.sh(line: "uname -a", timeoutMs: nil)
print(String(decoding: out.stdout, as: UTF8.self))
try await sb.delete()