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.
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.