Skylink V2 CLI Tool
Usage
# create key file containing public and private key
# optionally pass a seed
#
$ skylinkv2 keys
# create a V2 skylink under the given "data key"
# using the keys file generated by the 'keys' command
$ skylinkv2 create mybackup
# update a V2 skylink for the given "data key"
# with the contents of the file at given location
$ skylinkv2 update mybackup ./backup.dat
# use --help flag to see usage overview
$ skylinkv2 --help [COMMAND]
Commands
Keys
Using the keys
command you can generate a random key pair. This key pair will
get saved in a keyfile, by default written to the current directory as a text
file named 'keys.txt'. All other command parse such a keyfile to get at the
public and private key.
The key pair can be seeded by passing in a seed as argument.
The location of the key file is configurable using the keyfile
option.
# write key pair to keys.txt
$ skylinkv2 keys
Create
Using the create
command you can initialize a V2 Skylink. It will contain a
placeholder Skyfile that sipmly contains the data at which it was created. The
V2 Skylink is created using a data key, passed as an argument. Note that this
argument is optional, if it is not passed a random data key will get generated
and printed upon success.
This command uses the keyfile generated by the keys command. The keyfile can be
specified, by default it uses the default key file.
The command will output the data key, the V2 skylink, and the URL at which the
Skyfile can be found.
# create a v2 skylink
$ skylinkv2 create mybackup
Update
Using the update
command you can update the contents of a V2 Skylink. It will
upload the contents of the file at given path, and ensure the V2 Skylink will
point at the newly uploaded data. Aside from the location we also pass the data
key to this command. This data key is the one printed by the create
command.
This command uses the keyfile generated by the keys command. The keyfile can be
specified, by default it uses the default key file.
# update a v2 skylink
$ skylinkv2 update mybackup ./backup.dat