files command (alias: f). Read, write, list, upload, download, and delete files from the command line.
Command Syntax
Subcommands
read
Read file contents from a sandbox.
Syntax:
SANDBOX_ID- Sandbox ID (required)PATH- File path to read (required)
--output, -o FORMAT- Output format:table,json,plain(default:table)
0- Success3- Authentication error4- Sandbox or file not found
write
Write data to a file in a sandbox.
Syntax:
SANDBOX_ID- Sandbox ID (required)PATH- File path to write (required)
--data, -d TEXT- Data to write (use-to read from stdin)
0- Success3- Authentication error4- Sandbox not found
list
List files and directories in a sandbox.
Syntax:
SANDBOX_ID- Sandbox ID (required)PATH- Directory path (optional, default:/workspace)
--output, -o FORMAT- Output format:table,json,plain(default:table)
0- Success3- Authentication error4- Sandbox not found
delete
Delete a file or directory from a sandbox.
Syntax:
SANDBOX_ID- Sandbox ID (required)PATH- File or directory path to delete (required)
--force- Skip confirmation prompt
0- Success3- Authentication error4- Sandbox or file not found
upload
Upload a local file to a sandbox.
Syntax:
SANDBOX_ID- Sandbox ID (required)LOCAL_PATH- Local file path (required)REMOTE_PATH- Remote file path in sandbox (required)
0- Success3- Authentication error4- Sandbox not found
download
Download a file from a sandbox to local filesystem.
Syntax:
SANDBOX_ID- Sandbox ID (required)REMOTE_PATH- Remote file path in sandbox (required)LOCAL_PATH- Local file path (required)
0- Success3- Authentication error4- Sandbox or file not found
info
Get detailed information about a file or directory.
Syntax:
SANDBOX_ID- Sandbox ID (required)PATH- File or directory path (required)
--output, -o FORMAT- Output format:table,json,plain(default:table)
0- Success3- Authentication error4- Sandbox or file not found
Shell Scripting Examples
Upload and Process File
Download Results
Batch File Operations
Related
- CLI Quickstart - Get started with CLI
- Sandbox Commands - Manage sandboxes
- Code Execution - Execute code in sandboxes
- Python SDK: Files - Python SDK file operations
- JavaScript SDK: Files - JavaScript SDK file operations
- API: File Operations - REST API endpoints
Next Steps
- Learn about Code Execution to process files
- Explore Environment Variables to configure file operations
- Review Sandbox Management to create and manage sandboxes

