---
title: "Apply a license key"
description: "Set the Enterprise license key in CAT Studio, CAT CLI, the PowerShell module and the Python module — where it is stored, how to check it, what it is not"
url: "https://docs.justcat.it/how-to-guides/licensing-and-admin/apply-license-key/"
---
# Apply a license key


## What the key is — and is not

The license key belongs to the **Enterprise plan** (and its trial). It came by email — from the trial request, or from us after the license agreement — and looks like `42800B3FH804525-0C-1P93C2B09E-10-7114C17B6E` (not a real one). Treat it as a secret: it is the thing that unlocks CAT.

It is not any of these, which you may also hold:

| | Used for | Where |
|---|---|---|
| **License key** | unlocking Enterprise — no sign-in, offline, unattended | set once per machine and account, this page |
| Portal **account** (sign-in) | Starter, Professional, Team | CAT Studio's sign-in, or `CAT_PORTAL_TOKEN` on the command line |
| **Personal access token** | signing in on the command line with the account | the `CAT_PORTAL_TOKEN` environment variable, Team plan |
| Paddle **subscription** / receipt | paying for Professional or Team | your account page; nothing to enter into CAT |

A Team or Professional customer never has a key; an Enterprise customer never needs the token.

## Set the key


**CAT Studio**


The **Settings** page → **License Key**: paste the key, press **Set Key**. Studio signs you out of the portal account if you were signed in — the key is the identity now — and shows *Enterprise* as the plan.


**CAT CLI**


```text
catcli instance --setLicenseKey "42800B3FH804525-0C-1P93C2B09E-10-7114C17B6E"
```

`catcli instance` afterwards shows the plan and the key's validity — see [`instance`](https://docs.justcat.it/reference/cat-cli/instance/ "catcli instance").


**PowerShell module**


```powershell
Set-CatInstance -LicenseKey '42800B3FH804525-0C-1P93C2B09E-10-7114C17B6E'
Get-CatInstance          # shows the plan and the key
```

See [`Set-CatInstance`](https://docs.justcat.it/reference/powershell-module/set-catinstance/ "Set-CatInstance").


**Python module**


```python
import justcatit as cat
cat.set_instance("42800B3FH804525-0C-1P93C2B09E-10-7114C17B6E")
print(cat.get_instance())
```

See [`set_instance`](https://docs.justcat.it/reference/python-module/set-instance/ "set_instance").




The key is checked before it is stored; a genuine key is stored even when it is not yet valid or already expired — what it unlocks is decided every time CAT runs, so a renewal key can be set ahead of time. A mistyped key is refused with the reason.

## Where it lives, and for whom

One store per machine **and Windows account**: `%APPDATA%\CAT\.catconfig` (`~/.config/CAT/.catconfig` on Linux), shared by all four tools. Two consequences:

* every user of a shared machine sets the key once for themselves;
* a **pipeline agent, a scheduled task or a SQL Server Agent job** runs under its own account — set the key under *that* account, or from a secret in the pipeline step; from CAT 3.0 an unattended run without it stops before any test runs. See [Integrations](https://docs.justcat.it/reference/integrations/ "Integrations").

An empty key removes it — `catcli instance --setLicenseKey ""`, `Set-CatInstance` with no key, `cat.set_instance("")` — and the tools go back to sign-in.

## Related

* [Get a CAT license](https://docs.justcat.it/how-to-guides/licensing-and-admin/get-license/ "Get a CAT license") — plans, trials, buying.
* [Integrations](https://docs.justcat.it/reference/integrations/ "Integrations") — the key in pipelines and schedulers.
* [`catcli instance`](https://docs.justcat.it/reference/cat-cli/instance/ "catcli instance") · [`Set-CatInstance`](https://docs.justcat.it/reference/powershell-module/set-catinstance/ "Set-CatInstance") · [`set_instance`](https://docs.justcat.it/reference/python-module/set-instance/ "set_instance") · [CAT Studio settings](https://docs.justcat.it/reference/cat-studio/settings/ "CAT Studio settings")

