1.4.2 • Published 6 years ago

tcag-client v1.4.2

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

TCAG CLI

Prerequisites

  • node ^10.1.0
  • npm ^6.0.1
  • (optional) pkg 4.3.4

Usage

Using tty stdout

This is recommended way using the CLI tool. Progress bar is visible during entire download process.

tcag-client download -p 'ABCD123:/'

Development

While developing, you will probably rely mostly on npm start. There are additional scripts at your disposal:

npm run <script>Description
cleanDeletes dist folder.
buildCompiles the application to /dist folder.
linkCompiles the application and creates symlink See linking command.
lintLint all .js files.
lint:fixLint and fix all .js files. Read more on this.
packBuild and create self-contained executables.

Note that some aliases may not work, it is known limitation. In case of command linking all aliases should work.

Environment variables

You can modify behaviour by using environment variables below:

REST_API_HOST_URL=
API_VERSION=v1
OAUTH_HOST_URL=
OAUTH_CLIENT_ID=
TRANSFER_CLI_USERNAME=
TRANSFER_CLI_PASSWORD=

Variables can be put in .env file.

Linking command

You can easily create symlink with:

npm run link

Now you can use command as:

tcag-client <command> [options]

Optionally you may want to remove symlink:

npm unlink

You may run into naming issue if you have tcag-client already globally installed, in that case just rename symlink in bin section of package.json.

Generating self-contained executables

pkg -t node10-linux-x64,node10-macos-x64,node8-win-x64 .

Takes package.json from cwd and follows bin and pkg entry. For more info see pkg github.