File: README.md

package info (click to toggle)
golang-github-theupdateframework-go-tuf 0.5.2-5~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 7,596 kB
  • sloc: python: 163; sh: 37; makefile: 12
file content (48 lines) | stat: -rw-r--r-- 1,170 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# go-tuf client CLI

## Install

```
go get github.com/theupdateframework/go-tuf/cmd/tuf-client
```

## Usage

The CLI provides three commands:

* `tuf-client init` - initialize a local file store using root keys (e.g. from
    the output of `tuf root-keys`)
* `tuf-client list` - list available targets and their file sizes
* `tuf-client get` - get a target file and write to STDOUT

All commands require the base URL of the TUF repository as the first non-flag
argument, and accept an optional `--store` flag which is the path to the local
storage.

Run `tuf-client help` from the command line to get more detailed usage
information.

## Examples

```
# init
$ tuf-client init https://example.com/path/to/repo

# init with a custom store path
$ tuf-client init --store /tmp/tuf.db https://example.com/path/to/repo

# list available targets
$ tuf-client list https://example.com/path/to/repo
PATH      SIZE
/foo.txt  1.6KB
/bar.txt  336B
/baz.txt  1.5KB

# get a target
$ tuf-client get https://example.com/path/to/repo /foo.txt
the contents of foo.txt

# the prefixed / is optional
$ tuf-client get https://example.com/path/to/repo foo.txt
the contents of foo.txt
```