# olef cloud

Source: https://olef.dev/docs/reference/cli/cloud

Generated from **Olef 3.0.2**. [All commands](https://olef.dev/docs/reference/commands) · [Capabilities and requirements](https://olef.dev/docs/reference/capabilities)

These entries describe available commands, not a sequence to run. Check prerequisites before changing app, device, or cloud state. Global options are listed in the [command catalog](https://olef.dev/docs/reference/commands#global-options).

## olef cloud

Olef Cloud (invite-only alpha): sign in, link this project, and run its commands on a cloud emulator (`cloud login`, `cloud link`, `cloud status`)

```bash
olef cloud --help
```

Output: **json**.

### olef cloud login

Sign in to Olef Cloud: approve this machine at app.olef.dev/activate (opens the browser when there is one)

```bash
olef cloud login --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--no-browser` | Print the sign-in URL and code instead of opening a browser |
| `--no-wait` | Return at once with the code and URL; run `cloud login` again to finish after the person approved |
| `--key-stdin` | Read an access key (or a refresh token) from stdin instead of signing in through a browser (CI, cloud agents) |
| `--api <URL>` | API base URL (development) |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud logout

Sign out: revoke this machine's token and forget it

```bash
olef cloud logout --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud whoami

The signed-in account: email, invite state, plan

```bash
olef cloud whoami --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud link

Link this project folder to a cloud workspace, after the person approves the upload (on this terminal, or in a browser)

```bash
olef cloud link --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<path>` | The project root (default: the current folder) |
| `--name <NAME>` | Workspace name (default: the folder name) |
| `--no-browser` | Don't open the approval page; print its URL |
| `--no-wait` | Return at once with the approval URL; run `cloud link` again to finish after the person approved |
| `--preview` | Only show what would upload; create nothing |
| `--dev-workspace <ID>` | Record a link to this workspace without the API (development) |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud unlink

Stop the cloud session and unlink a project: commands run locally again

```bash
olef cloud unlink --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<path>` | The project root (default: the linked project around the current folder) |
| `--delete-workspace` | Also delete the cloud workspace (its disk; your files stay here) |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud on

Turn cloud mode on for this linked project

```bash
olef cloud on --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud off

Turn cloud mode off for this linked project (commands run locally; the link stays)

```bash
olef cloud off --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud status

Link, account, session and sync state for this project

```bash
olef cloud status --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud start

Start (or attach to) this project's cloud session and wait until it is ready

```bash
olef cloud start --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--no-wait` | Return while the session is still starting |
| `--wait-ms <WAIT_MS>` | How long to wait for the session Default: `600000`. |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud stop

Stop this project's cloud session (the workspace disk is kept)

```bash
olef cloud stop --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud sync

Sync the project to the workspace now and wait for it to apply

```bash
olef cloud sync --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--dry-run` | Show what would upload, without connecting |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud run

Run any command in the cloud workspace (`cloud run -- ./gradlew testDebugUnitTest`), then bring its source changes back

```bash
olef cloud run --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--no-sync-back` | Don't apply the command's source changes locally |
| `<command>` | **Required.** The command, after `--` |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud run -- ./gradlew testDebugUnitTest
olef cloud run --no-sync-back -- ./gradlew lint
```

### olef cloud usage

Usage this period against the plan: included vs used per meter, overage, credits, spend cap, reset date

```bash
olef cloud usage --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud plan

The plan: list plans, change plan, the payment portal, the spend cap, credits

```bash
olef cloud plan --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud plan change

Switch plan. Without a paid plan: opens Checkout. A higher plan (or monthly to yearly) applies now, prorated; a lower plan or `free` applies at the end of the period. The current plan again undoes a pending change

```bash
olef cloud plan change --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<plan>` | **Required.** The plan id (`olef cloud plan` lists them): free, pro |
| `--yearly` | Bill yearly (two months free) Conflicts with: `monthly`. |
| `--monthly` | Bill monthly |
| `--no-browser` | Print the Checkout URL instead of opening a browser |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud plan change pro
olef cloud plan change pro --yearly
olef cloud plan change free
```

#### olef cloud plan portal

Open the payment portal: card, invoices and receipts, cancel

```bash
olef cloud plan portal --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--no-browser` | Print the portal URL instead of opening a browser |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud plan spend-cap

Cap this period's bill (plan price plus overage); usage beyond the included amounts stops at the cap. `default` = the plan price + $50

```bash
olef cloud plan spend-cap --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<usd>` | **Required.** |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud plan spend-cap 150
olef cloud plan spend-cap default
```

#### olef cloud plan credits

Prepaid credits: the balance and its history. They pay for usage beyond a plan's included amounts before the card

```bash
olef cloud plan credits --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud plan credits buy

Buy a credit pack at Checkout: 50, 200 or 1000 (= $1,100 of credits)

```bash
olef cloud plan credits buy --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<pack>` | **Required.** |
| `--no-browser` | Print the Checkout URL instead of opening a browser |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud plan credits buy 50
```

### olef cloud org

Orgs: the ones you're in, which one cloud verbs use, team orgs, members and invite links

```bash
olef cloud org --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud org list

The orgs you're in, your role in each, and the one in use

```bash
olef cloud org list --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud org use

Use an org for cloud verbs on this machine: new links, leases, `cloud usage` and `cloud plan`. `--clear` goes back to the account's default org

```bash
olef cloud org use --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<slug>` | The org's slug (or id) |
| `--clear` | Conflicts with: `slug`. |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud org use acme-mobile
olef cloud org use --clear
```

#### olef cloud org create

Create a team org; you're its owner

```bash
olef cloud org create --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<name>` | **Required.** The org's name ("Acme Mobile") |
| `--slug <SLUG>` | The slug for URLs and `--org` (default: from the name) |
| `--use` | Use it for cloud verbs right away |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud org create "Acme Mobile" --use
```

#### olef cloud org invite

An invite link to the org in use, for you to share (it's never emailed). Valid 14 days, for one person

```bash
olef cloud org invite --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--email <EMAIL>` | Only this address can accept it |
| `--role <ROLE>` | developer (default), guest, billing or admin Default: `developer`. |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud org invite --email dev@example.com
olef cloud org invite --role guest
```

#### olef cloud org members

The members of the org in use, and its pending invites

```bash
olef cloud org members --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud org leave

Leave the org in use: your sessions there stop; your workspaces stay with its admins

```bash
olef cloud org leave --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud project

Projects in the org in use: shared repo, settings and secrets, who works on them, and your own workspace from one

```bash
olef cloud project --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud project list

The projects in the org in use and your role on each

```bash
olef cloud project list --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud project show

One project: its repo, shared settings, shared secret names, who works on it, and the workspaces you may see

```bash
olef cloud project show --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<project>` | **Required.** The project's id or slug |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud project create

Create a project in the org in use, from a repo the org's GitHub installations reach (`--repo-id`), or with none (`--name`)

```bash
olef cloud project create --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--repo-id <REPO_ID>` | GitHub's id of the repository |
| `--name <NAME>` | Its name (default: the repository's) |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud project create --repo-id 123456
olef cloud project create --name "Notes app"
```

#### olef cloud project workspace

Make your own workspace from a project (a GitHub working copy of `--branch`, default the repo's default branch)

```bash
olef cloud project workspace --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<project>` | **Required.** |
| `--branch <BRANCH>` |  |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud project secret-set

Store a shared secret (project admins). Values are write-only

```bash
olef cloud project secret-set --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<project>` | **Required.** |
| `<name>` | **Required.** Env name, like `MAPS_API_KEY` |
| `--scope <SCOPE>` | Who gets it Default: `all`. Values: `all`, `ci`, `agents`. |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef printf %s "$TOKEN" | olef cloud project secret-set notes MAPS_API_KEY
```

#### olef cloud project secret-rm

Delete a shared secret (project admins)

```bash
olef cloud project secret-rm --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<project>` | **Required.** |
| `<name>` | **Required.** |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud project grant

Give a member (email) or a team (`team:<slug>`) a role on a project (project admins)

```bash
olef cloud project grant --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<project>` | **Required.** |
| `<who>` | **Required.** `dev@example.com` or `team:mobile` |
| `--role <ROLE>` | Default: `developer`. Values: `developer`, `viewer`, `admin`. |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud project grant notes dev@example.com --role developer
olef cloud project grant notes team:mobile --role viewer
```

### olef cloud share

Share the linked workspace with a teammate to pair or watch

```bash
olef cloud share --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud share list

Who the linked workspace is shared with, any admin looking inside, and who is attached to its running session

```bash
olef cloud share list --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud share add

Invite a member (email) or a team (`team:<slug>`) of the workspace's org to pair (drive the viewer; a linked workspace's files stay on this computer) or, with `--watch`, to watch

```bash
olef cloud share add --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<who>` | **Required.** `dev@example.com` or `team:mobile` |
| `--watch` | View only |
| `--json` | Accepted for compatibility; output is always JSON. |

Examples from the CLI (replace sample packages, selectors, and paths with your own):

```bash
olef cloud share add dev@example.com
olef cloud share add team:mobile --watch
```

#### olef cloud share rm

Take someone's access away

```bash
olef cloud share rm --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<who>` | **Required.** `dev@example.com` or `team:mobile` |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud doctor

Check the cloud client: sign-in, link, daemon, session, sync

```bash
olef cloud doctor --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

### olef cloud secret

Secrets: files the secret guard holds back from uploads, and the workspace's stored secrets

```bash
olef cloud secret --help
```

Output: **json**.

#### olef cloud secret allow

Allow a file that looks like a secret to upload (an `#allow-secret:` line in the project's .olefignore)

```bash
olef cloud secret allow --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<path>` | **Required.** |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud secret list

Files held back, files allowed, and secrets stored in the workspace

```bash
olef cloud secret list --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud secret set

Store a secret in the cloud workspace: an env value for builds (`--value-stdin`), or a file that appears at `--path` in the cloud copy only (`--file`). Values are write-only

```bash
olef cloud secret set --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<name>` | **Required.** Env name (`MAPS_API_KEY`) or file secret name |
| `--value-stdin` | Read the value from stdin Conflicts with: `file`. |
| `--file <FILE>` | A file whose contents become the secret (e.g. app/google-services.json) |
| `--path <PATH>` | Where the file appears in the source (default: the file's path in the linked project) |
| `--json` | Accepted for compatibility; output is always JSON. |

#### olef cloud secret rm

Delete a stored secret

```bash
olef cloud secret rm --help
```

Output: **json**.

| Argument | Description |
| --- | --- |
| `<name>` | **Required.** |
| `--json` | Accepted for compatibility; output is always JSON. |
