Skip to content

kairoaraujo/tufie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Workflow Status (with branch) Go Report Card Go Reference codecov

TUFie: An Open Source generic TUF client

TUFie is a TUF (The Update Framework) command-line client. The TUFie simplifies the client's high-level usage without building a client from scratch.

This client allows simple use cases such as downloading an artifact from an existent TUF Repository or scripting and CI/CD.

$ tufie download v1.0.3/demo_package-1.0.3.tar.gz

Artifact v1.0.3/demo_package-1.0.3.tar.gz donwload completed.

Install

HomeBrew

brew install kairoaraujo/tap/tufie

Winget (Windows)

winget install tufie

Download the Binary

Download from the releases page or use the install script to download the latest release.

Releases

bash <(curl -s https://raw.githubusercontent.com/kairoaraujo/tufie/main/install.sh)

Usage

TUFie has a simple interface

Download artifacts

$ tufie download v1.0.3/demo_package-1.0.3.tar.gz

Artifact v1.0.3/demo_package-1.0.3.tar.gz donwload completed.

Manage TUF/Artifact repositories

TUFie supports multiple repositories

$ tufie repository -h
Manage TUF repository configurations

Usage:
  tufie repository [REPOSITORY NAME] [flags]
  tufie repository [command]

Available Commands:
  add         Add a new repository
  list        List all repositories
  remove      Remove a repository
  set         Set the default repository

Add new repository

Usage:
  tufie repository add [flags]

Flags:
      --artifact-hash         add hash prefix to artifact [default: false]
  -a, --artifact-url string   content artifact base URL
  -d, --default               set repository as default
  -h, --help                  help for add
  -m, --metadata-url string   metadata URL
  -n, --name string           repository name
  -r, --root string           trusted Root metadata

$ tufie repository add --default --artifact-url https://rubygems.org --metadata-url https://metadata.rubygems.org --root rubygems-root.json --name rubygems
Config file used for tuf: /Users/kairoaraujo/.tufie/config.yml

Repository 'rubygems' added.

List repositories

$ tufie repository list
Config file used for tuf: /Users/kairoaraujo/.tufie/config.yml

Default repository: rubygems.org

Repository: rstuf
Artifact Base URL: https://github.com/kairoaraujo/demo-package/releases/download/
Metadata Base URL: https://metadata.dev.rstuf.org

Repository: rubygems
Artifact Base URL: https://rubygems.org
Metadata Base URL: https://metadata.rubygems.org

Set repository as the default

$ tufie repository set rstuf
Config file used for tuf: /Users/kairoaraujo/.tufie/config.yml

Updated default repository to 'rstuf'.

Contributing

Fork the repository on GitHub and clone it to your local machine:

git clone [email protected]:YOUR-USERNAME/tufie.git

Add a remote and regularly sync to make sure you stay up-to-date with our repository:

git remote add upstream https://github.com/kairoaraujo/tufie
git checkout main
git fetch upstream
git merge upstream/main

Requirements

Install Go

go mod tidy

Tests

make test

Link

Install golangci-lint

make lint