# CLI

Search, rent and manage machines from your terminal with the arrakis command.

> The `arrakis` command opens to the public soon. Everything it does also works in the console, over MCP and through the API.

## Sign in

The CLI uses an API token. Create one on **API & agents**, then:

```sh
export ARRAKIS_TOKEN=ark_...
arrakis whoami
```

`arrakis market` needs no token.

## Find and rent

```sh
arrakis market
arrakis gpus search --gpu-type H100
arrakis instances create --node-id <node> --termination-hours 4 --ssh-public-key ~/.ssh/id_ed25519.pub
```

Add `--gpu-count`, `--template-id` or `--idempotency-key` as needed, and `--json` for raw output.

## Manage machines

```sh
arrakis instances list
arrakis instances get <id>
arrakis instances schedule-removal <id> --in 3h
arrakis instances terminate <id>
```

## Money

```sh
arrakis billing status
arrakis billing add 50
arrakis billing auto-recharge --on --threshold 20 --amount 50
arrakis billing stop
```

`billing add` opens Stripe's payment page; `billing stop` stops every machine and pauses rentals.

## Tokens for agents

```sh
arrakis tokens create --name eval-agent --scope read --scope rent --spend-limit 50 --max-rental-hours 6
```

## Run MCP locally

```sh
arrakis mcp
```

Serves the same tools over stdio for a local agent, with `ARRAKIS_TOKEN` set.

More: [all docs](/docs.md) · [OpenAPI](/openapi.json) · [llms.txt](/llms.txt)
