kindgi files
kindgi files
Section titled “kindgi files”Synopsis
kindgi files <command>Files kept in the runtime, with every version: list, get, versions, download, upload, restore, pin, unpin, pin-history, delete.
Commands
| Command | Description |
|---|---|
kindgi files list |
List the files you can read, newest change first: by run, project or type. |
kindgi files get |
A file: its name, project and run, Latest, and its pinned versions. |
kindgi files versions |
Every version of a file, newest first, deleted and purged ones too, each with its state. |
kindgi files download |
Download a version to a file, Latest unless one is named: -o's path, else its own name in this directory (an existing file is kept unless --force). |
kindgi files upload |
Upload a file: version 1 of a new file, in its run's project, else --project's, else the project your API key is limited to, else the workspace's default. |
kindgi files restore |
Add a version with an earlier version's bytes, which becomes Latest. |
kindgi files pin |
Pin a version: it can't be deleted, and retention keeps it. |
kindgi files unpin |
Take a version's pin off. |
kindgi files pin-history |
Every pin and unpin of a file's versions, newest first. |
kindgi files delete |
Delete a file and every version, or with a version, that version. |
See also
kindgi files list
Section titled “kindgi files list”Synopsis
kindgi files list [--run=<run-id>] [--project=<project-id>] [--content-type=<mime>] [--limit=<n>] [--cursor=<c>] [--table]List the files you can read, newest change first: by run, project or type.
Options
| Option | Default | Description |
|---|---|---|
--content-type <value> |
none | Only files whose Latest has this MIME type. |
--cursor <value> |
none | Resume after this cursor, from the previous page's nextCursor. |
--limit <value> |
25 (at most 100) |
The most to return (default 25, at most 100). |
--project <value> |
none | Only one project's files. |
--run <value> |
none | Only the files whose version 1 this run made. |
Every command also takes the global flags.
Examples
List the files one run made, as a table.
kindgi files list --run=<run-id> --tableFrom Keep files with a run:
pnpm exec kindgi files list --run=<run-id> --tableSee also
kindgi files get
Section titled “kindgi files get”Synopsis
kindgi files get <file-id> [<version>]A file: its name, project and run, Latest, and its pinned versions. With a version, that version. Never its bytes.
Options
Every command also takes the global flags.
Examples
Show a file and its Latest version; add a version number for that version's details.
kindgi files get <file-id>From Keep files with a run:
pnpm exec kindgi files get <file-id>See also
kindgi files versions
Section titled “kindgi files versions”Synopsis
kindgi files versions <file-id> [--limit=<n>] [--cursor=<c>] [--table]Every version of a file, newest first, deleted and purged ones too, each with its state.
Options
| Option | Default | Description |
|---|---|---|
--cursor <value> |
none | Resume after this cursor, from the previous page's nextCursor. |
--limit <value> |
25 (at most 100) |
The most to return (default 25, at most 100). |
Every command also takes the global flags.
Examples
List a file's versions as a table, with which one is Latest, and which are deleted or pinned.
kindgi files versions <file-id> --tableSee also
kindgi files download
Section titled “kindgi files download”Synopsis
kindgi files download <file-id> [<version>] [-o <file>] [--force]Download a version to a file, Latest unless one is named: -o's path, else its own name in this directory (an existing file is kept unless --force). The file is written only once the whole download has arrived.
Options
| Option | Default | Description |
|---|---|---|
--force |
off | Overwrite the file if it exists. |
--o <value> |
the version's own name, in the current directory | Write it to this file. |
Every command also takes the global flags.
Examples
Save a file's version 2 under a name you pick.
kindgi files download <file-id> 2 -o report-v2.pdfFrom Keep files with a run:
pnpm exec kindgi files download <file-id> -o report.pdfSee also
kindgi files upload
Section titled “kindgi files upload”Synopsis
kindgi files upload <path> [--to=<file-id> [--expected-version=<n>]] [--name=<name>] [--content-type=<mime>] [--run=<run-id>] [--project=<project-id>] [--tag=<key>=<value>]…Upload a file: version 1 of a new file, in its run's project, else --project's, else the project your API key is limited to, else the workspace's default. With --to, a new version of that file. The runtime caps an upload (100 MiB unless set otherwise).
Options
| Option | Default | Description |
|---|---|---|
--content-type <value> |
from the file's extension, else application/octet-stream |
Its MIME type (default: from the file's extension, else application/octet-stream). |
--expected-version <value> |
none: the last write wins | With --to: the version you built on. If Latest isn't it, nothing is written. |
--name <value> |
the file's name; with --to, Latest's |
Its name (default: the file's name; with --to, Latest's). |
--project <value> |
with --run, the run's project; else the project your API key is limited to; else the workspace's default project |
With no --run: the project it belongs to. |
--run <value> |
none | The run that made it: it joins that run's project. |
--tag <value> |
none | A label, key=value (repeatable). Repeatable. |
--to <value> |
none: version 1 of a file | Add a version to this file, which becomes its Latest. |
Every command also takes the global flags.
Examples
Keep a file in a project: it becomes version 1 of a file.
kindgi files upload ./report.pdf --project=<project-id>Add a version to that file, unless someone added one after version 1.
kindgi files upload ./report.pdf --to=<file-id> --expected-version=1From Keep files with a run:
pnpm exec kindgi files upload report.pdf --run=<run-id> --tag=kind=summarypnpm exec kindgi files upload report.pdf --to=<file-id> --expected-version=1See also
kindgi files restore
Section titled “kindgi files restore”Synopsis
kindgi files restore <file-id> <version> [--expected-version=<n>]Add a version with an earlier version's bytes, which becomes Latest. Nothing is removed.
Options
| Option | Default | Description |
|---|---|---|
--expected-version <value> |
none: the last write wins | The Latest you expect. If Latest isn't it, nothing is written. |
Every command also takes the global flags.
Examples
Make version 2's bytes Latest again, as a version of its own, unless someone added a version after 5.
kindgi files restore <file-id> 2 --expected-version=5See also
kindgi files pin
Section titled “kindgi files pin”Synopsis
kindgi files pin <file-id> <version> [--reason=<text>]Pin a version: it can't be deleted, and retention keeps it. Latest doesn't move.
Options
| Option | Default | Description |
|---|---|---|
--reason <value> |
none | Why, kept with the change (at most 500 characters). |
Every command also takes the global flags.
Examples
Keep version 3: it can't be deleted, and retention keeps it.
kindgi files pin <file-id> 3 --reason="signed by the client"See also
kindgi files unpin
Section titled “kindgi files unpin”Synopsis
kindgi files unpin <file-id> <version> [--reason=<text>]Take a version's pin off. Latest doesn't move.
Options
| Option | Default | Description |
|---|---|---|
--reason <value> |
none | Why, kept with the change (at most 500 characters). |
Every command also takes the global flags.
Examples
Take version 3's pin off, saying why.
kindgi files unpin <file-id> 3 --reason="superseded by version 5"See also
kindgi files pin-history
Section titled “kindgi files pin-history”Synopsis
kindgi files pin-history <file-id> [--limit=<n>] [--cursor=<c>] [--table]Every pin and unpin of a file's versions, newest first.
Options
| Option | Default | Description |
|---|---|---|
--cursor <value> |
none | Resume after this cursor, from the previous page's nextCursor. |
--limit <value> |
25 (at most 100) |
The most to return (default 25, at most 100). |
Every command also takes the global flags.
Examples
See every pin and unpin of a file's versions, newest first.
kindgi files pin-history <file-id> --tableSee also
kindgi files delete
Section titled “kindgi files delete”Synopsis
kindgi files delete <file-id> [<version>] [--yes]Delete a file and every version, or with a version, that version. It asks first. Deleted versions stay until the retention policy for file_version purges them.
Options
| Option | Default | Description |
|---|---|---|
--yes |
off | Don't ask first (for scripts). |
Every command also takes the global flags.
Examples
Delete a file's version 1, without being asked first.
kindgi files delete <file-id> 1 --yesFrom Keep files with a run:
pnpm exec kindgi files delete <file-id> --yesSee also