> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tai42.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# tai scopes

> Manage access-control scopes.

Manage access-control scopes.

```console theme={null}
$ tai scopes [OPTIONS] COMMAND [ARGS]...
```

## `tai scopes add`

Map a URL to a scope (optionally with a dynamic match pattern).

Example: `tai scopes add read /api/tools`

```console theme={null}
$ tai scopes add [OPTIONS] SCOPE_ID URL
```

| Argument   | Description                             |
| ---------- | --------------------------------------- |
| `SCOPE_ID` | Scope id. *(required)*                  |
| `URL`      | URL to map into the scope. *(required)* |

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--pattern` `TEXT`     | Optional dynamic match pattern.        |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai scopes delete`

Delete a scope.

Example: `tai scopes delete read`

```console theme={null}
$ tai scopes delete [OPTIONS] SCOPE_ID
```

| Argument   | Description            |
| ---------- | ---------------------- |
| `SCOPE_ID` | Scope id. *(required)* |

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai scopes list`

List every non-public route mapping as `&#123;url: scope_id&#125;`.

Example: `tai scopes list`

```console theme={null}
$ tai scopes list [OPTIONS]
```

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai scopes public-list`

List every route pinned to the public marker.

Example: `tai scopes public-list`

```console theme={null}
$ tai scopes public-list [OPTIONS]
```

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai scopes public-pin`

Pin a URL public (optionally with a dynamic match pattern).

Example: `tai scopes public-pin /universal_webhook/orders`

```console theme={null}
$ tai scopes public-pin [OPTIONS] URL
```

| Argument | Description                     |
| -------- | ------------------------------- |
| `URL`    | URL to pin public. *(required)* |

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--pattern` `TEXT`     | Optional dynamic match pattern.        |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai scopes public-unpin`

Unpin a public URL.

Example: `tai scopes public-unpin /universal_webhook/orders`

```console theme={null}
$ tai scopes public-unpin [OPTIONS] URL
```

| Argument | Description                |
| -------- | -------------------------- |
| `URL`    | URL to unpin. *(required)* |

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai scopes remove-url`

Remove a URL from every scope that references it.

Example: `tai scopes remove-url /api/tools`

```console theme={null}
$ tai scopes remove-url [OPTIONS] URL
```

| Argument | Description                                 |
| -------- | ------------------------------------------- |
| `URL`    | URL to unmap from every scope. *(required)* |

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |

## `tai scopes routes`

List the app's HTTP routes with each route's scope mapping.

A `mapped` of `null` marks an unassigned route. Example: `tai scopes routes`

```console theme={null}
$ tai scopes routes [OPTIONS]
```

| Option                 | Description                            |
| ---------------------- | -------------------------------------- |
| `--json` / `--no-json` | Emit raw JSON instead of human tables. |
