file

Command: file

The turbot file set of commands is used to manage file resources in a Turbot Guardrails workspace.

Usage

Usage: turbot file <subcommand> [options]

Supported Sub-commands

Command Description
turbot file cp Copy local json or yml file to a Guardrails workspace or vice versa.
turbot file rm Remove a file from Guardrails workspace.
turbot file cat Type out a file from Guardrails workspace.

turbot file cp <source> <destination> [options]

Copy a json or y(a)ml file from the local machine to a Turbot Guardrails workspace or vice versa.

The source or destination can be either local a local file or a file resource in a Guardrails workspace, denoted by prefixing the resource aka with turbot:// (for example: turbot://valid_aka.).

If the destination already exists (be it a Turbot Guardrails resource or a local file), then the CLI prompts for a confirmation before overwriting. This behaviour can be overridden with --force.

The supported options are:

Depending on the source and destination the command has different outcomes:

turbot file cp local.json|local.yml turbot://<file resource aka>

Copies the contents of local.json to turbot://<file resource aka>.

turbot file cp local.json|local.yml turbot://<folder resource aka>

Creates a file resource with the contents of the local file with the folder resource with the given aka as parent.

turbot file cp turbot://<file resource aka> local.json|local.yml

Copies the contents of the file resource with the given aka into local.json or local.yml in the current directory.

turbot file cp turbot://<file resource aka> local_folder

Copies the file resource with the <file resource aka> into local_folder. Uses the title of the resource as the name of the file in the local filesystem.

turbot file cp turbot://<folder resource aka> local.json|local.yml

This is invalid. The CLI does not support copying contents of an entire workspace folder resource into a local file.


turbot file rm turbot://<file resource aka>

Removes existing file from Guardrails workspaces. Prompts for confirmation before deleting the resource.

The supported options are:


turbot file cat turbot://<file resource aka>

Types the contents of the resource onto the console.

The supported options are: