Spawn isolated Linux VMs in milliseconds. Run code. Sync files.
Three primitives. Zero infrastructure.
Quickstart · Primitives · Python · TypeScript · arker.ai
pip install arkerfrom arker import Arker
arker = Arker(
api_key="ark_live_...",
region="aws-us-west-2",
)
vm = arker.vm("ubuntu").fork(name="hello")
result = vm.run("python3 -c 'print(2+2)'")
if result.type == "completed":
print(result.stdout.decode()) # -> "4\n"
vm.delete()npm install @arker-ai/sdkimport { Arker } from "@arker-ai/sdk";
const arker = new Arker({
apiKey: "ark_live_...",
region: "aws-us-west-2",
});
const vm = await arker.vm("ubuntu").fork({ name: "hello" });
const result = await vm.run("node -e 'console.log(2+2)'");
if (result.type === "completed") {
console.log(new TextDecoder().decode(result.stdout)); // -> "4\n"
}
await vm.delete();Examples below use Python. See
typescript/README.mdfor the TypeScript surface.
vm = arker.vm("ubuntu").fork() # fresh VM from a base image
child = vm.fork(name="branch") # branch an existing VMConstant-time. The child is bit-identical to its parent at the moment of fork — same files, same last-known process state, same everything — and from that moment on, writes to either side don't affect the other. Fork to spin up a clean environment, branch a known-good state to try a risky operation, or run N variants in parallel from a single configured VM.
result = vm.run("python3 -c 'print(2+2)'")
print(result.stdout.decode()) # → "4\n"
print(result.exit_code)Shell, Python, Node — anything installed inside the VM. State persists
across calls in a session, so a cd /tmp sticks for the next ls,
and Python globals defined in one vm.run(...) are still there in the
next. Completed runs return structured output with stdout, stderr,
and exit_code — no parsing required.
vm.sync.write_file("/home/user/data.bin", b"...")
back = vm.sync.read_file("/home/user/data.bin") # → bytesRead and write raw bytes — files up to 100 MB. Small payloads go in one round-trip; larger ones take a direct upload path the SDK manages transparently. Files written from the SDK are immediately visible to shell commands inside the VM, and files the VM writes are readable from the SDK — same filesystem, same view, both directions.
| Language | Package | Source | Status |
|---|---|---|---|
| Python | arker |
python/ |
alpha |
| TypeScript | @arker-ai/sdk |
typescript/ |
alpha |
Each SDK lives in its own subdirectory with a dedicated README and tests.
See python/README.md for the full Python API
reference.
Each SDK is versioned independently via tag-prefixed releases:
- Python — push
python-vX.Y.Z(must matchpython/pyproject.toml). GitHub Actions builds and publishes to PyPI via Trusted Publishing. - TypeScript — push
typescript-vX.Y.Z(must matchtypescript/package.json). GitHub Actions builds (ESM + CJS + types) and publishes to npm via Trusted Publishing with provenance.
Apache-2.0. See LICENSE.