# kindgi sites

> Sites that sign their own people in to a project (the Kindgi WordPress plugin): register, code, list, get, update, pause, resume, revoke-key, restore-person, unregister

## `kindgi sites`

**Synopsis**

```sh signature
kindgi sites <command>
```

Sites that sign their own people in to a project (the Kindgi WordPress plugin): register, code, list, get, update, pause, resume, revoke-key, restore-person, unregister. Tenant admins only.

**Commands**

| Command                                                                                                     | Description                                                                                                                                                                                                                     |
| ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`kindgi sites register`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-register)             | Register a site that signs its own people in to a project (the Kindgi WordPress plugin), and get its one-time code, shown once.                                                                                                 |
| [`kindgi sites code`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-code)                     | A new one-time code for a site, shown once: to connect it again, or to replace its key.                                                                                                                                         |
| [`kindgi sites list`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-list)                     | List a project's sites.                                                                                                                                                                                                         |
| [`kindgi sites get`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-get)                       | Fetch a site: its settings, and its keys' ids and thumbprints.                                                                                                                                                                  |
| [`kindgi sites update`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-update)                 | Change a site's settings; the rest stay as they are.                                                                                                                                                                            |
| [`kindgi sites pause`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-pause)                   | Stop a site's sign-ins: its statements are refused until it's resumed, and its people's live sessions end now.                                                                                                                  |
| [`kindgi sites resume`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-resume)                 | Start a paused site's sign-ins again.                                                                                                                                                                                           |
| [`kindgi sites revoke-key`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-revoke-key)         | Revoke one of a site's keys, by its id (`kindgi sites get` lists them, with thumbprints to compare with the plugin's): statements signed with it are refused from now on, and the site's live sessions end.                     |
| [`kindgi sites restore-person`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-restore-person) | Let one of a site's people removed in Kindgi back in, by their user id (`kindgi people list --include-removed` finds it): the same person, with their history, and their grants come back the next time the site signs them in. |
| [`kindgi sites unregister`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites-unregister)         | Unregister a site: its sign-ins stop and its live sessions end.                                                                                                                                                                 |

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)

### `kindgi sites register`

**Synopsis**

```sh signature
kindgi sites register --name=<shown name> --origin=<https://…> --approvals-url=<url with {approvalId}> [--allowed-role=<role> ...] [--role-map=<json-or-@file>] [--reviewer-ceiling=standard|senior] [--vouching=on|off] [--people-cap=<n>] [--new-people-per-day=<n>] [--project=<project-id>]
```

Register a site that signs its own people in to a project (the Kindgi WordPress plugin), and get its one-time code, shown once. The site's people ask the project's agents and decide its approvals as themselves, as the site vouches for them. Tenant admins only.

**Options**

| Option                         | Default                                                                                                                         | Description                                                                                                                                                                                                                                                                                |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--allowed-role <value>`       | `administrator` and `shop_manager`                                                                                              | A role on the site that may sign in at all (a WordPress role: `shop_manager`); repeat for each (at most 20). Any other role is refused. Without --role-map, the role map keeps only these roles' entries: the default map's on register, the site's own on update. Repeatable.             |
| `--approvals-url <value>`      | required                                                                                                                        | Where an approval opens on the site, with `{approvalId}` in it, on the site's origin: the plugin's Kindgi → Settings page shows it. The site's people get it in their reviewer email.                                                                                                      |
| `--name <value>`               | required                                                                                                                        | How Kindgi shows the people the site signs in: "Jane, via \<name>". Only a tenant admin sets it, never the site. At most 100 characters.                                                                                                                                                   |
| `--new-people-per-day <value>` | `20`                                                                                                                            | At most this many new people from the site a day (1 to 1000).                                                                                                                                                                                                                              |
| `--origin <value>`             | required                                                                                                                        | The site's origin, as the plugin's Kindgi → Settings page shows it (`https://acme-store.example`): https, no path. `http://` only for localhost, 127.0.0.1 or \[::1].                                                                                                                      |
| `--people-cap <value>`         | `50`                                                                                                                            | At most this many live people from the site (1 to 10000).                                                                                                                                                                                                                                  |
| `--project <value>`            | the tenant's Default project                                                                                                    | The site's project, by id (default: the tenant's Default project).                                                                                                                                                                                                                         |
| `--reviewer-ceiling <value>`   | `standard`                                                                                                                      | The highest reviewer role the site's people can have: `standard` or `senior`.                                                                                                                                                                                                              |
| `--role-map <value>`           | both default roles may ask, and decide as `standard` reviewers; with `--allowed-role` alone, the entries of the roles it allows | For each allowed role, what it gets in the project, as JSON or `@<file>`: `{"shop_manager": {"ask": true, "reviewer": "standard"}}`. `ask`: whether it may start turns with the agents; `reviewer`: `standard` or `senior` (at most --reviewer-ceiling), or absent to decide no approvals. |
| `--vouching <value>`           | `on`                                                                                                                            | `on` or `off`: whether the site's sign-ins are taken at all.                                                                                                                                                                                                                               |

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

**Examples**

Register a WordPress store on the Default project, with the origin and the approvals URL its Kindgi → Settings page shows; the one-time code is shown once.

```sh
kindgi sites register --name='Acme store' --origin=https://acme-store.example --approvals-url='https://acme-store.example/wp-admin/admin.php?page=kindgi&approval={approvalId}'
```

Let only shop managers sign in, as senior reviewers.

```sh
kindgi sites register --name='Acme store' --origin=https://acme-store.example --approvals-url='https://acme-store.example/wp-admin/admin.php?page=kindgi&approval={approvalId}' --allowed-role=shop_manager --reviewer-ceiling=senior --role-map='{"shop_manager": {"ask": true, "reviewer": "senior"}}'
```

From [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md):

```sh
pnpm exec kindgi sites register --project=<project-id> --name='Acme store' \
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites code`

**Synopsis**

```sh signature
kindgi sites code <site-id> [--project=<project-id>]
```

A new one-time code for a site, shown once: to connect it again, or to replace its key. When the site connects with it, its new key replaces every key it had and its people's live sessions end. An earlier unused code stops working.

**Options**

| Option              | Default                      | Description                                                        |
| ------------------- | ---------------------------- | ------------------------------------------------------------------ |
| `--project <value>` | the tenant's Default project | The site's project, by id (default: the tenant's Default project). |

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

**Examples**

A new one-time code: to connect the site again, or to replace its key.

```sh
kindgi sites code <site-id>
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites list`

**Synopsis**

```sh signature
kindgi sites list [--include-unregistered] [--project=<project-id>] [--limit=<n>] [--cursor=<c>]
```

List a project's sites. Tenant admins only.

**Options**

| Option                   | Default                      | Description                                                        |
| ------------------------ | ---------------------------- | ------------------------------------------------------------------ |
| `--cursor <value>`       | none                         | Resume after this cursor, from the previous page's `nextCursor`.   |
| `--include-unregistered` | off                          | Unregistered sites too.                                            |
| `--limit <value>`        | `25` (at most `100`)         | The most to return (default 25, at most 100).                      |
| `--project <value>`      | the tenant's Default project | The site's project, by id (default: the tenant's Default project). |

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

**Examples**

The Default project's sites, with their state and keys.

```sh
kindgi sites list --table
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites get`

**Synopsis**

```sh signature
kindgi sites get <site-id> [--project=<project-id>]
```

Fetch a site: its settings, and its keys' ids and thumbprints.

**Options**

| Option              | Default                      | Description                                                        |
| ------------------- | ---------------------------- | ------------------------------------------------------------------ |
| `--project <value>` | the tenant's Default project | The site's project, by id (default: the tenant's Default project). |

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

**Examples**

A site's settings, and its keys' thumbprints to compare with the plugin's.

```sh
kindgi sites get <site-id>
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites update`

**Synopsis**

```sh signature
kindgi sites update <site-id> [--name=<shown name>] [--origin=<https://…>] [--approvals-url=<url>] [--allowed-role=<role> ...] [--role-map=<json-or-@file>] [--reviewer-ceiling=standard|senior] [--vouching=on|off] [--people-cap=<n>] [--new-people-per-day=<n>] [--project=<project-id>]
```

Change a site's settings; the rest stay as they are. A person's grants follow the new settings the next time the site signs them in. Tenant admins only.

**Options**

| Option                         | Default                                                                        | Description                                                                                                                                                                                                                                                                                |
| ------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--allowed-role <value>`       | unchanged                                                                      | A role on the site that may sign in at all (a WordPress role: `shop_manager`); repeat for each (at most 20). Any other role is refused. Without --role-map, the role map keeps only these roles' entries: the default map's on register, the site's own on update. Repeatable.             |
| `--approvals-url <value>`      | unchanged                                                                      | Where an approval opens on the site, with `{approvalId}` in it, on the site's origin: the plugin's Kindgi → Settings page shows it. The site's people get it in their reviewer email.                                                                                                      |
| `--name <value>`               | unchanged                                                                      | How Kindgi shows the people the site signs in: "Jane, via \<name>". Only a tenant admin sets it, never the site. At most 100 characters.                                                                                                                                                   |
| `--new-people-per-day <value>` | unchanged                                                                      | At most this many new people from the site a day (1 to 1000).                                                                                                                                                                                                                              |
| `--origin <value>`             | unchanged                                                                      | The site's origin, as the plugin's Kindgi → Settings page shows it (`https://acme-store.example`): https, no path. `http://` only for localhost, 127.0.0.1 or \[::1].                                                                                                                      |
| `--people-cap <value>`         | unchanged                                                                      | At most this many live people from the site (1 to 10000).                                                                                                                                                                                                                                  |
| `--project <value>`            | the tenant's Default project                                                   | The site's project, by id (default: the tenant's Default project).                                                                                                                                                                                                                         |
| `--reviewer-ceiling <value>`   | unchanged                                                                      | The highest reviewer role the site's people can have: `standard` or `senior`.                                                                                                                                                                                                              |
| `--role-map <value>`           | unchanged; with `--allowed-role` alone, the entries of the roles still allowed | For each allowed role, what it gets in the project, as JSON or `@<file>`: `{"shop_manager": {"ask": true, "reviewer": "standard"}}`. `ask`: whether it may start turns with the agents; `reviewer`: `standard` or `senior` (at most --reviewer-ceiling), or absent to decide no approvals. |
| `--vouching <value>`           | unchanged                                                                      | `on` or `off`: whether the site's sign-ins are taken at all.                                                                                                                                                                                                                               |

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

**Examples**

Allow more people from the site.

```sh
kindgi sites update <site-id> --people-cap=100 --new-people-per-day=40
```

Stop the site's administrators signing in; shop managers keep what the role map gives them.

```sh
kindgi sites update <site-id> --allowed-role=shop_manager
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites pause`

**Synopsis**

```sh signature
kindgi sites pause <site-id> [--project=<project-id>]
```

Stop a site's sign-ins: its statements are refused until it's resumed, and its people's live sessions end now.

**Options**

| Option              | Default                      | Description                                                        |
| ------------------- | ---------------------------- | ------------------------------------------------------------------ |
| `--project <value>` | the tenant's Default project | The site's project, by id (default: the tenant's Default project). |

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

**Examples**

Stop a site's sign-ins and end its people's sessions now.

```sh
kindgi sites pause <site-id>
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites resume`

**Synopsis**

```sh signature
kindgi sites resume <site-id> [--project=<project-id>]
```

Start a paused site's sign-ins again.

**Options**

| Option              | Default                      | Description                                                        |
| ------------------- | ---------------------------- | ------------------------------------------------------------------ |
| `--project <value>` | the tenant's Default project | The site's project, by id (default: the tenant's Default project). |

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

**Examples**

Let a paused site's people sign in again.

```sh
kindgi sites resume <site-id>
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites revoke-key`

**Synopsis**

```sh signature
kindgi sites revoke-key <site-id> <kid> [--project=<project-id>]
```

Revoke one of a site's keys, by its id (`kindgi sites get` lists them, with thumbprints to compare with the plugin's): statements signed with it are refused from now on, and the site's live sessions end. Tenant admins only.

**Options**

| Option              | Default                      | Description                                                        |
| ------------------- | ---------------------------- | ------------------------------------------------------------------ |
| `--project <value>` | the tenant's Default project | The site's project, by id (default: the tenant's Default project). |

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

**Examples**

Refuse what a site's key signs from now on.

```sh
kindgi sites revoke-key <site-id> <kid>
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites restore-person`

**Synopsis**

```sh signature
kindgi sites restore-person <site-id> <user-id> [--project=<project-id>]
```

Let one of a site's people removed in Kindgi back in, by their user id (`kindgi people list --include-removed` finds it): the same person, with their history, and their grants come back the next time the site signs them in. Refused, with nothing changed, for someone who isn't removed, someone their site said left (if they come back, it signs them in as a new person), and someone who also signs in another way. Tenant admins only. Needs a runtime on Kindgi 0.1.10 or later.

**Options**

| Option              | Default                      | Description                                                        |
| ------------------- | ---------------------------- | ------------------------------------------------------------------ |
| `--project <value>` | the tenant's Default project | The site's project, by id (default: the tenant's Default project). |

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

**Examples**

Let a person removed in Kindgi back in through their site: the same person, with their history.

```sh
kindgi sites restore-person <site-id> <user-id>
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)

### `kindgi sites unregister`

**Synopsis**

```sh signature
kindgi sites unregister <site-id> [--project=<project-id>]
```

Unregister a site: its sign-ins stop and its live sessions end. The people it signed in stay, with their records.

**Options**

| Option              | Default                      | Description                                                        |
| ------------------- | ---------------------------- | ------------------------------------------------------------------ |
| `--project <value>` | the tenant's Default project | The site's project, by id (default: the tenant's Default project). |

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

**Examples**

Remove a site; the people it signed in stay, with their records.

```sh
kindgi sites unregister <site-id>
```

**See also**

- [Let a store's staff ask and approve in WordPress](https://docs.kindgi.com/sites/wordpress.md)
- [`kindgi sites`](https://docs.kindgi.com/reference/cli/sites.md#kindgi-sites)
