@unique-ag/cli
v0.5.1
Published
Unique CLI, wrapping the most common actions needed by Uniques clients into a single command line tool.
Downloads
81
Readme
qcli
Unique CLI, wrapping the most common actions needed by Uniques clients into a single command line tool.
[!NOTE] The Unique CLI is incubating. Until version 1.0.0 also minor versions can contain breaking changes 💥
Contributing
See the contributing guide for more information.
Usage
$ npm install -g @unique-ag/cli
$ qcli COMMAND
running command...
$ qcli (--version)
@unique-ag/cli/0.5.1 darwin-arm64 node-v20.14.0
$ qcli --help [COMMAND]
USAGE
$ qcli COMMAND
...
Commands
qcli az acr import
qcli help [COMMAND]
qcli mirror charts
qcli mirror images
qcli plugins
qcli plugins:inspect PLUGIN...
qcli plugins install PLUGIN
qcli plugins link PATH
qcli plugins reset
qcli plugins uninstall [PLUGIN]
qcli plugins update
qcli az acr import
Instructs the Azure CLI to import multiple images to an Azure Container Registry.
USAGE
$ qcli az acr import -f <value> -w -p <value> -u <value> [-b <value>]
FLAGS
-b, --batch-size=<value> [default: 4] Number of images to transfer in a single batch in parallel. The higher the
number, the more resources will be consumed.
-f, --image-list-file=<value> (required) [default: examples/az-acr-import.schema.yaml] Path to file that contains a
list of images to import.
-p, --source-password=<value> (required) ⚠ Do not pass plaintext values but use an environment variable instead.
Password for the source registry.
-u, --source-username=<value> (required) Username of the source registry.
-w, --no-wait (required) By default all imports are awaited. If you want to trigger the import in the
background, set this flag.
DESCRIPTION
Instructs the Azure CLI to import multiple images to an Azure Container Registry.
If you do not use Azure Container Registry, you might want to use the included mirror:images command which supports
any target registry.
The "image-list-file" flag specifies which images to import. You can find an example config file in
https://github.com/Unique-AG/cli/tree/main/examples.
You must have the azure-cli installed and the active session must be preemptively logged in to the matching azure
subscription.
⚠ The Azure CLI command needs the password supplied as a flag. The CLI itself does never print the flag but you should
still take care of the logs and the command history.
⚠ Do set an environment variable for the password to avoid it being passed as text, see the example.
⚠ Most systems pass secrets as environment variables, so normally no explicit password is needed in the command.
ALIASES
$ qcli a a i
EXAMPLES
export SOURCE_PASSWORD=<SENSITIVE_VALUE>
$ qcli az acr import
See code: src/commands/az/acr/import.ts
qcli help [COMMAND]
Display help for qcli.
USAGE
$ qcli help [COMMAND...] [-n]
ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for qcli.
See code: @oclif/plugin-help
qcli mirror charts
Pulls charts from a source and pushes them to a new registry.
USAGE
$ qcli mirror charts -f <value> [-k] [-p <value>] [-s <value>] [-t <value>]
FLAGS
-f, --chart-list-file=<value> (required) [default: examples/mirror-charts.schema.yaml] Path to file that contains a
list of charts to mirror.
-k, --keep If true, keeps the downloaded tarballs.
-p, --push-plugin=<value> [default: push] Which plugin will be used to "push" charts to the target.
Defaults to native helm push but could be set to e.g. "cm-push" (for ChartMuseum).
Note: The plugin must be pre-installed using "helm plugin install".
-s, --source-repository=<value> Source repository from where the charts will be pulled, this overrides the value
specified in the chart-list-file.
-t, --target-repository=<value> Target repository where the charts will go, this overrides the value specified in the
chart-list-file.
DESCRIPTION
Pulls charts from a source and pushes them to a new registry.
The "chart-list-file" flag specifies which charts to mirror. You can find an example config file in
https://github.com/Unique-AG/cli/tree/main/examples.
For security reasons, the active session must be preemptively logged in to both OCI registries.
ALIASES
$ qcli m c
EXAMPLES
export SOURCE_OCI_REGISTRY: <VALUE>
export SOURCE_OCI_USERNAME: <SENSITIVE_VALUE>
export SOURCE_OCI_PASSWORD: <SENSITIVE_VALUE>
export TARGET_OCI_REGISTRY: <VALUE>
export TARGET_OCI_USERNAME: <SENSITIVE_VALUE>
export TARGET_OCI_PASSWORD: <SENSITIVE_VALUE>
docker login $SOURCE_OCI_REGISTRY -u $SOURCE_OCI_USERNAME -p $SOURCE_OCI_PASSWORD
docker login $TARGET_OCI_REGISTRY -u $TARGET_OCI_USERNAME -p $TARGET_OCI_PASSWORD
$ qcli mirror charts
export SOURCE_OCI_REGISTRY: <VALUE>
export SOURCE_OCI_USERNAME: <SENSITIVE_VALUE>
export SOURCE_OCI_PASSWORD: <SENSITIVE_VALUE>
docker login $SOURCE_OCI_REGISTRY -u $SOURCE_OCI_USERNAME -p $SOURCE_OCI_PASSWORD
az acr login --name <REGISTRY_NAME>
$ qcli mirror charts
See code: src/commands/mirror/charts.ts
qcli mirror images
Pulls images from a source, retags them, and pushes them to a new registry.
USAGE
$ qcli mirror images -f <value> [-b <value>] [-s <value>] [-t <value>]
FLAGS
-b, --batch-size=<value> [default: 2] Number of images to transfer in a single batch in parallel. The higher the
number, the more resources will be consumed.
-f, --image-list-file=<value> (required) [default: examples/mirror-images.schema.yaml] Path to file that contains a
list of images to mirror.
-s, --source-registry=<value> Source registry from where the images will be pulled, this overrides the value
specified in the image-list-file.
-t, --target-registry=<value> Target registry where the images will go, this overrides the value specified in the
image-list-file.
DESCRIPTION
Pulls images from a source, retags them, and pushes them to a new registry.
If you use an Azure Container Registry as target, you might want to use the included az acr import sub-command as it
offers significant performance improvements.
The "image-list-file" flag specifies which images to mirror. You can find an example config file in
https://github.com/Unique-AG/cli/tree/main/examples.
This command can also mirror images from public registries like Docker Hub or Quay.
For security reasons, the active session must be preemptively logged in to both OCI registries.
ALIASES
$ qcli m i
EXAMPLES
export SOURCE_OCI_REGISTRY: <VALUE>
export SOURCE_OCI_USERNAME: <SENSITIVE_VALUE>
export SOURCE_OCI_PASSWORD: <SENSITIVE_VALUE>
export TARGET_OCI_REGISTRY: <VALUE>
export TARGET_OCI_USERNAME: <SENSITIVE_VALUE>
export TARGET_OCI_PASSWORD: <SENSITIVE_VALUE>
docker login $SOURCE_OCI_REGISTRY -u $SOURCE_OCI_USERNAME -p $SOURCE_OCI_PASSWORD
docker login $TARGET_OCI_REGISTRY -u $TARGET_OCI_USERNAME -p $TARGET_OCI_PASSWORD
$ qcli mirror images
export SOURCE_OCI_REGISTRY: <VALUE>
export SOURCE_OCI_USERNAME: <SENSITIVE_VALUE>
export SOURCE_OCI_PASSWORD: <SENSITIVE_VALUE>
docker login $SOURCE_OCI_REGISTRY -u $SOURCE_OCI_USERNAME -p $SOURCE_OCI_PASSWORD
az acr login --name <REGISTRY_NAME>
$ qcli mirror images
See code: src/commands/mirror/images.ts
qcli plugins
List installed plugins.
USAGE
$ qcli plugins [--json] [--core]
FLAGS
--core Show core plugins.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List installed plugins.
EXAMPLES
$ qcli plugins
See code: @oclif/plugin-plugins
qcli plugins:inspect PLUGIN...
Displays installation properties of a plugin.
USAGE
$ qcli plugins inspect PLUGIN...
ARGUMENTS
PLUGIN... [default: .] Plugin to inspect.
FLAGS
-h, --help Show CLI help.
-v, --verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Displays installation properties of a plugin.
EXAMPLES
$ qcli plugins inspect myplugin
See code: @oclif/plugin-plugins
qcli plugins install PLUGIN
Installs a plugin into qcli.
USAGE
$ qcli plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
ARGUMENTS
PLUGIN... Plugin to install.
FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into qcli.
Uses npm to install plugins.
Installation of a user-installed plugin will override a core plugin.
Use the QCLI_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the QCLI_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ qcli plugins add
EXAMPLES
Install a plugin from npm registry.
$ qcli plugins install myplugin
Install a plugin from a github url.
$ qcli plugins install https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ qcli plugins install someuser/someplugin
See code: @oclif/plugin-plugins
qcli plugins link PATH
Links a plugin into the CLI for development.
USAGE
$ qcli plugins link PATH [-h] [--install] [-v]
ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-v, --verbose
--[no-]install Install dependencies after linking the plugin.
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLES
$ qcli plugins link myplugin
See code: @oclif/plugin-plugins
qcli plugins reset
Remove all user-installed and linked plugins.
USAGE
$ qcli plugins reset [--hard] [--reinstall]
FLAGS
--hard Delete node_modules and package manager related files in addition to uninstalling plugins.
--reinstall Reinstall all plugins after uninstalling.
See code: @oclif/plugin-plugins
qcli plugins uninstall [PLUGIN]
Removes a plugin from the CLI.
USAGE
$ qcli plugins uninstall [PLUGIN...] [-h] [-v]
ARGUMENTS
PLUGIN... plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ qcli plugins unlink
$ qcli plugins remove
EXAMPLES
$ qcli plugins uninstall myplugin
See code: @oclif/plugin-plugins
qcli plugins update
Update installed plugins.
USAGE
$ qcli plugins update [-h] [-v]
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Update installed plugins.
See code: @oclif/plugin-plugins
Examples
For some commands, you find example files in examples folder. Most commands with example files also have a default example file that is used if no file is specified.