Interact with Online C14 API from the command line.
A command-line tool to manage your C14 storage easily
go get -u github.com/online-net/c14-cli/cmd/c14
$ c14
Usage: c14 [OPTIONS] COMMAND [arg...]
Interact with C14 from the command line.
Options:
-D, --debug Enable debug mode
-V, --verbose Enable verbose mode
Commands:
create Create a new archive
files List the files of an archive
freeze Lock an archive
help Help of the c14 command line
login Log in to Online API
ls List the archives
rename Rename an archive
remove Remove an archive
unfreeze Unlock an archive
upload Upload your file or directory into an archive
Run 'c14 COMMAND --help' for more information on a command.
$ c14 login
Please opens this link with your browser: https://console.online.net/oauth/v2/device/usercode
Then copy paste the code XXXXXX
$
Usage: c14 create [OPTIONS]
Create a new archive, by default with a random name, standard storage (0.0002β¬/GB/month), automatic locked in 7 days and your datas will be stored at DC2.
Options:
-c, --crypto=aes-256-cbc Which cryptography to use: aes-256-cbc or none
-d, --description="" Assigns a description
-h, --help=false Print usage
-n, --name="" Assigns a name
-q, --quiet=false Don't display the waiting loop
-s, --safe="" Name of the safe to use. If it doesn't exists it will be created.
-p, --parity="standard" Specify a parity to use
-l, --large=false Ask for a large bucket
Examples:
$ c14 create
$ c14 create --name "MyBooks" --description "hardware books"
$ c14 create --name "MyBooks" --description "hardware books" --safe "Bookshelf"
Usage: c14 freeze [OPTIONS] [ARCHIVE]+
Lock an archive, your archive will be stored in highly secure Online data centers and will stay available On Demand (0.01β¬/GB).
Options:
-h, --help=false Print usage
--nowait=false
-q, --quiet=false
Examples:
$ c14 freeze 83b93179-32e0-11e6-be10-10604b9b0ad9
Usage: c14 ls [OPTIONS] [ARCHIVE]*
Displays the archives, by default only the NAME, STATUS, UUID.
Options:
-a, --all=false Show all information on archives (size,parity,creationDate,description)
-h, --help=false Print usage
-p, --platform=false Show the platforms
-q, --quiet=false Only display UUIDs
Examples:
$ c14 ls
$ c14 ls -a
Usage: c14 help [COMMAND]
Help prints help information about c14 and its commands.
By default, help lists available commands.
When invoked with a command name, it prints the usage and the help of
the command.
Options:
-h, --help=false Print usage
Examples:
$ c14 help
$ c14 help create
Usage: c14 login
Generates a credentials file in $CONFIG/c14-cli/c14rc.json
containing informations to generate a token.
Options:
-h, --help=false Print usage
Examples:
$ c14 login
Usage: c14 files ARCHIVE
List the files of an archive, displays the name and size of files
Options:
-h, --help=false Print usage
Examples:
$ c14 files 83b93179-32e0-11e6-be10-10604b9b0ad9
Usage: c14 rename ARCHIVE new_name
Rename an archive.
Options:
-h, --help=false Print usage
Examples:
$ c14 rename 83b93179-32e0-11e6-be10-10604b9b0ad9 new_name
$ c14 rename old_name new_name
Usage: c14 remove [ARCHIVE]+
Remove an archive
Options:
-h, --help=false Print usage
Examples:
$ c14 remove 83b93179-32e0-11e6-be10-10604b9b0ad9 2d752399-429f-447f-85cd-c6104dfed5db
Usage: c14 unfreeze [OPTIONS] [ARCHIVE]+
Unlock an archive, extraction of the archive's data (0.01β¬/GB).
Options:
-h, --help=false Print usage
--nowait=false
-q, --quiet=false
Examples:
$ c14 unfreeze 83b93179-32e0-11e6-be10-10604b9b0ad9
Usage: c14 upload [DIR|FILE]* ARCHIVE
Upload your file or directory into an archive, use SFTP protocol.
Options:
-h, --help=false Print usage
-n, --name="" Assigns a name (only with tar method)
Examples:
$ c14 upload
$ c14 upload test.go 83b93179-32e0-11e6-be10-10604b9b0ad9
$ c14 upload /upload 83b93179-32e0-11e6-be10-10604b9b0ad9
$ tar cvf - /upload 2> /dev/null | ./c14 upload --name "file.tar.gz" fervent_austin
Soon
- Support of
verify
command - Support of
create
command - Support of
freeze
command - Support of
help
command - Support of
ls
command - Support of
login
command - Support of
files
command - Support of
rename
command - Support of
remove
command - Support of
unfreeze
command - Support of
upload
command
Feel free to contribute ππ»
- Install go
- Ensure you have
$GOPATH
and$PATH
well configured, something like:
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin
- Fetch the project:
go get -u github.com/online-net/c14-cli
- Go to c14-cli directory:
cd $GOPATH/src/github.com/online-net/c14-cli
- Hack:
vim
- Build:
make
- Run:
./c14
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.