---
url: https://docs.mochiexec.io/reference/cli/mochi_license_set.md
description: Register a license key on this machine
---

# mochi license set

Register a license key on this machine

## Synopsis

Validates your license key and saves it, so you don't need to set MOCHI\_LICENSE\_KEY. Enter the key at the prompt, pipe it on stdin, or pass --file.

```shell
mochi license set [flags]
```

## Options

| Flag | Type | Description |
|------|------|-------------|
| `--file` | `string` | Read the license key from this file |
| `-h, --help` |  | help for set |

## Options inherited from parent commands

| Flag | Type | Description |
|------|------|-------------|
| `-L, --log-level` | `string` | Log verbosity level (debug, info, fatal) (default "info") |
| `--sync` |  | Sync flow cache and workspaces |

## See also

* [mochi license](mochi_license.md) — Manage your Mochi license
