# Borealis CLI | Borealis Docs

> Install the official Borealis CLI and use profiles, JSON output, and safe retries.

- Canonical URL: https://borealishq.io/docs/cli/
- Markdown mirror: https://borealishq.io/docs/cli/index.html.md

The CLI is a Node.js client for the same versioned public API used by integrations.

## Install and sign in

Node.js 22 or newer is required:

```sh
npm install --global @amaretto-software-labs/borealis-cli
borealis auth login
borealis auth whoami
```

For a one-off invocation, use `npx @amaretto-software-labs/borealis-cli --help`. Source code and release instructions are in the [official CLI repository](https://github.com/Amaretto-Software-Labs/borealis-cli).

Interactive sign-in opens a browser. Keep the CLI running until it confirms that credentials have been stored. Sessions use the platform credential store.

## Inspect context first

```sh
borealis context show --json
borealis sandbox list --page 1 --page-size 50 --json
```

Use `--profile NAME` to separate saved sessions and `--organization ORGANISATION_ID` to select an organisation you can access. Confirm context before mutations.

## Runtime v2 operations

Use the current CLI's operation catalogue for logical-machine lifecycle, runtime images, templates and private networking. The catalogue is shared with the public API and hosted MCP. Inspect `borealis --help` and the selected operation's help for the installed version; do not substitute legacy container lifecycle commands for a Runtime v2 operation.

See [Images and templates](/docs/images-and-templates), [Private networks](/docs/private-networks) and [Snapshots and durability](/docs/snapshots) for request fields and completion checks.

## Form a legacy container command

Path identifiers are positional. Request values can be supplied as JSON:

```sh
borealis sandbox create --body '{"name":"demo","image":"ubuntu:24.04","command":"sleep","args":["infinity"]}'
```

Run `borealis --help` for command groups and use a command's `--help` for its arguments. The [first sandbox guide](/docs/getting-started) walks through the complete lifecycle.

## Automate carefully

Use `--json` for structured output. Supply an automation token through `BOREALIS_ACCESS_TOKEN` or `--token-file`; avoid putting credentials directly in command arguments.

Keyed operations generate an idempotency key and accept an explicit `--idempotency-key`. Preserve the key when retrying an uncertain mutation. Destructive operations require confirmation; scripts should enable unattended confirmation only after independently checking their target and intended effect.

See [authentication](/docs/authentication) for permissions and [API reliability](/docs/api#retries-and-long-running-operations) for retry behaviour.
