Table of Contents
- 150+ commands
- Beautiful command-line interface powered by Typer and Rich.
- REPL mode (
harbor repl
) - TUI mode (
harbor tui
) - Tab completion for commands and options.
- Automatic retrying of failed requests
- Multiple output formats:
- Table
- JSON
- Large number of configuration options
- Authentication methods
- Table styling
- Output formats
- ... and more
It is highly recommended to install harbor-cli
with pipx. pipx installs the application in an isolated environment to avoid dependency conflicts, and makes it easy to upgrade or uninstall it afterwards.
Install as a pipx app:
pipx install harbor-cli
or through Homebrew:
brew tap add unioslo/harbor-cli
brew install harbor-cli
Keyring functionality should work out of the box on MacOS >=11 with Python >=3.8.7.
pipx install harbor-cli
Depending on your Linux flavor and choice of keyring backend, you may need to install additional packages to enable keyring functionality. See the keyring documentation for more information.
If you need to inject a package into the application's pipx environment, use the pipx inject
command:
pipx inject harbor-cli <package to inject>
pipx install harbor-cli
Keyring functionality is untested on Windows, but should work out of the box. If you run into any issues, consult the keyring documentation for more information. Otherwise, please open an issue.
Documentation can be found here.
The documentation includes extensive setup and usage guides, as well as a list of all commands and their options.
Installing the application puts harbor
in your PATH
, and can be invoked by typing harbor
in your terminal:
$ harbor --help
1. Initialize configuration
harbor init
After completing the configuration wizard, the application can be run in any of the following modes:
2a. Run commands directly
harbor <command>
2b. REPL mode
harbor repl
2c. TUI mode
harbor tui
Most commands produce some sort of table. While the most common methods have nice hand-written tables, some of the tables are generated automatically from the data returned by the API.
PRs are always welcome if you wish to add a new table or improve an existing one.
harbor project create
harbor project update test-project --public false --severity high --auto-scan true
harbor project get test-project
harbor --format json project get test-project
harbor system info
harbor system health
harbor-cli
is distributed under the terms of the MIT license.