Manage files in Castari’s managed storage. Upload, list, and manage files that can be attached to agents.
Command Overview
Command
Description
cast files list
List files in storage
cast files upload
Upload a file
cast files get
Get file details
cast files delete
Delete a file
cast files download
Download a file
cast files usage
Show storage usage
cast files list
List files in your managed storage.
Usage
cast files list [options]
Options
Option
Description
--limit <n>
Maximum files to return (default: 50)
--offset <n>
Number of files to skip (default: 0)
--scope <scope>
Filter by scope: user, agent, session
--tags <tags>
Filter by tags (comma-separated)
--search <query>
Search in filename and description
Example
cast files list
Output
File ID Filename Size Scope Createdfile_abc123 training-data.csv 2.4 MB user Jan 15, 2024file_def456 config.json 1.2 KB user Jan 14, 2024file_ghi789 reference.txt 45.6 KB user Jan 13, 2024ℹ Showing 3 of 3 files
✓ Uploaded data.csv File ID file_abc123 Size 2.4 MB → Attach to agent: cast agents files add <agent-slug> file_abc123
Files larger than 10MB automatically use presigned uploads for better performance.
cast files get
Get detailed information about a file.
Usage
cast files get <file_id>
Example
cast files get file_abc123
Output
File ID file_abc123 Filename data.csv Size 2.4 MB Content Type text/csv Scope user Status confirmed Description Training data Tags dataset, ml SHA256 a1b2c3d4e5f6... Created Jan 15, 2024 10:30 AM Updated Jan 15, 2024 10:30 AM
cast files delete
Delete a file from storage.
Usage
cast files delete <file_id> [options]
Options
Option
Description
-f, --force
Skip confirmation prompt
Example
cast files delete file_abc123
Output
Are you sure you want to delete file 'file_abc123'? [y/N] y✓ File 'file_abc123' deleted
Deleting a file will also detach it from any agents it was attached to.
Custom mount path (default: /files/agent/<filename>)
--writable
Make file writable (default: read-only)
Example
cast agents files add my-agent file_abc123
Output
✓ File attached to agent 'my-agent' File ID file_abc123 Filename data.csv Mount Path /files/agent/data.csv Mode read-only → File will be available at /files/agent/data.csv in the sandbox