# komrad github token

Print an installation token, minting one if the cached one is spent

[komrad github](https://komrad.dev/latest/cli/github.md)

```bash
komrad github token [flags]
```

Print an installation token.

Run this to check the App is set up. A token starting ghs\_ means the key, the App id and the installation id all agree. Any other answer says which one does not.

The stand-in komrad puts ahead of an agent's PATH as gh runs this for every call, so a tool komrad hands the token to never holds a stale one. --checkout is how that stand-in says which tree it was run in, and refuses a tree whose origin is on a host the App does not reach. --if-configured prints nothing and succeeds on a machine that names no App, which leaves gh the credential the machine was logged in with.

## Flags

| Flag | Type | Description |
| --- | --- | --- |
| [`--checkout`](https://komrad.dev/latest/cli/github/token.md#flag-checkout) | string | refuse unless this checkout's origin is a repository on github.com |
| [`--if-configured`](https://komrad.dev/latest/cli/github/token.md#flag-if-configured) | bool | print nothing and succeed when the config names no app |

## Inherited flags

| Flag | Type | Description |
| --- | --- | --- |
| [`--config`](https://komrad.dev/latest/cli/github/token.md#inherited-config) | stringArray | path to a config TOML, repeatable, later files win over earlier ones |
| [`--engine`](https://komrad.dev/latest/cli/github/token.md#inherited-engine) | string | engine to reach: local for this machine, or a file in the config's engines directory, layered over the config |
