> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# anona-compute run

> Create a sandbox, run one command, then delete the sandbox

```text theme={null}
Create a sandbox, run one command in it, print a summary on stderr, and delete
the sandbox (also on error or Ctrl-C). anona-compute exits with the command's exit code.

Cost is printed when the API reports it; the current API does not, so the
summary says "unknown" rather than guessing.
```

## Usage

```text theme={null}
anona-compute run [flags] -- COMMAND [ARGS...]
```

## Flags

| Flag | Type | Description |
| - | - | - |
| `--auto-pause` | | pause instead of delete when the timeout ends |
| `--cmd-timeout` | duration | stop waiting for the command after this long (0 = no limit) |
| `--cwd`, `-w` | string | working directory |
| `--env`, `-e` | stringArray | environment variable KEY=VALUE for the sandbox (repeatable) |
| `--help`, `-h` | | help for run |
| `--keep` | | do not delete the sandbox after the command |
| `--metadata` | stringArray | metadata KEY=VALUE (repeatable) |
| `--no-internet` | | create the sandbox without internet access |
| `--template`, `-t` | string | template ID or alias (default: profile default\_template, else "base") |
| `--timeout` | string | sandbox lifetime before it is deleted or paused (e.g. 300s, 1h) (default "300s") |
| `--user`, `-u` | string | user to run as (default: the sandbox's default user) |

Global flags (`--api-key`, `--api-url`, `--json`, `--output`, `--profile`, `--request-timeout`, `--verbose`) work on every command; see [anona-compute](https://docs.anonalabs.com/compute/cli/reference/anona-compute.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.