boxd machine cp copies files in either direction. It works the same from your laptop and from inside a machine, and it does not need SSH keys or any setup. The console has a file browser for the same job, and the SDKs cover directories as well as files.
Upload and download
NAME: prefix is the machine. Everything else is your local disk.
Where paths land
The path afterNAME: follows three rules:
A bare relative path is the common case, so
boxd machine cp ./notes.md myapp:notes.md puts the file in the home directory.
Whole directories
Add-r. The directory is tarred on the way out and untarred on arrival, so one call moves the whole tree.
The destination is the parent to drop the directory into, not the name it gets:
myapp:myproject gives you /home/boxd/myproject/myproject.
Copying from macOS also carries over the
._name AppleDouble files that tar creates for extended attributes. They are harmless, and find . -name '._*' -delete inside the machine clears them.Piping instead of files
Use- in place of a path to read from stdin or write to stdout:
machine exec works too, so cat data.json | boxd machine exec myapp -- 'jq .' behaves like a normal shell pipe. For moving bytes into a file, cp - stays the cleaner tool. It skips the shell entirely and verifies the byte count on arrival.
To write somewhere root owns, upload to /tmp first and move it with exec:
Between two machines
Every machine has the boxd CLI inside, so a machine can copy straight to another machine you own:Limits
Uploads and downloads have different ceilings:- Uploads stream. Copying onto a machine has no practical size limit.
- Downloads to your laptop move at most 4 MB per
cp. A-rdirectory counts as one download of its tar. - From inside a machine,
cpdownloads at most 1 GB per file.
exec instead, which has no cap:
curl or git. That uses the machine’s own bandwidth rather than yours.
From the console
Open a machine and pick the Files tab. It is a file browser over the same operations:- Browse folders, with a
..row to go up and a path bar to jump anywhere. - Upload with the button, or drag files and folders from your desktop onto the table. A dropped folder arrives whole. Drop onto a folder row to upload into that folder instead of the one you are in.
- Download a file, or a folder as a
.tar.gz. - Copy, cut, paste, rename, delete from the right-click menu, with the usual shortcuts: Ctrl or Cmd with C, X, V, D for download, F2 to rename, Delete. Click, Shift-click and Ctrl-click select several rows, Ctrl or Cmd with A selects everything, and the arrow keys move the selection.
- Anything that would overwrite an existing file or folder asks first, and a folder pasted or uploaded over a folder of the same name replaces it rather than nesting inside it.
exec for the full listing.
The Files tab, the terminal and the desktop follow the machine’s access rule: its owner, and every member of the org when the machine is shared.
From the SDKs
Both SDKs read and write files, and manage directories:boxd CLI stays read-only for other machines’ files on purpose.