Skip to content

kindgi files

View as Markdown

Synopsis

Terminal window
kindgi files <command>
Signature

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

Synopsis

Terminal window
kindgi files list [--run=<run-id>] [--project=<project-id>] [--content-type=<mime>] [--limit=<n>] [--cursor=<c>] [--table]
Signature

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.

Terminal window
kindgi files list --run=<run-id> --table

From Keep files with a run:

Terminal window
pnpm exec kindgi files list --run=<run-id> --table

See also

Synopsis

Terminal window
kindgi files get <file-id> [<version>]
Signature

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.

Terminal window
kindgi files get <file-id>

From Keep files with a run:

Terminal window
pnpm exec kindgi files get <file-id>

See also

Synopsis

Terminal window
kindgi files versions <file-id> [--limit=<n>] [--cursor=<c>] [--table]
Signature

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.

Terminal window
kindgi files versions <file-id> --table

See also

Synopsis

Terminal window
kindgi files download <file-id> [<version>] [-o <file>] [--force]
Signature

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.

Terminal window
kindgi files download <file-id> 2 -o report-v2.pdf

From Keep files with a run:

Terminal window
pnpm exec kindgi files download <file-id> -o report.pdf

See also

Synopsis

Terminal window
kindgi files upload <path> [--to=<file-id> [--expected-version=<n>]] [--name=<name>] [--content-type=<mime>] [--run=<run-id>] [--project=<project-id>] [--tag=<key>=<value>]…
Signature

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.

Terminal window
kindgi files upload ./report.pdf --project=<project-id>

Add a version to that file, unless someone added one after version 1.

Terminal window
kindgi files upload ./report.pdf --to=<file-id> --expected-version=1

From Keep files with a run:

Terminal window
pnpm exec kindgi files upload report.pdf --run=<run-id> --tag=kind=summary
pnpm exec kindgi files upload report.pdf --to=<file-id> --expected-version=1

See also

Synopsis

Terminal window
kindgi files restore <file-id> <version> [--expected-version=<n>]
Signature

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.

Terminal window
kindgi files restore <file-id> 2 --expected-version=5

See also

Synopsis

Terminal window
kindgi files pin <file-id> <version> [--reason=<text>]
Signature

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.

Terminal window
kindgi files pin <file-id> 3 --reason="signed by the client"

See also

Synopsis

Terminal window
kindgi files unpin <file-id> <version> [--reason=<text>]
Signature

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.

Terminal window
kindgi files unpin <file-id> 3 --reason="superseded by version 5"

See also

Synopsis

Terminal window
kindgi files pin-history <file-id> [--limit=<n>] [--cursor=<c>] [--table]
Signature

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.

Terminal window
kindgi files pin-history <file-id> --table

See also

Synopsis

Terminal window
kindgi files delete <file-id> [<version>] [--yes]
Signature

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.

Terminal window
kindgi files delete <file-id> 1 --yes

From Keep files with a run:

Terminal window
pnpm exec kindgi files delete <file-id> --yes

See also