Added command-line option explanations and usage examples

Signed-off-by: Michael Zhou <myz227@nyu.edu>
This commit is contained in:
Michael Zhou 2018-11-03 10:40:06 -04:00
parent 7e0c4cc29f
commit bcbb213613
2 changed files with 91 additions and 7 deletions

View file

@ -47,10 +47,16 @@
<Options>
--verbose:
Set the verbosity level of logging messages. Accepts values 1-5.
Example:
$ client.py --repo http://localhost:8001 --verbose 3 README.txt
--repo:
Set the repository mirror that will be responding to client requests.
E.g., 'http://locahost:8001'.
E.g., 'http://localhost:8001'.
Example:
$ client.py --repo http://localhost:8001 README.txt
"""
# Help with Python 3 compatibility, where the print statement is a function, an
@ -156,8 +162,8 @@ def parse_arguments():
as specified by the user through the --verbose option.
'client' expects the '--repo' to be set by the user.
Exampl:
$ client.py --repo http://localhost:8001 <target>
Example:
$ client.py --repo http://localhost:8001 LICENSE
If the required option is unset, a parser error is printed
and the scripts exits.

View file

@ -40,17 +40,95 @@
$ repo.py --key <keytype>
[--filename <filename>
--path </path/to/repo>, --pw [my_password]]
$ repo.py --delegate <glob pattern> --delegatee <rolename>
--pubkeys </path/to/pubkey>
[role <rolename> --terminating --threshold <X>
[--role <rolename> --terminating --threshold <X>
--sign </path/to/role_privkey>]
$ repo.py --revoke --delegatee <rolename>
[--role <rolename> --sign </path/to/role_privkey>]
$ repo.py --verbose <0-5>
$ repo.py --clean [--path]
<Options>
--init:
Create new TUF repository in current working or specified directory.
--consistent:
Enable consistent snapshots for newly created TUF repository.
--bare:
Specify creation of bare TUF repository with no key created or set.
--path:
Choose specified path location of a TUF repository or key(s).
--role:
Specify top-level role(s) affected by the main command-line option.
--pubkeys:
Indicate location of key(s) affected by the main command-line option.
--root_pw:
Set password for encrypting top-level key file of root role.
--targets_pw:
Set password for encrypting top-level key file of targets role.
--snapshot_pw:
Set password for encrypting top-level key file of snapshot role.
--timestamp_pw:
Set password for encrypting top-level key file of timestamp role.
--add:
Add file specified by <target> to the Targets metadata.
--recursive:
Include files in subdirectories of specified directory <dir>.
--remove:
Remove target files from Targets metadata matching <glob pattern>.
--distrust:
Discontinue trust of keys located in </path/to/pubkey> directory of a role.
--trust:
Indicate trusted keys located in </path/to/pubkey> directory of a role.
--sign:
Sign metadata of target role(s) with keys in specified directory.
--key:
Generate cryptographic key of specified type <keytype> (default: Ed25519).
--filename:
Specify filename associated with generated top-level key.
--pw:
Set password for the generated key of specified type <keytype>.
--delegate:
Delegate trust of target files from Targets role (or <rolename> specified
in --role) to --delegatee role with specified <rolename>.
--delegatee:
Specify role that is targetted by delegator in --role to sign for
target files matching delegated <glob pattern> or in revocation of trust.
--terminating:
Mark delegation to --delegatee role from delegator as a terminating one.
--threshold:
Specify signature threshold of --delegatee role as the value <X>.
--revoke:
Revoke trust of target files from delegated role (--delegatee)
--verbose:
Set the verbosity level of logging messages. Accepts values 1-5.
--clean:
Delete repo in current working or specified directory.
"""
# Help with Python 2+3 compatibility, where the print statement is a function,