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

# License

> Check status, activate, deactivate, validate, trial, or purchase a license

Use the `license` command to manage activation.

```bash theme={null}
# Show license status
flowdeck license status

# Activate a license key
flowdeck license activate <key>

# Deactivate this machine
flowdeck license deactivate

# Force an immediate server validation
flowdeck license validate

# Start a 14-day trial
flowdeck license trial start --name "Daniel" --email me@example.com

# Open the purchase page
flowdeck license purchase
```

## Subcommands

| Subcommand   | Purpose                                        |
| ------------ | ---------------------------------------------- |
| `status`     | Show license status                            |
| `activate`   | Activate a license key on this machine         |
| `deactivate` | Deactivate this machine                        |
| `validate`   | Force an immediate server license validation   |
| `trial`      | Start or verify a 14-day FlowDeck CLI trial    |
| `purchase`   | Open the FlowDeck pricing page in your browser |

## JSON Output

`license` subcommands support `--json` (long flag only). Each `license <cmd> --json` invocation emits a single JSON object (status, activation result, validation outcome, trial pendingId, etc.).

## flowdeck license validate

Force an immediate server-side license validation, bypassing the once-per-day cache. Useful when:

* You just renewed or extended your license.
* You activated on another machine and want to confirm this machine still has a slot.
* Cached state seems stale (e.g. status shows "activated" but features are locked).

```bash theme={null}
flowdeck license validate
flowdeck license validate --json
```

Exits with code `0` when the license is valid, or `1` for invalid / network error / not activated.

## flowdeck license trial

Two-step flow to activate a 14-day FlowDeck CLI trial. The license-manager emails you a 6-digit verification code; you confirm it with `trial verify`.

### flowdeck license trial start

Request a verification code by name + email.

```bash theme={null}
flowdeck license trial start --name "Daniel" --email me@example.com
flowdeck license trial start --name "CI" --email ci@example.com --json
```

| Option            | Description                                                      |
| ----------------- | ---------------------------------------------------------------- |
| `--name <name>`   | Your name                                                        |
| `--email <email>` | Email that receives the verification code                        |
| `--no-email`      | Dev-only: skip the email send (server returns `devCode` instead) |
| `--json`          | Output as JSON                                                   |

Constraints: one trial per email, one trial per machine. The code expires after a few minutes — capture the `pendingId` from the response, then call `verify` with the code from the email.

### flowdeck license trial verify

Confirm the OTP and persist the trial license locally.

```bash theme={null}
flowdeck license trial verify --pending-id <id> --code 123456
flowdeck license trial verify --pending-id <id> --code 123456 --json
```

| Option              | Description                              |
| ------------------- | ---------------------------------------- |
| `--pending-id <id>` | `pendingId` returned by `trial start`    |
| `--code <code>`     | 6-digit code from the verification email |
| `--json`            | Output as JSON                           |

On success the trial license (`TRIAL-…` key) is stored just like an activated paid license. Check it with `flowdeck license status`.

## flowdeck license purchase

Open the FlowDeck pricing page in your default browser. If the browser cannot be launched (headless / CI / piped output), the URL is printed so it can be copy-pasted. Prefer this over hardcoding the pricing URL in scripts or docs — the URL is owned by the CLI and updated centrally.

```bash theme={null}
flowdeck license purchase
flowdeck license purchase --json
```

<Note>
  For CI/CD, set `FLOWDECK_LICENSE_KEY` in the environment and call `flowdeck license activate "$FLOWDECK_LICENSE_KEY"` at the start of the job instead of activating interactively.
</Note>
