---
title: "vakna create: create a box"
description: "Create a box; its name goes to stdout."
command: "vakna create"
generated: scripts/generate.ts
verified:
  cli: "0.0.0-mock"
  date: "2026-10-20"
---

`vakna create`: create a box; its name goes to stdout.

## Synopsis

```sh
vakna create [box]
```

## Flags

| Flag | Default | What it does |
| -- | -- | -- |
| `--format <format>` | `text` | text, or json: one JSON object per line |
| `--json` | `off` | the same as --format json |
| `-h, --help` | `off` | this help |

## Examples

### Example

```sh
$ vakna create
```

```prints
created box-1 · started in 0.41s · cold boot
box-1
```

Exit code 0.

### Another example

```sh
$ box=$(vakna create) && vakna shell "$box" -- uname -a
```

```prints
created box-1 · started in 0.41s · cold boot
ran uname -a · exit 0 0.40s
```

Exit code 0.

### When it fails

```sh
$ vakna create api
```

```prints
vakna: a box named api already exists
hint: vakna list
```

Exit code 1.

## Exit codes

| Code | Meaning |
| -- | -- |
| 0 | ok |
| 1 | vakna failed; under shell, run, try or fork, the command in the box failed |
| 2 | usage: a missing argument, an unknown flag or command |

## JSON output

With `--format json` (or `--json`) every line is one JSON object. `v` is the format's version; `mocked` marks numbers from the mock.

```sh
$ vakna create --json
```

```prints
{"v":1,"event":"created","box":"box-1","id":"sbx_eu1a_01JB83A1B2C3D4E5F6G7H8J9K0","ms":405,"from":"cold","mocked":true}
```

## Errors

- [`vakna: unknown command, unknown flag or missing argument`](https://vakna.com/docs/errors/usage): Run `vakna <command> --help` and fix the command line it points to.
- [`vakna: a box named <box> already exists`](https://vakna.com/docs/errors/exists): Pick another name, or delete the old box with `vakna delete <box>` first.

## --help

This page and the help text come from one definition.

```prints
vakna create · create a box; its name goes to stdout

usage
  vakna create [box]

flags
  --format <format>  text, or json: one JSON object per line  (default: text)
  --json             the same as --format json  (default: off)
  -h, --help         this help  (default: off)

examples
  vakna create
  box=$(vakna create) && vakna shell "$box" -- uname -a

exit codes
  0  ok
  1  vakna failed; under shell, run, try or fork, the command in the box failed
  2  usage: a missing argument, an unknown flag or command
```
