# Licence and trial

Start the trial, activate a key when you buy, and run Squiggle in CI. One activation covers Studio, the squiggle command and the MCP server on that Mac.

## Start the trial

```shell
squiggle activate --trial
```

The trial lasts 14 days, includes every feature and needs no card. You get one trial per Mac.

## Activate a licence key

When you buy, your licence key arrives by email. Run `squiggle activate` with nothing after it, and paste the key when it asks:

```shell
squiggle activate
```

Don’t type the key after the command. It would stay in your shell history in plain text. In a script, pipe it in with `squiggle activate -`, or read it from a file with `--key-file`.

You can also activate from Studio. Either way, the licence is saved in `~/.squiggle/license.json`, and Studio, the `squiggle` command and the MCP server all use it.

## Check your licence

```shell
squiggle license
```

It prints one of four states with the reason, and the date your trial or licence ends:

| State | What it means |
| --- | --- |
| `entitled` | A paid licence is active on this Mac. |
| `trial` | The trial is running. |
| `expired` | The trial or licence has ended, or this Mac was offline for more than seven days. Activate a current key to continue. |
| `unlicensed` | Nothing has been activated on this Mac. |

## Working offline

Squiggle checks the licence on your Mac, so it works offline. While you are online, a paid licence renews itself in the background when you run a `squiggle` command. Offline, it keeps working for up to seven days after it last renewed; `squiggle license` shows the days left. If it lapses, connect to the internet and run `squiggle activate` again.

## When the trial or licence ends

Commands that need a licence stop and say why, with exit code 3. Your flows, recordings and data stay in your project. Fourteen commands keep working, including `activate`, `license`, `explain` and `init`, so you can always fix it from the terminal.

## Run Squiggle in CI

A CI runner is a new machine on every build, so it doesn’t use an activation. Add your licence key to your CI as a secret named `SQUIGGLE_LICENSE_TOKEN`:

```yaml
env:
  SQUIGGLE_LICENSE_TOKEN: ${{ secrets.SQUIGGLE_LICENSE_TOKEN }}
```

CI runs don’t count against your Macs. Your plan limits how many runners use Squiggle at the same time: 1 on Solo and 2 on Team. A runner over the limit stops with exit code 3 and says which limit it hit. A finished runner frees its place within a few minutes.

> **Plans and prices**
>
> Every plan includes every feature. Plans differ by the number of Macs and CI runners. See [Pricing](https://squiggle.sh/pricing).
