Skip to main content

harbor-cli

Tests Docs Ruff Code Style: Black

Demo


Table of Contents

Features

  • 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

Installation

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.

MacOS

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.

Linux

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>

Windows

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

Documentation can be found here.

The documentation includes extensive setup and usage guides, as well as a list of all commands and their options.

Usage

Installing the application puts harbor in your PATH, and can be invoked by typing harbor in your terminal:

$ harbor --help

0.3.0 - 2024-06-26

Added

  • Command: project repos to list repositories in a project. A more intuitive way to list repositories for a project than going through repository list.
  • --sbom-generation option for project create and project update commands to enable automatic SBOM generation for the project.

Changed

  • Styling of multiline help text in commands.

Removed

  • Mentions of valid values from project {create,update} commands.

Fixed

  • REPL closing when certain errors are raised.
  • artifact list for artifacts with no extra attributes.

0.2.2 - 2024-03-01

Fixed

  • Configuration option verify_ssl not having any effect.

0.2.1 - 2024-02-02

Added

  • Help for MacOS users if Keychain is returning a -25244 errSecInvalidOwnerEdit error.
  • self keyring command to manage the keyring.
    • self keyring status to see information about the keyring used.
  • self config command to manage the configuration file.
    • Has the same commands as cli-config, which is now deprecated.

Changed

  • Prompts are now printed to stderr instead of stdout for POSIX compliance.
  • Newlines are now logged as spaces in the log file.

Fixed

  • Coroutines not being properly cancelled when the application exits abnormally.
  • Password not being stored in keyring after user is prompted for missing authentication info.
  • Repeated keyring warnings if keyring is not available.

Deprecated

  • cli-config command. Use self config

0.2.0 - 2023-12-21

Changed

  • Automatic datetime log file naming now uses the tag {dt} (was {time}).
  • Log file is now named harbor-cli.log by default (no longer includes datetime).
    • Automatic datetime naming is now opt-in instead of being the default.

Deprecated

  • {time} tag for automatic datetime log file naming. Use {dt} instead.
  • [cache] section in configuration file. Caching of API responses has been removed.

Removed

  • Caching of API responses. This was a premature optimization that caused more problems than it solved. It will be re-introduced in a future release.

Fixed

  • Double printing of messages in terminal if logging wasn't properly configured.

0.1.0 - 2023-12-06

Added

  • Initial release.

Metadata

Release files for harbor-cli 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for harbor-cli 0.3.0
File Size Uploaded
harbor_cli-0.3.0.tar.gz 3.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for harbor-cli 0.3.0
File Interpreter ABI Platform
harbor_cli-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 3.7 MB

Release files / harbor_cli-0.3.0.tar.gz

Download URL harbor_cli-0.3.0.tar.gz
Size 3.6 MB
Tags Source
SHA-256 checksum
How to use checksums
721df57d861ba2afff0a1ca3805c8a08a718e65cc928283ffaa4c22e8159fa1e
BLAKE2b-256 checksum
How to use checksums
b8ad03d8fcdf69d159adadfefeaac603588e5e55ba8cd0f0b4121ab3bac1293c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / harbor_cli-0.3.0-py3-none-any.whl

Download URL harbor_cli-0.3.0-py3-none-any.whl
Size 139.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f90f674b2e550eb5427ed4cc7993e6c5f3355330224ddcb1fa0f81107e6f86b4
BLAKE2b-256 checksum
How to use checksums
72d17ceb3d3a0bb25c27dbec9236f4b8738db8e71e52051643c904b54d8e0951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page