Skip to Content
kumoba

Getting started

Alpha. The API, CLI, SDK and image format may change between 0.x releases. Pin a version (KUMOBA_VERSION=0.18.0) for anything you depend on.

This page installs kumoba, runs code in a fresh VM, keeps a sandbox to work in, opens its desktop in your browser, and hands kumoba to your coding agent.

Before you begin

kumoba needs hardware virtualization: an Apple silicon Mac, or Linux with KVM.

HostYou need
macOS 14 or later, Apple siliconHomebrew
Linux, x86_64 or arm64, glibc 2.28 or later (RHEL 8, Ubuntu 20.04 and newer)Write access to /dev/kvm, and zstd
EitherAbout 2 GB of free disk for the default image
  1. On macOS, install libkrun:

    brew tap slp/krun && brew install slp/krun/libkrun slp/krun/libkrunfw zstd
  2. On Linux, install zstd, add your user to the kvm group, and log out and in again:

    sudo apt install -y zstd
    sudo usermod -aG kvm "$USER"

    On a cloud VM, pick an instance type with nested virtualization or a bare-metal one.

If the machine your code runs on has neither, run kumobad on one that does and reach it over TLS.

Install and run

curl -fsSL https://kumoba.dev/install.sh | bash   # kumobad, the kumoba CLI and the default image
export PATH="$HOME/.kumoba/bin:$PATH"            # add this to your shell profile
kumobad                                          # the daemon; leave it running

In another terminal, run code in a fresh VM, which is deleted afterwards:

kumoba run -- python3 -c 'import platform; print(platform.platform())'

To keep a sandbox and work in it:

id=$(kumoba create --image default -q)
kumoba start "$id" -q
kumoba exec "$id" -- pip install requests
kumoba shell "$id"                           # a terminal inside the sandbox; exit to leave
kumoba desktop "$id" --user kumoba --open    # the desktop, live in your browser
kumoba delete "$id"

Run kumoba to list every command, and kumoba <command> --help for its options.

What success looks like

  • kumoba --version prints kumoba 0.18.0.
  • kumobad prints one JSON line per event to the terminal. The line with "event":"ready" means it serves requests.
  • kumoba run prints the platform of the sandbox's own Linux kernel, also on a Mac, such as Linux-6.12.109-aarch64-with-glibc2.41. The kernel version depends on your libkrunfw.
  • kumoba create -q prints the new sandbox's id, which the commands after it use.
  • kumoba desktop --open opens a page in your browser with the sandbox's xfce desktop, which you can use with the keyboard and mouse.

Hand it to your agent

Install the agent skill with npx skills add Parassharmaa/kumoba so a coding agent such as Claude Code knows how to use kumoba, or have the agent run kumoba skill to read it. The agent can also use a sandbox's desktop through the CLI: it looks with kumoba screenshot --settle and kumoba ui-tree, and acts with kumoba click, kumoba type and kumoba key. Use kumoba from your coding agent and Let an agent drive the desktop have the details.

Use it from code

import { Kumoba } from "kumoba";   // npm install kumoba

const kumoba = new Kumoba();

const once = await kumoba.run("python3 --version");     // fresh VM, deleted afterwards
console.log(once.stdout);

const sandbox = await kumoba.create({ user: "kumoba" });
await sandbox.files.write("/workspace/a.txt", "hello");
console.log((await sandbox.run("cat /workspace/a.txt")).stdout);
await sandbox.delete();

new Kumoba() finds the daemon by itself. There is also a Rust library and an HTTP API.

If something goes wrong

What you seeWhat to do
The installer says libkrun is missing (macOS)Install it with Homebrew, as in Before you begin, and run the installer again. See Troubleshooting.
/dev/kvm is not writable (Linux)Add your user to the kvm group and log in again. See Troubleshooting.
kumoba: Cannot reach kumobadkumobad isn't running. Start it with kumobad in another terminal. See Troubleshooting.

Troubleshooting covers more errors.

Next steps

Last updated on

On this page