containerio CLI (io)
Module: containerio.tools.cli
Description
Section titled “Description”py-containerio: Azure Blob Storage CLI
io [--env ENV] [--container CONTAINER] <command> [options]Global options
Section titled “Global options”| Option | Description |
|---|---|
--env |
Override STORAGE_ENV. ‘local’ = no Azure (./data/), ‘prod’ loads .env, any other name loads .env.<name>. Default: uses STORAGE_ENV env var. |
--container |
Azure container name (required for Azure operations) |
Commands
Section titled “Commands”io auth
Section titled “io auth”Manage authentication (login, status, clear)
| Option | Description |
|---|---|
action |
Auth action (default: login) |
--method |
Authentication method (default: device-code) |
--force |
Clear cache before login (device-code only) |
List blobs in a container
io download
Section titled “io download”Download a blob to local data/ directory
| Option | Description |
|---|---|
blob_name |
Name of the blob to download |
io download-dir
Section titled “io download-dir”Download all blobs under a prefix to a local directory
| Option | Description |
|---|---|
dir_prefix |
Storage path/prefix to download recursively (default: empty = entire container) |
--local-dir |
Local destination directory (default: ./data) |
io upload
Section titled “io upload”Upload a local file to a container
| Option | Description |
|---|---|
blob_name |
Destination path/name in the container |
file_path |
Path to the local file to upload |
io upload-dir
Section titled “io upload-dir”Upload a local directory recursively to a container
| Option | Description |
|---|---|
local_dir |
Path to the local directory to upload |
--blob-prefix |
Destination prefix in the container (default: root) |
Delete a blob or folder from a container
| Option | Description |
|---|---|
path |
Blob name or folder path to delete |
Move (rename) a blob within the same container
| Option | Description |
|---|---|
source |
Current path/name of the blob |
destination |
New path/name for the blob |
--overwrite |
Overwrite destination if it already exists |
io generate-sas
Section titled “io generate-sas”Generate an Azure Storage SAS token for a container
| Option | Description |
|---|---|
--days |
Token validity in days, max 7 (default: 1) |
--update-env |
Write token to .env file instead of printing |
--write |
Also grant write+delete (default is read+list only) |
io session
Section titled “io session”Manage session defaults for env and container
| Option | Description |
|---|---|
action |
Use ‘clear’ to end the current session |
