# Getting started (https://kumoba.dev/getting-started)

> [!WARNING]
> **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 [#before-you-begin]

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

| Host | You need |
| --- | --- |
| macOS 14 or later, Apple silicon | Homebrew |
| Linux, x86_64 or arm64, glibc 2.28 or later (RHEL 8, Ubuntu 20.04 and newer) | Write access to `/dev/kvm`, and `zstd` |
| Either | About 2 GB of free disk for the `default` image |

1. On macOS, install libkrun:

   ```sh
   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:

   ```sh
   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](/guide/remote-daemon).

## Install and run [#install-and-run]

```sh
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:

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

To keep a sandbox and work in it:

```sh
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 [#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 [#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](/guide/coding-agents) and [Let an agent drive the desktop](/guide/desktop#let-an-agent-drive-the-desktop) have the details.

## Use it from code [#use-it-from-code]

```ts
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](https://kumoba.dev/rust) and an [HTTP API](https://kumoba.dev/http-api).

## If something goes wrong [#if-something-goes-wrong]

| What you see | What to do |
| --- | --- |
| The installer says libkrun is missing (macOS) | Install it with Homebrew, as in [Before you begin](#before-you-begin), and run the installer again. See [Troubleshooting](/troubleshooting#the-installer-says-libkrun-is-missing-macos). |
| `/dev/kvm` is not writable (Linux) | Add your user to the `kvm` group and log in again. See [Troubleshooting](/troubleshooting#devkvm-is-not-writable-linux). |
| `kumoba: Cannot reach kumobad` | kumobad isn't running. Start it with `kumobad` in another terminal. See [Troubleshooting](/troubleshooting#kumoba-cannot-reach-kumobad). |

[Troubleshooting](/troubleshooting) covers more errors.

## Next steps [#next-steps]

- [How kumoba works](/architecture), in brief
- [Run code once](/guide/run-code) or [work in a sandbox](/guide/sandboxes)
- [Open the desktop live view](/guide/desktop) and [let an agent drive it](/guide/desktop#let-an-agent-drive-the-desktop)
- [Control network access](/guide/network) and [use a secret token](/guide/secrets)
- [Install options](/install) and the [FAQ](/faq)