> ## Documentation Index
> Fetch the complete documentation index at: https://docs.idyl.network/llms.txt
> Use this file to discover all available pages before exploring further.

# idyl file

> Manage files in the entered workspace

Manage small durable files in the entered Workspace.

Enter a Workspace with 'idyl use \<namespace>/\<workspace>'. Files are local to
that Workspace and are snapshotted as the immutable input to a Workspace Run.

## Usage

```bash theme={null}
idyl file
```

## Commands

| Command            | Description                       |
| ------------------ | --------------------------------- |
| `idyl file delete` | Delete a workspace file           |
| `idyl file get`    | Read a workspace file             |
| `idyl file list`   | List workspace files              |
| `idyl file put`    | Store or replace a workspace file |

## Inherited flags

| Flag                                 | Description                                                        |
| ------------------------------------ | ------------------------------------------------------------------ |
| `-a <string>, --account-id <string>` | Account ID to use, overriding the current context.                 |
| `-c <string>, --context <string>`    | Use the named context for this command.                            |
| `--homedir <string>`                 | Override the configuration directory. Defaults to \~/.config/idyl. |
| `-n <string>, --namespace <string>`  | Namespace to address, overriding the entered context.              |
| `--network <string>`                 | Override the Network for this command.                             |
| `-p <string>, --profile <string>`    | Override the access profile for this command.                      |
| `-s <string>, --subnet <string>`     | Subnet to use for this command, overriding the current context.    |
| `--workspace <string>`               | Workspace within the namespace, overriding the entered context.    |

## Subcommand reference

### `idyl file delete`

Delete a workspace file

#### Usage

```bash theme={null}
idyl file delete <workspace-path> [flags]
```

#### Flags

| Flag        | Description                |
| ----------- | -------------------------- |
| `-y, --yes` | Skip confirmation prompts. |

### `idyl file get`

Read a Workspace file to stdout, or write it to --to.

An existing local destination is refused unless --force is set.

#### Usage

```bash theme={null}
idyl file get <workspace-path> [flags]
```

#### Flags

| Flag            | Description                                                     |
| --------------- | --------------------------------------------------------------- |
| `--force`       | Replace an existing local destination.                          |
| `--to <string>` | Write to this local path instead of stdout. Use '-' for stdout. |

### `idyl file list`

List workspace files

#### Usage

```bash theme={null}
idyl file list [flags]
```

#### Flags

| Flag                             | Description                                         |
| -------------------------------- | --------------------------------------------------- |
| `--limit <int>`                  | Maximum number of files to list. Default: `20`.     |
| `--offset <int>`                 | Number of files to skip. Default: `0`.              |
| `-o <string>, --output <string>` | Output format: table, json, yaml. Default: `table`. |

### `idyl file put`

Store bytes at a relative Workspace path.

Use '-' as the local path to read content from stdin.

#### Usage

```bash theme={null}
idyl file put <workspace-path> <local-path|-> [flags]
```

#### Flags

| Flag                             | Description                                         |
| -------------------------------- | --------------------------------------------------- |
| `-o <string>, --output <string>` | Output format: table, json, yaml. Default: `table`. |

#### Examples

```bash theme={null}
idyl file put src/main.py ./main.py
printf 'hello\n' | idyl file put notes/today.txt -
```
