sendman

1.0.1 • Public • Published
Avatar

Build Status Dependencies Status Coverage Status Published Version
npm Badge

Sendman

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.

Installation

npm install -g sendman

Usage

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"
}

Colophon

Developer's Guide

Build reports:

Readme

Keywords

Package Sidebar

Install

npm i sendman

Weekly Downloads

1

Version

1.0.1

License

none

Last publish

Collaborators

  • cliffano