Skip to main content

No project description provided

Project description

harbor-cli

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

The name harbor-cli is in the process of being acquired from its current owner on PyPI.

In the meantime, you can install the package from GitHub,:

pipx install git+https://github.com/pederhan/harbor-cli

On certain platforms this is not sufficient to install all keyring dependencies.

Keyring functionality is not mandatory, and the application will function without it. Consult your platform's section below for more information.

MacOS

pipx install git+https://github.com/pederhan/harbor-cli

Keyring should work out of the box on MacOS >=11 with Python >=3.8.7.

Linux

Depending on your Linux flavor and choice of keyring backend, you may need to install additional packages. See the keyring documentation for more information.

To inject a package into the application's pipx environment, use the pipx inject command:

pipx install git+https://github.com/pederhan/harbor-cli
pipx inject harbor-cli <package to inject>

Follow the instructions for your Linux flavor and keyring backend to determine which package to inject (if any). If a package requires compilation and you don't have the necessary prerequisites installed, installing the package as a system package through your system's package manager may be easier.

Windows

pipx install git+https://github.com/pederhan/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

[Unreleased]

Added

  • Command find: Search for commands by name or description.
  • Command commands: list all available commands.
  • Option: user list --sort [id|username|name].
  • UserResp compact table format (used by user list).
  • --paging, --pager options and corresponding config options for displaying results in a pager.
  • [output.table.style] config section for styling Rich tables.
  • --confirm-enumeration option and corresponding config option [general.confirm_enumeration] for enabling/disabling confirmation before enumerating certain types of resources that can return a very large number of results without a limit or query.

Changed

  • Global option --format is now case-insensitive.
  • Global options --harbor-username, --harbor-secret and --harbor-url have been deprecated in favor of --username, --secret and --url.

Fixed

  • Use of Python3.10 style annotations in class definitions, causing the program to not run on Python3.9 and below.

Removed

  • JSONSchema output format. Back to the drawing board on this one. 16b4ae6

0.1.0

Changed

  • Update command semantics. See #25 and the docs.
  • Type of str parameters that take "true" and "false" have been changed to bool.
    • Bool parameters for API commands now take the args True/true/1 and False/false/0. Global options that override config commands are still flags in the form --foo/--no-foo.
    • We use the validators defined on the models from harborapi to automatically convert these values to the strings "true"/"false" under the hood.

Fixed

  • Some commands were missing custom text for their spinner.

Removed

  • All update --replace parameters. Updates are now partial updates only.

0.0.1 - 2023-xx-yy

Added

  • Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harbor_cli-0.1.0.tar.gz (3.8 MB view hashes)

Uploaded Source

Built Distribution

harbor_cli-0.1.0-py3-none-any.whl (132.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page