For the complete documentation index, see llms.txt. This page is also available as Markdown.

V1

Documentation containing information about all available commands and options within the Harness CLI v1 (hc) utility tool.

Synopsis

Harness CLI is a tool to interact with Harness Resources.

Find more information at: https://developer.harness.io/docs/

Usage:
  hc [command]

VERSION:
   1.0.0 (Built with go1.24.9)

Available Commands:
  artifact    Manage Harness Artifacts
  auth        Authentication commands for Harness CLI
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  registry    Manage Harness Artifact Registries
  upgrade     Upgrade hc to the latest version
  version     Print the version number of hc

Flags:
      --account string          Account (overrides saved config)
      --api-url string          Base URL for the API (overrides saved config)
      --format string           Format of the result (default "table")
  -h, --help                    help for hc
      --org string              Org (overrides saved config)
      --profile string          Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) (default "none")
      --profile-output string   Name of the file to write the profile to (default "profile.pprof")
      --project string          Project (overrides saved config)
      --token string            Authentication token (overrides saved config)
  -v, --verbose                 Enable verbose logging to console

Use "hc [command] --help" for more information about a command.

Description

The new Harness CLI (hc) provides a modern, unified interface for managing Harness resources across the platform, with comprehensive support.

Commands

hc auth - Manage authentication with Harness services (login, logout, status)

hc registry - Manage Harness Artifact Registries (create, list, get, delete, migrate)

hc artifact - Manage artifacts in Harness Artifact Registry (list, push, pull, delete)

hc upgrade - Upgrade hc to the latest version

hc version - Print the version number of hc

hc completion - Generate autocompletion scripts for your shell (bash, zsh, fish, powershell)

hc help - Show help for any command

Global Flags

--account - Account ID (overrides saved config)

--api-url - Base URL for the API (overrides saved config)

--format - Format of the result: table (default), json, or yaml

--org - Organization ID (overrides saved config)

--profile - Name of profile to capture: none (default), cpu, heap, goroutine, threadcreate, block, mutex

--profile-output - Name of the file to write the profile to (default: profile.pprof)

--project - Project ID (overrides saved config)

--token - Authentication token (overrides saved config)

-h, --help - Show help for hc

-v, --verbose - Enable verbose logging to console

Local command options

1. hc auth commands

2. hc registry commands

For detailed examples and usage guides, see Manage Artifacts & Registries.

3. hc artifact commands

For detailed examples and usage guides, see Manage Artifacts & Registries.

4. hc upgrade command

5. hc version command

6. hc completion command

Files

The CLI stores authentication credentials and configuration securely on your local machine after running hc auth login.

Author

The Harness CLI v1 is developed and maintained by Harness, Inc.

License

Harness CLI is released under the terms of the MIT License.

See also

Last updated

Was this helpful?