Overview
m87 provides powerful file transfer capabilities usingdevice:path syntax to reference remote locations. All file transfers use SFTP over the secure m87 tunnel.
Path Syntax
Remote paths use scp-style resolution:Path Resolution Rules
- Relative paths (no leading
/) → Resolve to user’s home directory - Absolute paths (starting with
/) → Used as-is - Tilde expansion (
~) → Expands to home directory
Examples
Copy Command (cp)
Copy individual files between local and remote devices (SCP-style).Syntax
<device>:<path> format.
Examples
The
cp command is best for copying individual files or directories. For continuous synchronization with change detection, use the sync command.Sync Command
Synchronize directories between local and remote devices (rsync-style).Syntax
Options
Basic Examples
Exclude Patterns
The--exclude flag supports:
- Exact names:
--exclude node_modules(matches any path component) - Wildcards:
--exclude "*.log"(matchesapp.log,error.log, etc.)
Dry Run
Preview what will be synced without making changes:List Files Command (ls)
List contents of a remote directory.Syntax
Examples
Real-World Examples
Deploy Application
Development Workflow
Backup Remote Files
Clean Deploy with Verification
Quick Script Deployment
Database Backup
Performance Notes
Related Commands
- Device Access - Execute commands after file transfer
- Deployments - Automated deployment workflows
- Docker Integration - Deploy containerized applications