# kindgi connection-apps

> Registrations at other apps that connections go through; tenant admins only (list / get / add / remove)

## `kindgi connection-apps`

**Synopsis**

```sh signature
kindgi connection-apps <command>
```

Registrations at other apps that connections go through; tenant admins only (list / get / add / remove).

**Commands**

| Command                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`kindgi connection-apps list`](https://docs.kindgi.com/v0.8.1/reference/cli/connection-apps.md#kindgi-connection-apps-list)     | List the workspace's registrations at other apps.                                                                                                                                                                                                                                                                                                                 |
| [`kindgi connection-apps get`](https://docs.kindgi.com/v0.8.1/reference/cli/connection-apps.md#kindgi-connection-apps-get)       | One registration, with the redirect and notices addresses to give the app.                                                                                                                                                                                                                                                                                        |
| [`kindgi connection-apps add`](https://docs.kindgi.com/v0.8.1/reference/cli/connection-apps.md#kindgi-connection-apps-add)       | Register the workspace's app at Google (`google`), Microsoft (`microsoft`, with `--tenant`), GitHub (`github`, with its four GitHub flags) or LinkedIn (`linkedin`), by its client id and the secrets you stored with `kindgi secrets set`; or the texting provider account a number connects through (`texts`, with --provider, --api-key-ref and --public-key). |
| [`kindgi connection-apps remove`](https://docs.kindgi.com/v0.8.1/reference/cli/connection-apps.md#kindgi-connection-apps-remove) | Remove a registration.                                                                                                                                                                                                                                                                                                                                            |

**See also**

- [Asana](https://docs.kindgi.com/v0.8.1/guides/connections/asana.md)
- [GitHub](https://docs.kindgi.com/v0.8.1/guides/connections/github.md)
- [Google](https://docs.kindgi.com/v0.8.1/guides/connections/google.md)
- [HubSpot](https://docs.kindgi.com/v0.8.1/guides/connections/hubspot.md)

### `kindgi connection-apps list`

**Synopsis**

```sh signature
kindgi connection-apps list [--include-removed] [--limit=<n>] [--cursor=<c>] [--table]
```

List the workspace's registrations at other apps. Removed ones are left out unless `--include-removed`.

**Options**

| Option              | Default              | Description                                         |
| ------------------- | -------------------- | --------------------------------------------------- |
| `--cursor <value>`  | none                 | The next page, from `nextCursor`.                   |
| `--include-removed` | off                  | Removed registrations too, with when (`removedAt`). |
| `--limit <value>`   | `25` (at most `100`) | Page size.                                          |

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

**Examples**

List the workspace's registrations, as a table.

```sh
kindgi connection-apps list --table
```

List every registration, removed ones too, as a table.

```sh
kindgi connection-apps list --include-removed --table
```

**See also**

- [Asana](https://docs.kindgi.com/v0.8.1/guides/connections/asana.md)
- [GitHub](https://docs.kindgi.com/v0.8.1/guides/connections/github.md)
- [Google](https://docs.kindgi.com/v0.8.1/guides/connections/google.md)
- [HubSpot](https://docs.kindgi.com/v0.8.1/guides/connections/hubspot.md)
- [`kindgi connection-apps`](https://docs.kindgi.com/v0.8.1/reference/cli/connection-apps.md#kindgi-connection-apps)

### `kindgi connection-apps get`

**Synopsis**

```sh signature
kindgi connection-apps get <app-id>
```

One registration, with the redirect and notices addresses to give the app. Its secrets show as references.

**Options**

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

**Examples**

Show a registration, with the redirect and notices addresses to give the app.

```sh
kindgi connection-apps get <app-id>
```

**See also**

- [Asana](https://docs.kindgi.com/v0.8.1/guides/connections/asana.md)
- [GitHub](https://docs.kindgi.com/v0.8.1/guides/connections/github.md)
- [Google](https://docs.kindgi.com/v0.8.1/guides/connections/google.md)
- [HubSpot](https://docs.kindgi.com/v0.8.1/guides/connections/hubspot.md)
- [`kindgi connection-apps`](https://docs.kindgi.com/v0.8.1/reference/cli/connection-apps.md#kindgi-connection-apps)

### `kindgi connection-apps add`

**Synopsis**

```sh signature
kindgi connection-apps add <app> (--client-id=<id> --client-secret-ref=<env>/<name> [--tenant=<directory>] [--github-app-id=<n> --slug=<slug> --private-key-ref=<env>/<name> --webhook-secret-ref=<env>/<name>] | --provider=telnyx --api-key-ref=<env>/<name> --public-key=<base64>) [--projects=<id>,…]
```

Register the workspace's app at Google (`google`), Microsoft (`microsoft`, with `--tenant`), GitHub (`github`, with its four GitHub flags) or LinkedIn (`linkedin`), by its client id and the secrets you stored with `kindgi secrets set`; or the texting provider account a number connects through (`texts`, with --provider, --api-key-ref and --public-key). Prints the registration, with the redirect and notices addresses to give the app.

**Options**

| Option                         | Default                                                             | Description                                                                                                                                                                                                                                            |
| ------------------------------ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--api-key-ref <value>`        | required for `texts`                                                | Texts: the secret holding the provider account's API key, as --client-secret-ref. The key is used by this registration only: no tool, endpoint, webhook trigger, destination, model provider or other registration may name the same secret.           |
| `--client-id <value>`          | required, except for `texts`                                        | The app's OAuth client id.                                                                                                                                                                                                                             |
| `--client-secret-ref <value>`  | required, except for `texts`                                        | The secret holding its client secret: `<env>/<name>`, or `<name>` under the env the runtime serves. Not the one sign-in uses: if one app registration serves both, give this one a second client secret under its own name.                            |
| `--github-app-id <value>`      | required for `github`                                               | GitHub: the GitHub App's App ID, a number. Not a registration's id, which `get` and `remove` take.                                                                                                                                                     |
| `--private-key-ref <value>`    | required for `github`                                               | GitHub: the secret holding the GitHub App's private key, as --client-secret-ref.                                                                                                                                                                       |
| `--projects <value>`           | none: every project                                                 | The projects whose connections may use it, comma-separated ids. Default: every project.                                                                                                                                                                |
| `--provider <value>`           | required for `texts`                                                | Texts: the texting provider the account is at (`telnyx`).                                                                                                                                                                                              |
| `--public-key <value>`         | required for `texts`                                                | Texts: the account's public key for signed texts, base64 of 32 bytes, as the provider shows it.                                                                                                                                                        |
| `--slug <value>`               | required for `github`                                               | GitHub: the GitHub App's slug.                                                                                                                                                                                                                         |
| `--tenant <value>`             | none: required where the app's entry names no default (`microsoft`) | Microsoft: the directory people sign in at: your Directory (tenant) ID or domain for a single-tenant app, or `organizations`, `common` or `consumers` for a multi-tenant one. Required where the app's entry names no default, as Microsoft's doesn't. |
| `--webhook-secret-ref <value>` | required for `github`                                               | GitHub: the secret holding the GitHub App's webhook secret, as --client-secret-ref.                                                                                                                                                                    |

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

**Examples**

Register the company's Google client, its secret stored first with `kindgi secrets set`.

```sh
kindgi connection-apps add google --client-id=<client-id> --client-secret-ref=prod/ACME_GOOGLE_CONNECT_SECRET
```

Register the company's Microsoft Entra app, a single-tenant one, at its own directory.

```sh
kindgi connection-apps add microsoft --client-id=<client-id> --client-secret-ref=prod/ACME_MICROSOFT_CONNECT_SECRET --tenant=<tenant-id>
```

Register the company's GitHub App.

```sh
kindgi connection-apps add github --github-app-id=<n> --slug=<slug> --client-id=<client-id> --client-secret-ref=prod/ACME_GITHUB_CLIENT_SECRET --private-key-ref=prod/ACME_GITHUB_PRIVATE_KEY --webhook-secret-ref=prod/ACME_GITHUB_WEBHOOK_SECRET
```

Register the company's LinkedIn app.

```sh
kindgi connection-apps add linkedin --client-id=<client-id> --client-secret-ref=prod/ACME_LINKEDIN_CONNECT_SECRET
```

Register the company's Telnyx account for texts, its API key stored first with `kindgi secrets set`.

```sh
kindgi connection-apps add texts --provider=telnyx --api-key-ref=production/ACME_TELNYX_API_KEY --public-key=<base64>
```

From [Asana](https://docs.kindgi.com/v0.8.1/guides/connections/asana.md):

```sh
pnpm exec kindgi connection-apps add asana --client-id=<client-id> --client-secret-ref=prod/ACME_ASANA_CONNECT_SECRET
```

From [GitHub](https://docs.kindgi.com/v0.8.1/guides/connections/github.md):

```sh
npx --yes @kindgi/cli@0.8 connection-apps add github --github-app-id=<github-app-id> --slug=<slug> --client-id=<client-id> --client-secret-ref=prod/ACME_GITHUB_CLIENT_SECRET --private-key-ref=prod/ACME_GITHUB_PRIVATE_KEY --webhook-secret-ref=prod/ACME_GITHUB_WEBHOOK_SECRET
```

**See also**

- [Asana](https://docs.kindgi.com/v0.8.1/guides/connections/asana.md)
- [GitHub](https://docs.kindgi.com/v0.8.1/guides/connections/github.md)
- [Google](https://docs.kindgi.com/v0.8.1/guides/connections/google.md)
- [HubSpot](https://docs.kindgi.com/v0.8.1/guides/connections/hubspot.md)
- [`kindgi connection-apps`](https://docs.kindgi.com/v0.8.1/reference/cli/connection-apps.md#kindgi-connection-apps)

### `kindgi connection-apps remove`

**Synopsis**

```sh signature
kindgi connection-apps remove <app-id> [--with-connections] [--yes]
```

Remove a registration. One with live connections is refused unless --with-connections, which disconnects them too. Asks first, unless --yes.

**Options**

| Option               | Default | Description                                                                             |
| -------------------- | ------- | --------------------------------------------------------------------------------------- |
| `--with-connections` | off     | Disconnect its live connections too: each withdrawn at the app and its token destroyed. |
| `--yes`              | off     | Don't ask first (for scripts).                                                          |

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

**Examples**

Remove a registration and disconnect every connection through it.

```sh
kindgi connection-apps remove <app-id> --with-connections
```

**See also**

- [Asana](https://docs.kindgi.com/v0.8.1/guides/connections/asana.md)
- [GitHub](https://docs.kindgi.com/v0.8.1/guides/connections/github.md)
- [Google](https://docs.kindgi.com/v0.8.1/guides/connections/google.md)
- [HubSpot](https://docs.kindgi.com/v0.8.1/guides/connections/hubspot.md)
- [`kindgi connection-apps`](https://docs.kindgi.com/v0.8.1/reference/cli/connection-apps.md#kindgi-connection-apps)
