# kindgi license

> Your Kindgi license key: enroll a deployment once, then renew its key when you run renew (by hand or on your own schedule)

## `kindgi license`

**Synopsis**

```sh signature
kindgi license <command>
```

Your Kindgi license key: enroll a deployment once, then renew its key when you run renew (by hand or on your own schedule).

**Commands**

| Command                                                                                           | Description                                                                                                                                                |
| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`kindgi license enroll`](https://docs.kindgi.com/reference/cli/license.md#kindgi-license-enroll) | Enroll this deployment to renew its license key: makes its renewer key (kept at --renewer, never printed) and prints the line to add on access.kindgi.com. |
| [`kindgi license renew`](https://docs.kindgi.com/reference/cli/license.md#kindgi-license-renew)   | Renew this deployment's license key: asks access.kindgi.com for the next one, checks it offline, and writes it only when it's new.                         |

**See also**

- [Renew the license key](https://docs.kindgi.com/deploy/self-hosted/renew-the-license-key.md)

### `kindgi license enroll`

**Synopsis**

```sh signature
kindgi license enroll --for <github login> --renewer <ref> [--access-url <origin>] [--replace]
```

Enroll this deployment to renew its license key: makes its renewer key (kept at --renewer, never printed) and prints the line to add on access.kindgi.com.

**Options**

| Option                 | Default                     | Description                                                                                                       |
| ---------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `--access-url <value>` | `https://access.kindgi.com` | Another instance of the service (default [https://access.kindgi.com](https://access.kindgi.com/)).                |
| `--for <value>`        | required                    | The GitHub login you sign in to access.kindgi.com with: the line is for it alone.                                 |
| `--renewer <value>`    | required                    | Where to keep the renewer's private key: file:\<path>, env-file:\<path>#\<NAME>, gcp:…, azure:…, aws:….           |
| `--replace`            | off                         | Make a new renewer key even if --renewer already holds one (the old one stops working once you add the new line). |

Every command also takes the [global flags](https://docs.kindgi.com/reference/cli.md#global-flags).

**Examples**

From [Renew the license key](https://docs.kindgi.com/deploy/self-hosted/renew-the-license-key.md):

```sh
npx --yes @kindgi/cli@0.1 license enroll --for <your GitHub login> --renewer gcp:projects/acme-prod/secrets/kindgi-license-renewer
```

**See also**

- [Renew the license key](https://docs.kindgi.com/deploy/self-hosted/renew-the-license-key.md)
- [`kindgi license`](https://docs.kindgi.com/reference/cli/license.md#kindgi-license)

### `kindgi license renew`

**Synopsis**

```sh signature
kindgi license renew (--key <ref> | --env-file <path>) --renewer <ref> [--runtime <url> --runtime-token <ref>] [--access-url <origin>]
```

Renew this deployment's license key: asks access.kindgi.com for the next one, checks it offline, and writes it only when it's new.

**Options**

| Option                    | Default                                                              | Description                                                                                                                                               |
| ------------------------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--access-url <value>`    | `https://access.kindgi.com`                                          | Another instance of the service (default [https://access.kindgi.com](https://access.kindgi.com/)).                                                        |
| `--env-file <value>`      | none (give this or `--key`)                                          | Shorthand for --key env-file:\<path>#KINDGI_LICENSE_KEY (a kindgi.env).                                                                                   |
| `--key <value>`           | none (give this or `--env-file`)                                     | Where the license key is kept, and the new one goes: file:…, env-file:…#NAME, gcp:…, azure:…, aws:….                                                      |
| `--renewer <value>`       | required                                                             | Where the renewer's private key is (as enroll was given).                                                                                                 |
| `--runtime <value>`       | none: the renewal carries no counts (give it with `--runtime-token`) | This deployment's runtime: the renewal carries its use since the current key was issued (counts only), read with --runtime-token.                         |
| `--runtime-token <value>` | none (give it with `--runtime`)                                      | Where a token for the runtime is kept, a system key holding system:license or its own (KINDGI_API_TOKEN): file:…, env-file:…#NAME, gcp:…, azure:…, aws:…. |

Every command also takes the [global flags](https://docs.kindgi.com/reference/cli.md#global-flags).

**Examples**

From [Renew the license key](https://docs.kindgi.com/deploy/self-hosted/renew-the-license-key.md):

```sh
npx --yes @kindgi/cli@0.1 license renew --key gcp:projects/acme-prod/secrets/kindgi-license-key \
```

**See also**

- [Renew the license key](https://docs.kindgi.com/deploy/self-hosted/renew-the-license-key.md)
- [`kindgi license`](https://docs.kindgi.com/reference/cli/license.md#kindgi-license)
