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

# CLI reference

> Commands and automation behavior for the Marina Cloud CLI.

Install the CLI from npm:

```bash theme={null}
npm install -g @marina-cloud/cli
```

## Authentication

| Command                      | Description                                        |
| ---------------------------- | -------------------------------------------------- |
| `marina setup`               | Sign in with Clerk in your browser.                |
| `marina setup --token mar_…` | Save an existing token for a headless environment. |
| `marina profile`             | Show the active API and credential location.       |
| `marina logout`              | Remove the saved credential.                       |

Set `MARINA_TOKEN` to supply a credential without writing a profile. Set
`MARINA_API` to target a different Marina API origin.

## Apps and deployments

| Command                          | Description                                              |
| -------------------------------- | -------------------------------------------------------- |
| `marina deploy [dir]`            | Deploy a directory, or the current directory by default. |
| `marina deploy demo`             | Create the bundled Hello Marina demo.                    |
| `marina status [--app <slug>]`   | Show what is live and the last deploy outcome.           |
| `marina deploys [--app <slug>]`  | List recent deployment attempts.                         |
| `marina versions [--app <slug>]` | List immutable app versions.                             |
| `marina rollback --to <hash>`    | Publish an earlier artifact as a new version.            |
| `marina list`                    | List apps in the active workspace.                       |
| `marina open`                    | Open the linked app.                                     |

`marina deploy` accepts `--name <name>` when creating an app and `--app <slug>`
to deploy into a specific existing app.

## Environment variables and secrets

| Command                                | Description                                          |
| -------------------------------------- | ---------------------------------------------------- |
| `marina secrets`                       | List configured keys without exposing secret values. |
| `marina secrets set KEY=VALUE`         | Set an encrypted secret.                             |
| `marina secrets set KEY=VALUE --plain` | Set a non-secret value.                              |
| `marina secrets rm KEY`                | Remove a value.                                      |

## Agent skill

Skill installation is always explicit:

```bash theme={null}
marina skills install
marina skills install --agent codex
```

Use `--agent claude` or `--agent all` to choose a different target.

## JSON output

Every command accepts `--json`. Standard output contains one versioned JSON
result; progress is written to standard error.

Successful results include `schema_version: 1` and `ok: true`. Failures include
`ok: false` and a stable `error.code`.

| Exit code | Meaning                       |
| --------- | ----------------------------- |
| `0`       | Success                       |
| `1`       | Command or deployment failure |
| `2`       | Authentication required       |
| `3`       | Deployment refused            |
