Skip to main content
Mole transferring files

File Transfer Commands

Move files and directories to and from remote agents through the mesh. Works with any file size - data streams directly without loading into memory.

Quick examples:

# Upload a file
muti-metroo upload abc123 ./local-file.txt /tmp/remote-file.txt

# Download a file
muti-metroo download abc123 /etc/config.yaml ./config.yaml

# Upload an entire directory
muti-metroo upload abc123 ./my-folder /tmp/my-folder

muti-metroo upload

Upload file or directory to remote agent.

Usage

muti-metroo upload [flags] <target-agent-id> <local-path> <remote-path>

Flags

FlagShortDefaultDescription
--agent-alocalhost:8080Agent HTTP API address
--password-pFile transfer password
--timeout-t5mTransfer timeout (e.g., 30s, 5m, 1h)
--rate-limitMax transfer speed (e.g., 100KB, 1MB, 10MiB)
--resumefalseResume interrupted transfer if possible
--quiet-qfalseSuppress progress output

Examples

# Upload file
muti-metroo upload abc123 ./data.bin /tmp/data.bin

# Upload directory (auto-detected)
muti-metroo upload abc123 ./mydir /tmp/mydir

# With password
muti-metroo upload -p secret abc123 file.txt /tmp/file.txt

# Via different agent
muti-metroo upload -a 192.168.1.10:8080 abc123 data.txt /tmp/data.txt

# Rate-limited upload (100 KB/s)
muti-metroo upload --rate-limit 100KB abc123 ./large.iso /tmp/large.iso

# Resume interrupted upload
muti-metroo upload --resume abc123 ./huge.iso /tmp/huge.iso

muti-metroo download

Download file or directory from remote agent.

Usage

muti-metroo download [flags] <target-agent-id> <remote-path> <local-path>

Flags

FlagShortDefaultDescription
--agent-alocalhost:8080Agent HTTP API address
--password-pFile transfer password
--timeout-t5mTransfer timeout (e.g., 30s, 5m, 1h)
--rate-limitMax transfer speed (e.g., 100KB, 1MB, 10MiB)
--resumefalseResume interrupted transfer if possible
--quiet-qfalseSuppress progress output

Examples

# Download file
muti-metroo download abc123 /etc/config.yaml ./config.yaml

# Download directory
muti-metroo download abc123 /var/log/app ./logs

# With password
muti-metroo download -p secret abc123 /tmp/data.bin ./data.bin

# Rate-limited download (1 MB/s)
muti-metroo download --rate-limit 1MB abc123 /data/backup.tar.gz ./backup.tar.gz

# Resume interrupted download
muti-metroo download --resume abc123 /data/large.iso ./large.iso

# Combine rate limit and resume
muti-metroo download --rate-limit 500KB --resume abc123 /data/huge.iso ./huge.iso

Implementation Notes

  • Directories are automatically tar/gzip compressed
  • File permissions are preserved
  • Streaming transfer (no size limits)
Agent ID Prefix

You can use a short agent ID prefix (e.g., abc123) instead of the full 32-character ID. The prefix is automatically resolved to the full agent ID.

See Also