1.3.2 • Published 7 years ago
transfer-portal-cli v1.3.2
transfer-portal-cli
Prerequisites
- node
^7.10.0
- npm
^4.2.0
Usage
Using tty stdout
This is recommended way using the CLI tool. Progress bar is visible during entire download process.
transfer-client download -p 'ABCD123:/'
Using non-tty stdout
You can pipe output of client to file.
# To file /tmp/cli-output.txt
transfer-client download -p 'ABCD123:/' >> /tmp/cli-output.txt
# To file /tmp/cli-output.txt and console
transfer-client download -p 'ABCD123:/' | tee /tmp/cli-output.txt
Note that in non-tty stdout progress bar won't be visible.
Development
While developing, you will probably rely mostly on npm start
. There are additional scripts at your disposal:
npm run <script> | Description |
---|---|
start <command> -- [options] | Executes your app with given command and options. |
clean | Deletes dist folder. |
build | Compiles the application to /dist folder. |
link | Compiles the application and creates symlink See linking command. |
lint | Lint all .js files. |
lint:fix | Lint and fix all .js files. Read more on this. |
Note that some aliases may not work, it is known limitation. In case of command linking all aliases should work.
Dotenv file (.env)
REST_API_HOST_URL=
API_VERSION=v1
OAUTH_HOST_URL=
OAUTH_CLIENT_ID=
TRANSFER_CLI_USERNAME=
TRANSFER_CLI_PASSWORD=
Linking command
You can easily create symlink with:
npm run link
Now you can use command as:
transfer-client <command> [options]
Optionally you may want to remove symlink:
npm unlink
You may run into naming issue if you have transfer-portal-cli
already globally installed, in that case just rename symlink in bin
section of package.json
.