hinyinlam / cli-for-harbor-java

Harbor Command Line interface
Other
15 stars 0 forks source link

Archived Repo

This repo has been moved to Golang version:

https://github.com/hinyinlam/cli-for-harbor

From now on this repo is read-only and for historical reference.


CLI for Harbor

An unofficial command line for Harbor

This is not yet an offical project for Harbor open source Registry

How to use

Download the cli jar file directly in github: Github release page

Alias:

alias harbor="java -jar harbor-cli-0.0.1-SNAPSHOT.jar"

then you can uses harbor directly.

In future, will compile directly to OS dependent native image so you will not need aliasing.

Login:

harbor login --username <username> --password <password> --api <https_api>

Example:

harbor login --username myuser --password ASafePassword --api demo.goharbor.io

Project:

harbor project --help

Repo:

harbor repository --help

Artifact and Scanning:

harbor artifact --help

ToDo:

  1. Package as a native image in various OS and add back tons of sub-command

  2. More options for output

  3. Output examples for .JSON / .YAML for complex type

Please feel free to open issue for feature requests.

How to build?

This CLI depends on harbor-client-java - following instruction to mvn install in Harbor Java Client

Then ./mvnw clean package

Reference Documentation