File Transfer

View as Markdown

Chaser provides several ways to move files between your local machine and sandbox sessions.

Upload and download

Transfer individual files through the CLI or REST API.

CLI

$# Upload a local file
$chaser upload <session_id> ./app.js /workspace/app.js
$
$# Download a remote file
$chaser download <session_id> /workspace/app.js ./app.js

REST API

$# Upload (multipart form)
$curl -sS "$CHASER_API_URL/v1/sessions/<session_id>/upload" \
> -H "Authorization: Bearer $CHASER_API_KEY" \
> -F "path=/workspace/app.js" \
> -F "file=@./app.js" | jq
$
$# Download
$curl -sS "$CHASER_API_URL/v1/sessions/<session_id>/download?path=/workspace/app.js" \
> -H "Authorization: Bearer $CHASER_API_KEY" \
> --output ./app.js

File transfer supports files up to 16 MB per operation. Only sandbox sessions support file transfer.

Teleport

chaser teleport uploads an entire local directory to a sandbox. It packages the directory as a tar.gz archive, uploads it, extracts it remotely, and optionally opens an interactive shell.

$# Upload current directory and open a shell
$chaser teleport <session_id>
$
$# Upload a specific directory
$chaser teleport <session_id> --local ./my-app --remote /workspace
$
$# Upload without opening a shell
$chaser teleport <session_id> --local ./my-app --no-shell

The remote extraction path is <remote_root>/<local_basename>. For example, --local ./my-app --remote /workspace extracts to /workspace/my-app.

MCP file operations

The terminal MCP tool supports structured file operations through the xml parameter:

  • read_file — read file contents
  • write_file — write content to a file
  • apply_edit — apply a targeted edit to a file
  • list_files — list directory contents