Skip to main content
Download a file from the session image to a local path.

Examples

# Copy a config file locally
contree cp /etc/nginx/nginx.conf ./nginx.conf

# Download a build artifact
contree cp /app/dist/output.tar.gz ./output.tar.gz

Help output

$ contree cp —help
usage: contree cp [-h] path dest

Copy a file from the session image to a local path.

Downloads the file at PATH inside the current session image and writes
it to DEST on the local filesystem. Progress is logged for large files.
Unlike `cat`, this command handles binary content and does not require
a terminal.

positional arguments:
path Path inside image
dest Local destination path

options:
-h, —help show this help message and exit

for coding agents:
read-only command against remote image, writes local file DEST
suitable for binary files
—format is ignored; command writes bytes directly

agent note:
Before using this command in an automated workflow, read:
contree agent

Behavior

The file is streamed from the image directly – no sandbox is started. For large files, progress is logged every 5 seconds with download speed and ETA. The final log line shows total size and average speed.

See also