---
title: "Get a License"
description: "Purchase a MastraKit license to scaffold and deploy your project"
source: /docs/license
---


License Key [#license-key]

A license key is required to use the MastraKit CLI. The key grants access to download the project template and scaffold new projects.

Purchase [#purchase]

Visit [mastrakit.dev](https://mastrakit.dev) to purchase a license.

After purchase, you'll receive a license key in the format:

```
sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

Keep this key safe — it's shown only once at creation.

Usage Limits [#usage-limits]

* Each key has a scaffold limit (varies by plan)
* Rate limit: **10 scaffolds per hour**
* Keys can be revoked if misused

Support [#support]

If you have questions about your license or need help, contact [support@mastrakit.dev](mailto:support@mastrakit.dev).

Using Your License Key [#using-your-license-key]

Pass your key to the CLI in one of two ways:

Option 1: Inline Flag [#option-1-inline-flag]

```bash
npx mastrakit my-project --key sk_live_your_key_here
```

Option 2: Environment Variable [#option-2-environment-variable]

```bash
export MASTRAKIT_LICENSE_KEY=sk_live_your_key_here
npx mastrakit my-project
```

Setting the environment variable is recommended if you scaffold multiple projects — add it to your shell profile (`~/.zshrc` or `~/.bashrc`) so you don't need to pass it every time.

What Happens During Validation [#what-happens-during-validation]

When you run `npx mastrakit`:

1. The CLI sends your key to the license API for validation
2. On success, a **time-limited download token** is issued (5-minute expiry)
3. The project template is downloaded and cached locally at `~/.mastrakit/templates/`
4. Subsequent scaffolds reuse the cached template if the version hasn't changed

The raw key is never stored — only a hash is sent for verification.
