python-tuf/docs/CLI.md
Vladimir Diaz 91c6b97ddd
Revise a couple of subtitles in CLI.md
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-01-30 15:47:23 -05:00

1.5 KiB

CLI examples

Note: This is a work in progress and subject to change.

Create a repository

Create a TUF repository in the current working directory. A cryptographic key is created and set for each top-level role. The Targets role does not sign for any targets nor does it delegate trust to any roles.

$ repo.py --init

Note: Support for arbitrary repo paths will be added in the near future. $ repo.py --init --path </path/to/repo>

By default, pw is used to encrypt the top-level key files created with --init. Instead, the user can enter a password on the command line, or be prompted for one.

$ repo.py --init --pw my_pw
$ repo.py --init --pw
Enter a password for the top-level role keys:
Confirm:

Create a TUF repository in the current working directory. A cryptographic key is not created nor set for each top-level role.

$ repo.py --init --bare

Create a TUF repository with consistent snapshots enabled. If enabled, all target filenames have their hash prepended.

$ repo.py --init --consistent_snapshot

Add a target file.

More than one target file may be specified.

$ repo.py --add <foo.tar.gz> <bar.tar.gz>

Note: Support for directories will be added in the near future. $ repo.py --add </path/to/dir> [--recursive]

Clean

Remove the files created via repo.py --init.

$ repo.py --clean