Install and upgrade the Harness CLI
Install the Harness CLI on macOS or Linux, upgrade to new versions, and uninstall cleanly.
The Harness CLI is distributed as a self-contained binary for macOS and Linux (amd64 and arm64). This guide explains how to install, upgrade, and uninstall the CLI.
What you will learn in this topic
By the end of this guide, you will be able to:
Install the Harness CLI using the automated installer or a release archive.
Customize the installation for CI/CD systems, containers, and non-standard installation paths.
Upgrade to the latest release or install a specific version.
Install or upgrade an individual module or external plugin.
Inspect what an in-place upgrade would do before you run it.
Remove the CLI and its local configuration.
Before you begin
Make sure you have:
macOS or Linux (amd64 or arm64).
Bash or Zsh.
Network access to download binaries and release metadata.
Install the CLI
Run the installer:
The installer:
Installs the
harnessandharness-harbinaries.Adds the installation directory to your
PATHif necessary.Configures shell completions for supported shells.
Verify the installation:
If the harness command is not available immediately after installation, restart your shell or reload your shell configuration:
Customize the installation
Pass installer options after sh -s --:
--install-dir <path>
Installs the binaries to a custom directory.
--core
Installs only the harness binary.
--non-interactive
Suppresses prompts for automated environments such as CI/CD pipelines and containers.
--no-verify
Skips checksum verification after download.
Install manually
If you prefer not to use the installer, download the appropriate release archive from GitHub Releases, extract the archive, and place the binaries in a directory that is included in your PATH.
Upgrade the CLI
The CLI can update itself without rerunning the installer:
harness install cli upgrades the harness binary and every installed module in one shot. Add --core-only to upgrade the core binary and leave the modules untouched.
--version <tag>
Installs a specific release version.
--install-dir <path>
Overrides the installation directory.
--force
Reinstalls the CLI even if the target version is already installed.
--check
Displays the latest available version without installing it.
--core-only
Installs or upgrades only the core binary, not the modules.
Install a module or plugin
Modules and external plugins ship as separate binaries that harness dispatches to transparently. Install or upgrade them individually when you do not want to touch the rest of the installation.
For example, install the Artifact Registry module on its own:
harness install plugin is an alias for harness install module, so either form works for an external plugin binary.
To review what is installed:
Check what an upgrade would do
Probe the release manifest and report the actions an in-place upgrade would take, without changing anything on disk.
Uninstall the CLI
Remove the binaries:
Remove the CLI configuration directory:
Removing the configuration directory also deletes saved profiles, credentials, and CLI settings.
Next steps
With the CLI installed, log in and set up a profile before you run your first command.
Authenticate: Log in and set up your first profile.
Harness CLI overview: Understand the command structure.
Last updated
Was this helpful?