CLI
hctl
is the CLI for the Humanitec Platform Orchestrator.
1.35.2
Installation
Install hctl on Linux
-
Download the latest release with the command
curl -fLO https://github.com/humanitec/hctl/releases/download/v1.35.2/hctl_1.35.2_linux_amd64.tar.gz tar xvzf hctl_1.35.2_linux_amd64.tar.gz rm hctl_1.35.2_linux_amd64.tar.gz README.md
curl -fLO https://github.com/humanitec/hctl/releases/download/v1.35.2/hctl_1.35.2_linux_arm64.tar.gz tar xvzf hctl_1.35.2_linux_arm64.tar.gz rm hctl_1.35.2_linux_arm64.tar.gz README.md
-
Install hctl
sudo install -o root -g root -m 0755 hctl /usr/local/bin/hctl
Note
If you do not have root access on the target system, you can still install hctl to the
~/.local/bin
directory:chmod +x hctl mkdir -p ~/.local/bin mv ./hctl ~/.local/bin/hctl # and then append (or prepend) ~/.local/bin to $PATH
Install hctl on macOS
Homebrew
If you are on macOS and using the Homebrew package manager, you can install hctl with Homebrew.
-
Run the installation command:
brew install humanitec/tap/hctl
Manually
-
Download the latest release with the command
curl -fLO https://github.com/humanitec/hctl/releases/download/v1.35.2/hctl_1.35.2_darwin_amd64.tar.gz tar xvzf hctl_1.35.2_darwin_amd64.tar.gz rm hctl_1.35.2_darwin_amd64.tar.gz README.md
curl -fLO https://github.com/humanitec/hctl/releases/download/v1.35.2/hctl_1.35.2_darwin_arm64.tar.gz tar xvzf hctl_1.35.2_darwin_arm64.tar.gz rm hctl_1.35.2_darwin_arm64.tar.gz README.md
-
Install hctl
chmod +x ./hctl sudo mv ./hctl /usr/local/bin/hctl sudo chown root: /usr/local/bin/hctl
Install hctl on Windows
Scoop
If you are on Windows and using the Scoop package manager, you can install hctl with Scoop.
-
Run the installation command:
scoop bucket add humanitec https://github.com/humanitec/scoop-bucket scoop install humanitec/hctl
Manually
-
Download the latest release .
-
Decompress the zip file, and move the binary to your PATH.
Available as Docker Image
hctl is also published as Docker Image , which can be used like docker run --rm -it ghcr.io/humanitec/hctl:1.35.2
.
Validate your installation
Run hctl --version
to ensure hctl
is in your path. Expected output, matching your installed version:
hctl version github.com/humanitec/hctl <version XX.YY.ZZ> <commit-hash> <commit-date>
CLI cheat sheet
An overview of common and useful CLI commands is available in the CLI cheat sheet.
Configuration
hctl
will maintain a local configuration in a config file located at ~/.config/humanitec/config.yaml
. Use the command hctl config
or the list below to see available configuration items.
Each configuration item can be overridden using an Environment Variable.
The command hctl config show
displays the effective configuration, taking any override into account.
Config item | Environment variable | CLI command | Description | Default | Mandatory |
---|---|---|---|---|---|
default_org_id |
HUMANITEC_ORG |
hctl config set-org |
The id of the Organization in which to run commands | "" | Yes |
api_url |
HUMANITEC_API_URL |
hctl config set-url |
The base URL of the Orchestrator API | "" | Yes |
Commands
hctl
follows a hierarchical command structure generally adhering to this pattern:
hctl <verb> <object> [additional classification]
E.g. to see the details of a particular Provider, use this command:
hctl get provider <type> <id>
All available commands are listed and explained in the CLI online help. Use the -h
or --help
flag to see usage details on any command level, e.g.:
hctl get provider -h