CLI tool for Trans
MIT License
Command Line Interface for Trans Server
branch | Travis status |
---|---|
master |
|
develop |
brew install nwtgck/homebrew-trans/trans
Commands bellow are examples of sending/getting.
trans send ./my_video.mp4
trans get jht
(File ID, jht
is saved as jht
file in $PWD
)
Command bellow sets Trans Server URL to https://trans-akka.herokuapp.com.
trans use https://trans-akka.herokuapp.com
Use trans config server
to print server URL.
trans delete jht
Use -p
or --parallel
for parallel download.
trans get -p jht
Use -l
or --id-length
to specify File ID length.
$ trans send -l 32 my_video.mp4
mn6pbf8jtxfvesct8zcpzwbxe4e5i85v
Use -t
or --get-times
to specify download-limit.
$ trans send -t 1 my_video.mp4
ab2
Use --duration
to specify store duration.
$ trans send --duration=30s my_video.mp4
ab2
Use trans send -h
to know more information.
$ trans send -h
Send a file
Usage:
trans send [flags]
Flags:
--deletable whether file is deletable or not (default true)
--delete-key string key for deletion
--duration string store duration (e.g. 10s, 5m, 12h, 3d) (default "1h")
-t, --get-times int download limit (e.g. 1, 10) (default 100)
-h, --help help for send
-l, --id-length int length of ID (e.g. 3, 10) (default 3)
-q, --quiet disable progress bar or not
Global Flags:
-s, --server string Trans Server URL
Here is examples to set aliases
trans config alias heroku https://trans-akka.herokuapp.com
trans config alias ibm https://trans-akka.mybluemix.net
Then, you can set server like trans use heroku
or trans use ibm
.