Skip to main content
Transfer files between your local machine and sandboxes, or manage files directly inside the sandbox filesystem.
File operations use the sandbox proxy URL: https://<sandbox-id-or-name>.sandbox.tensorlake.aiNamed sandboxes can use the sandbox name in place of the ID in the proxy hostname. The file APIs documented here run on the management URL on port 9501, which always requires authentication. Unauthenticated proxy access applies only to exposed user ports.

Copy Files

# Copy a local file into the sandbox
tl sbx cp data.csv <sandbox-id>:/workspace/data.csv

# Copy a file from the sandbox to local
tl sbx cp <sandbox-id>:/workspace/data.csv ./data.csv
tl sbx cp is file-only today. Directory copy workflows should use the Python SDK, TypeScript SDK, or the raw file API.

Read Files

tl sbx cp <sandbox-id>:/workspace/data.csv ./data.csv
tl sbx exec <sandbox-id> cat /workspace/data.csv

Write Files

tl sbx cp config.json <sandbox-id>:/workspace/config.json

List Directory Contents

tl sbx exec <sandbox-id> ls -la /workspace

Delete Files

tl sbx exec <sandbox-id> rm -rf /workspace/temp

Organize Files

tl sbx exec <sandbox-id> mkdir -p /workspace/src/components
tl sbx exec <sandbox-id> mv /workspace/old.txt /workspace/new.txt

Best Practices

  • Use /workspace as the default directory for application files.
  • Use absolute paths to avoid ambiguity.
  • Use write_file / read_file for programmatic access.
  • Use tl sbx cp for single-file transfers.
  • Use the Python SDK, TypeScript SDK, or raw file API for directory-oriented workflows.

Learn More

Commands

Execute commands in sandboxes.

Snapshots

Save and restore sandbox filesystem, memory, and running processes.

Lifecycle

Sandbox states, resources, and timeouts.