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

# volume, file commands, and secret

> Volumes, files, secrets, and artifacts from a terminal.

Volumes hold files your workloads share, and artifacts hold downloadable task
output. Both belong to the selected workspace.

Repeatable workflows [declare volumes](/concepts/volumes) and
[secret dependencies](/concepts/secrets) in Python, and LazyCloud creates a
mounted volume on first use. These commands suit one-off storage work and
inspection.

## lazycloud volume

```bash theme={null}
uv run lazycloud volume list
uv run lazycloud volume create NAME
uv run lazycloud volume delete NAME [-y]     # deletes the files too; -y skips the prompt
```

## Files

The example creates a volume before any workload uses it. `volume create` is
unnecessary if a running workload already created its declared volume.

Volume paths are `lazycloud://<volume>/<path>`. The scheme is optional except
on the source of a download, where it marks the path as remote.

```bash theme={null}
uv run lazycloud ls REMOTE_PATH
uv run lazycloud cp SOURCE DESTINATION
uv run lazycloud rm REMOTE_PATH
uv run lazycloud mv ORIGINAL_PATH NEW_PATH
```

```bash theme={null}
uv run lazycloud volume create models
uv run lazycloud cp model.safetensors lazycloud://models/checkpoints/model.safetensors
uv run lazycloud ls models/checkpoints
uv run lazycloud cp lazycloud://models/checkpoints/model.safetensors ./model.safetensors
uv run lazycloud mv models/checkpoints/model.safetensors models/archive/model.safetensors
```

This uploads a local checkpoint, downloads a copy, and archives the remote file.
`uv run lazycloud rm models/archive/model.safetensors` removes the archived
file. Deleting a volume removes all its files, so download what you need first.

## lazycloud secret

```bash theme={null}
uv run lazycloud secret list
uv run lazycloud secret create NAME VALUE
uv run lazycloud secret modify NAME VALUE
uv run lazycloud secret show NAME [--reveal]   # metadata; --reveal prints the value
uv run lazycloud secret delete NAME
```

<Warning>
  A value typed on the command line lands in your shell history. Reading it
  from a variable or a file avoids that: `uv run lazycloud secret create OPENAI_API_KEY "$OPENAI_API_KEY"`.
</Warning>

## lazycloud artifact

`artifact list` finds files saved by tasks, and `artifact usage` reports their
storage use:

```bash theme={null}
uv run lazycloud artifact list --search report
uv run lazycloud artifact usage
```

`uv run lazycloud artifact delete <artifact-id>` removes a saved file. Lists
return a `next` cursor, and `--cursor <cursor>` fetches the next page. See
[Artifacts](/concepts/artifacts) for downloads and retention.

<Note>
  To change your default workspace, run `uv run lazycloud workspace use <name>`.
  Commands with a `--workspace` option can override it for one call.
</Note>
