# kindgi artifacts

> Files kept in the runtime, each in a project: list, get, upload, download, delete

## `kindgi artifacts`

**Synopsis**

```sh signature
kindgi artifacts <command>
```

Files kept in the runtime, each in a project: list, get, upload, download, delete.

**Commands**

| Command                                                                                                             | Description                                                                                                               |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| [`kindgi artifacts list`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts-list)         | List artifacts you can read, newest first: by run, project or type.                                                       |
| [`kindgi artifacts get`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts-get)           | An artifact's name, type, size and sha256, without its bytes.                                                             |
| [`kindgi artifacts upload`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts-upload)     | Upload a file as an artifact: it belongs to its run's project, else --project's, else the tenant's default.               |
| [`kindgi artifacts download`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts-download) | Download an artifact to a file: -o's path, else its own name in this directory (an existing file is kept unless --force). |
| [`kindgi artifacts delete`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts-delete)     | Delete an artifact.                                                                                                       |

**See also**

- [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md)

### `kindgi artifacts list`

**Synopsis**

```sh signature
kindgi artifacts list [--run=<run-id>] [--project=<project-id>] [--content-type=<mime>] [--limit=<n>] [--cursor=<c>] [--table]
```

List artifacts you can read, newest first: by run, project or type.

**Options**

| Option                   | Default              | Description                                                      |
| ------------------------ | -------------------- | ---------------------------------------------------------------- |
| `--content-type <value>` | none                 | Only this MIME type.                                             |
| `--cursor <value>`       | none                 | Resume after this cursor, from the previous page's `nextCursor`. |
| `--limit <value>`        | `25` (at most `100`) | The most artifacts to return (default 25, at most 100).          |
| `--project <value>`      | none                 | Only one project's artifacts.                                    |
| `--run <value>`          | none                 | Only the artifacts this run produced.                            |

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

**Examples**

From [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md):

```sh
pnpm exec kindgi artifacts list --run=<run-id> --table
```

**See also**

- [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md)
- [`kindgi artifacts`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts)

### `kindgi artifacts get`

**Synopsis**

```sh signature
kindgi artifacts get <blob-id>
```

An artifact's name, type, size and sha256, without its bytes.

**Options**

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

**Examples**

From [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md):

```sh
pnpm exec kindgi artifacts get <blob-id>
```

**See also**

- [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md)
- [`kindgi artifacts`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts)

### `kindgi artifacts upload`

**Synopsis**

```sh signature
kindgi artifacts upload <file> [--name=<name>] [--content-type=<mime>] [--run=<run-id>] [--project=<project-id>] [--tag=<key>=<value>]…
```

Upload a file as an artifact: it belongs to its run's project, else --project's, else the tenant's default. The runtime caps an upload (100 MiB unless set otherwise).

**Options**

| Option                   | Default                                                            | Description                                                                     |
| ------------------------ | ------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
| `--content-type <value>` | `application/octet-stream`                                         | Its MIME type, such as `application/pdf` (default: `application/octet-stream`). |
| `--name <value>`         | the file's name                                                    | Its name (default: the file's name).                                            |
| `--project <value>`      | with `--run`, the run's project; else the tenant's Default project | With no --run: the project it belongs to.                                       |
| `--run <value>`          | none                                                               | The run that produced it: it joins that run's project.                          |
| `--tag <value>`          | none                                                               | A label, `key=value` (repeatable). Repeatable.                                  |

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

**Examples**

From [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md):

```sh
pnpm exec kindgi artifacts upload report.pdf --run=<run-id> --content-type=application/pdf --tag=kind=summary
```

**See also**

- [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md)
- [`kindgi artifacts`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts)

### `kindgi artifacts download`

**Synopsis**

```sh signature
kindgi artifacts download <blob-id> [-o <file>] [--force]
```

Download an artifact to a file: -o's path, else its own name in this directory (an existing file is kept unless --force).

**Options**

| Option        | Default                                           | Description                      |
| ------------- | ------------------------------------------------- | -------------------------------- |
| `--force`     | off                                               | Overwrite the file if it exists. |
| `--o <value>` | the artifact's own name, in the current directory | Write it to this file.           |

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

**Examples**

From [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md):

```sh
pnpm exec kindgi artifacts download <blob-id> -o report.pdf
```

**See also**

- [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md)
- [`kindgi artifacts`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts)

### `kindgi artifacts delete`

**Synopsis**

```sh signature
kindgi artifacts delete <blob-id>
```

Delete an artifact. It stays recoverable until the retention policy for `artifact` purges it.

**Options**

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

**Examples**

From [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md):

```sh
pnpm exec kindgi artifacts delete <blob-id>
```

**See also**

- [Keep files with a run](https://docs.kindgi.com/v0.1.10/guides/runs/keep-files-with-a-run.md)
- [`kindgi artifacts`](https://docs.kindgi.com/v0.1.10/reference/cli/artifacts.md#kindgi-artifacts)
