This is Alpha version, NOT for production, no support provided, unofficial CLI.
For Mac (ARM64 / AMD64), just:
brew install hinyinlam/tap/harbor-cli
Download at
Release Page
Then move harbor
to your PATH
(I have not test if Windows / Linux version works, it likely works)
This repo also provide support for Tanzu Framework CLI
The command line is tanzu harbor
Download tanzu-harbor-plugin-allarch.tar.gz
from release page
tar xvf tanzu-harbor-plugin-allarch.tar.gz
tanzu-harbor-plugin/install.sh
Run tanzu plugin list
It should show similar output to:
tanzu plugin list
NAME DESCRIPTION SCOPE DISCOVERY VERSION STATUS
...
harbor Unofficial Harbor CLI Standalone harbor-local-source v0.0.4 update available
...
You should be able to run tanzu harbor
in your terminal
Both tanzu harbor
plugin and harbor
standalone operate in the same way.
Before you perform any operation, harbor
command require your authentication for each request.
An example of login parameters has been included in example-yamls/login-params.yaml
file.
To login:
Imperative style:
harbor login --username username --password password --url https://myharbor.local
Declarative Style
harbor login -f login-params.yaml
You can then run harbor project list
or tanzu harbor project list
command.
There are examples in example-yamls
folder for various request parameter for different CLI call
When you need help for YAML example, there is --show-request-yaml
for most command.
For example - You want to create a project declaratively:
harbor project create -f myproject.yaml
The fields and structure for myproject.yaml
can be find out using harbor project create --show-request-yaml
Also, a visual way is to visit the OpenAPI spec from Harbor, for example GoHarbor Public Demo env
Makefile are designed to run in Mac OS, tested in MacBook M1 (ARM64)
make clean && make all
make standalone_binary
make package_tanzu_plugin
Both Standalone and Tanzu Harbor Plugin
make clean all && make release
Please feel free to open issues or contact with Hin Lam hinl@vmware.com