Sendman is a CLI tool for sending files to a local/remote location.
This is handy when you want to use a configuration file to define the local/remote server host, port, username, password, local path, and remote path of the files you want to send via FTP, SCP, rsync, or AWS S3. No more retyping lengthy commands one by one.
npm install -g sendman
Create a sample .sendman.json configuration file:
sendman init
Configuration file contains:
{
"protocol": "scp",
"host": "somehost",
"port": 22,
"username": "someusername",
"password": "somepassword",
"local": "/path/to/local/dir",
"remote": "/path/to/remote/dir"
}
Send the files located at local
path to remote
location:
sendman send
It's possible to include sub-configuration file.
.sendman.json contains:
{
"protocol": "ftp",
"host": "somehost",
"port": 21,
"local": "/path/to/local/dir",
"remote": "/path/to/remote/dir",
"parallel": 10,
"include": "/path/to/.secretSendman.json"
}
.secretSendman.json contains:
{
"username": "someusername",
"password": "somepassword"
}
Alternatively, you can use rsync to send files to a remote host.
{
"protocol": "rsync",
"host": "somehost",
"local": "/path/to/local/dir",
"remote": "/path/to/remote/dir"
}
rsync can also be used to send files between local paths.
{
"protocol": "rsync",
"source": "/path/to/local/dir1",
"destination": "/path/to/local/dir2"
}
To send files to an AWS S3 bucket:
{
"protocol": "s3",
"local": "/path/to/local/dir",
"bucket": "somebucket",
"region": "ap-southeast-2",
"remote": "/path/to/bucket/prefix",
"accessKeyId": "someaccesskeyid",
"secretAccessKey": "somesecretaccesskey"
}
Build reports: