V0
Documentation containing information about all available commands and options within the Harness CLI utility tool.
Synopsis
NAME:
harness - CLI utility to interact with Harness Platform to manage various Harness modules and its diverse set of resources.
USAGE:
harness [global options] command [command options] [arguments...]
VERSION:
development
COMMANDS:
update, upgrade Check for updates and upgrade the CLI
secret, secret-token Secrets specific commands. eg: apply (create/update)
service, svc Service specific commands, eg: apply (create/update), list
environment, env Environment specific commands, eg: apply (create/update), list
connector, conn Connector specific commands, eg: apply (create/update), list
gitops-application, gitops-app Gitops application specific commands, eg: apply (create/update), list
gitops-cluster, gitops-cluster Gitops Cluster specific commands, eg: apply (create/update), list
gitops-repository, gitops-repo Gitops repository specific commands, eg: apply (create/update), list
infrastructure, infra Infrastructure specific commands, eg: apply (create/update), list
pipeline, pipeline Pipeline specific commands, eg: apply (create/update), run, list
login, login Login with account identifier and api key.
account, acc Fetch Account details
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--base-url NG_BASE_URL provide the NG_BASE_URL for self managed platforms
--api-key API_KEY API_KEY for the target account to authenticate & authorise the user.
--account-id value provide an Account Identifier of the user
--load FILE FILE to load flags from.
--debug prints debug level logs (default: false)
--json log as JSON instead of standard ASCII formatter (default: false)
--help, -h show help
--version, -v print the versionDescription
Setup Harness CD & GitOps in a few commands
Commands
harness login - Authenticate via the CLI by providing an API token and an Account Identifier.
harness update - Updates the CLI.
harness secret - Creates or updates a Harness Secret.
harness connector - Creates or updates a Harness Connector.
harness gitops-repository - Creates or updates a GitOps Repository.
harness gitops-cluster - Creates or updates a GitOps Cluster.
harness gitops-application - Creates or updates a GitOps Application.
harness environment - Creates or updates a Harness Environment.
harness infrastructure - Creates or updates a Harness Infrastructure.
harness service - Creates or updates a Harness Service.
harness pipeline - Creates, updates or runs a Harness Pipeline.
Global options
--api-key - Accepts a Harness API Token as a value for CLI login.
--account-id - Accepts an Account Identifier as a value for CLI login.
--base-url - Specifies the URL of the self-managed Harness instance.
--debug - Prints debug level logs. Defaults to false.
--json - Command outputs in JSON format.
--load - Load flags inputs from a file.
--version - Prints the utility version.
--help - Shows a list of commands or help for one command.
Command Reference
1. harness secret apply help
2. harness connector apply help
3. harness environment apply help
4. harness infrastructure apply help
5. harness service apply help
6. harness gitops-cluster apply help
7. harness gitops-cluster link help
8. harness gitops-repository apply help
9. harness gitops-application apply help
10. harness pipeline apply help
11. harness pipeline run help
Files
~/.secrets.json - Serves as a repository for credentials, containing the Harness API Token and Account Id.
Author
The original authorship of the Harness CLI utility tool can be attributed to Harness, Inc.
License
Harness CLI is released under the terms of the MIT License.
Last updated
Was this helpful?