diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index 1651cad92d..5dc92761f6 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -6,17 +6,38 @@ This is a work in progress and subject to change. The CLI requires a few dependencies and C extensions that can be installed with `pip install securesystemslib[crypto,pynacl]`. +---- The following is a basic workflow in four steps: -**Step (1)** - Initialize an empty repo +**Step (1)** - Initialize a repo. The `tufrepo`, `tufkeystore`, and +`tufclient` directories are created in the current working directory. ```Bash $ repo.py --init ``` -**Step (2)** - Add a target file to the repo +**Step (2)** - Add a target file to the repo. The file size and hashes of +the target file are also written to the Targets metadata file. ```Bash $ echo 'Test file' > testfile $ repo.py --add testfile +$ tree tufrepo/ +tufrepo/ +├── metadata +│   ├── 1.root.json +│   ├── root.json +│   ├── snapshot.json +│   ├── targets.json +│   └── timestamp.json +├── metadata.staged +│   ├── 1.root.json +│   ├── root.json +│   ├── snapshot.json +│   ├── targets.json +│   └── timestamp.json +└── targets + └── testfile + + 3 directories, 11 files ``` **Step (3)** - Serve the repo @@ -28,12 +49,33 @@ or with Python 3... $ python3 -m http.server 8001 ``` -**Step (4)** - Fetch a target file from the repo +**Step (4)** - Fetch a target file from the repo. The client downloads +any required metadata and the requested target file. ```Bash $ cd "tufclient/" $ client.py --repo http://localhost:8001 testfile -``` +$ tree +. +├── tufrepo +│   └── metadata +│   ├── current +│   │   ├── 1.root.json +│   │   ├── root.json +│   │   ├── snapshot.json +│   │   ├── targets.json +│   │   └── timestamp.json +│   └── previous +│   ├── 1.root.json +│   ├── root.json +│   ├── snapshot.json +│   ├── targets.json +│   └── timestamp.json +└── tuftargets + └── testfile + 5 directories, 11 files +``` +---- See [CLI.md](CLI.md) and [CLI_EXAMPLES.md](CLI_EXAMPLES.md) to learn about the other supported CLI options. A [tutorial](TUTORIAL.md) is also available, and diff --git a/tuf/scripts/repo.py b/tuf/scripts/repo.py index 4ade3cce5d..def1ab9e5d 100755 --- a/tuf/scripts/repo.py +++ b/tuf/scripts/repo.py @@ -890,8 +890,9 @@ def parse_arguments(): description='Create or modify a TUF repository.') parser.add_argument('-i', '--init', action='store_true', - help='Create a repository. The repository is created in the current' - ' working directory unless --path is specified.') + help='Create a repository. The "tufrepo", "tufkeystore", and' + ' "tufclient" directories are created in the current working' + ' directory, unless --path is specified.') parser.add_argument('-p', '--path', nargs='?', default='.', metavar='', help='Specify a repository path. If used'