# kindgi blocks

> Data blocks: versioned prompts and settings agent versions pin (list / show / versions / publish / unregister / reinstate)

## `kindgi blocks`

**Synopsis**

```sh signature
kindgi blocks <command>
```

Data blocks: versioned prompts and settings agent versions pin (list / show / versions / publish / unregister / reinstate).

**Commands**

| Command                                                                                                        | Description                                                                                                                |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [`kindgi blocks list`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks-list)             | List data blocks (the latest version of each).                                                                             |
| [`kindgi blocks show`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks-show)             | Show a data block: its latest version, or the one named by `--block-version`.                                              |
| [`kindgi blocks versions`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks-versions)     | List a data block's versions, newest first.                                                                                |
| [`kindgi blocks publish`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks-publish)       | Publish a data block version into a project: a prompt (`--prompt`), settings (`--settings`), or a full definition as JSON. |
| [`kindgi blocks unregister`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks-unregister) | Unregister a data block version: no range picks it any more, but the agent versions that pin it keep running it.           |
| [`kindgi blocks reinstate`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks-reinstate)   | Reinstate an unregistered data block version, unchanged.                                                                   |

**See also**

- [Change a prompt or a setting without a deploy](https://docs.kindgi.com/v0.1.10/guides/evals/change-a-prompt-or-setting.md)

### `kindgi blocks list`

**Synopsis**

```sh signature
kindgi blocks list [--project=<id>] [--kind=prompt|settings] [--name=<prefix>] [--limit=<n>] [--cursor=<c>]
```

List data blocks (the latest version of each).

**Options**

| Option              | Default              | Description                                                      |
| ------------------- | -------------------- | ---------------------------------------------------------------- |
| `--cursor <value>`  | none                 | Resume after this cursor, from the previous page's `nextCursor`. |
| `--kind <value>`    | none                 | Only this kind: prompt or settings.                              |
| `--limit <value>`   | `25` (at most `100`) | The most to return (default 25, at most 100).                    |
| `--name <value>`    | none                 | Only ids starting with this.                                     |
| `--project <value>` | none                 | Only blocks of this project.                                     |

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

**Examples**

List the prompt blocks of a project.

```sh
kindgi blocks list --project=<project-id> --kind=prompt
```

List blocks whose ids start with a prefix.

```sh
kindgi blocks list --name=acme.reply
```

**See also**

- [Change a prompt or a setting without a deploy](https://docs.kindgi.com/v0.1.10/guides/evals/change-a-prompt-or-setting.md)
- [`kindgi blocks`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks)

### `kindgi blocks show`

**Synopsis**

```sh signature
kindgi blocks show <block-id> [--block-version=<semver>]
```

Show a data block: its latest version, or the one named by `--block-version`.

**Options**

| Option                    | Default            | Description                               |
| ------------------------- | ------------------ | ----------------------------------------- |
| `--block-version <value>` | the latest version | The version to show. Default: the latest. |

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

**Examples**

Show a block's latest version.

```sh
kindgi blocks show acme.reply-style
```

Show one version of a block.

```sh
kindgi blocks show acme.reply-style --block-version=1.0.0
```

**See also**

- [Change a prompt or a setting without a deploy](https://docs.kindgi.com/v0.1.10/guides/evals/change-a-prompt-or-setting.md)
- [`kindgi blocks`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks)

### `kindgi blocks versions`

**Synopsis**

```sh signature
kindgi blocks versions <block-id> [--include-unregistered] [--limit=<n>] [--cursor=<c>]
```

List a data block's versions, newest first.

**Options**

| Option                   | Default              | Description                                                      |
| ------------------------ | -------------------- | ---------------------------------------------------------------- |
| `--cursor <value>`       | none                 | Resume after this cursor, from the previous page's `nextCursor`. |
| `--include-unregistered` | off                  | Include unregistered versions (each with `unregisteredAt`).      |
| `--limit <value>`        | `25` (at most `100`) | The most to return (default 25, at most 100).                    |

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

**Examples**

List a block's versions, newest first.

```sh
kindgi blocks versions acme.reply-style
```

Include unregistered versions.

```sh
kindgi blocks versions acme.reply-style --include-unregistered
```

**See also**

- [Change a prompt or a setting without a deploy](https://docs.kindgi.com/v0.1.10/guides/evals/change-a-prompt-or-setting.md)
- [`kindgi blocks`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks)

### `kindgi blocks publish`

**Synopsis**

```sh signature
kindgi blocks publish <block-id> --block-version=<semver> --project=<id> (--prompt=<template>|@<file> | --settings=<json>|@<file> [--schema=<json>|@<file>]) [--description=<text>]
  kindgi blocks publish --project=<id> '<json>'|@<file>
```

Publish a data block version into a project: a prompt (`--prompt`), settings (`--settings`), or a full definition as JSON.

**Options**

| Option                    | Default  | Description                                                |
| ------------------------- | -------- | ---------------------------------------------------------- |
| `--block-version <value>` | required | The version to publish.                                    |
| `--description <value>`   | none     | A description for the version.                             |
| `--project <value>`       | required | The project the block belongs to. Required.                |
| `--prompt <value>`        | none     | A prompt block: its Liquid template, inline or `@<file>`.  |
| `--schema <value>`        | none     | A settings block's JSON Schema, inline or `@<file>`.       |
| `--settings <value>`      | none     | A settings block: its values as JSON, inline or `@<file>`. |

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

**Examples**

From [Change a prompt or a setting without a deploy](https://docs.kindgi.com/v0.1.10/guides/evals/change-a-prompt-or-setting.md):

```sh
pnpm exec kindgi blocks publish --project=<project-id> @reply-prompt.json
pnpm exec kindgi blocks publish acme.reply-style --block-version=1.0.0 --project=<project-id> --settings='{"maxSentences":3,"refundLimit":50}' --schema=@reply-style.schema.json
```

**See also**

- [Change a prompt or a setting without a deploy](https://docs.kindgi.com/v0.1.10/guides/evals/change-a-prompt-or-setting.md)
- [`kindgi blocks`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks)

### `kindgi blocks unregister`

**Synopsis**

```sh signature
kindgi blocks unregister <block-id> --block-version=<semver>
```

Unregister a data block version: no range picks it any more, but the agent versions that pin it keep running it.

**Options**

| Option                    | Default  | Description                          |
| ------------------------- | -------- | ------------------------------------ |
| `--block-version <value>` | required | The version to unregister. Required. |

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

**Examples**

Unregister a block version so no range picks it.

```sh
kindgi blocks unregister acme.reply-style --block-version=1.0.0
```

**See also**

- [Change a prompt or a setting without a deploy](https://docs.kindgi.com/v0.1.10/guides/evals/change-a-prompt-or-setting.md)
- [`kindgi blocks`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks)

### `kindgi blocks reinstate`

**Synopsis**

```sh signature
kindgi blocks reinstate <block-id> --block-version=<semver>
```

Reinstate an unregistered data block version, unchanged.

**Options**

| Option                    | Default  | Description                         |
| ------------------------- | -------- | ----------------------------------- |
| `--block-version <value>` | required | The version to reinstate. Required. |

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

**Examples**

Reinstate an unregistered block version.

```sh
kindgi blocks reinstate acme.reply-style --block-version=1.0.0
```

**See also**

- [Change a prompt or a setting without a deploy](https://docs.kindgi.com/v0.1.10/guides/evals/change-a-prompt-or-setting.md)
- [`kindgi blocks`](https://docs.kindgi.com/v0.1.10/reference/cli/blocks.md#kindgi-blocks)
