Register Argo CD applications, clusters and GitOps agents from the command line with the Harness CLI, with RBAC and policy governance applied automatically.

Creating new services at AI speed loses its luster if configuring the build > test > deploy > release workflows is difficult or slow. As friendly as a GUI can be, once you know a tool you probably want to work at the command line (or let your agent do it).
That is where you’ll be fast. And that’s why we built new GitOps capabilities directly into the Harness CLI.
The right developer experience
Argo CD is the standard for Kubernetes delivery. Managing it across an enterprise usually means dealing with controller sprawl and writing brittle glue code in legacy CI tools like Jenkins or GitHub Actions.
We built Harness GitOps to be the enterprise control plane for Argo CD, managing sprawl and providing orchestration without all the glue code.
We are now bringing that control plane to your terminal.
Developers want to stay in their IDE. With the new CLI commands, you can rapidly configure Argo CD applications in Harness without ever opening a browser. You define your deployments in the terminal and keep moving.
What this gives you:
- Instant Argo CD application configuration via command line
- Local management of Harness GitOps agents and clusters
- Declarative workflow triggers that wrap syncs with enterprise logic
Connecting Argo to Harness
To cleanly organize GitOps applications alongside your other delivery workflows, Harness needs to map Argo constructs like projects to the corresponding Harness constructs. This gives teams visibility and governance over their applications, applies Harness RBAC, etc.
Accelerating Day 2 operations
The CLI’s value grows beyond initial configuration. For example, if you're retiring a GitOps application definition, but want to leave its Kubernetes resources running during the transition, you could run a deletion blocking cascading changes:
harness delete gitops_application prod-agent/legacy-api --no-cascade
You could also perform bulk updates, such as adding a new region for an application to be deployed to.
Built for the AI era
The reality is that human developers are not the only ones writing code anymore.
AI agents are generating changes and pushing commits at machine speed. These agents need a way to tell your continuous delivery system what to do. A web interface is less than ideal for your LLM.
By exposing our GitOps capabilities through the CLI, we made it trivial for AI tools to interact with Harness. Your agents can now programmatically configure applications, tell Harness about changes, and trigger delivery workflows.
How it works
Instead of navigating the Harness UI to onboard a new service, you execute a CLI command to register your repository and define your target cluster. The CLI communicates with the Harness GitOps control plane, provisions the Argo CD Application resources, and applies your Open Policy Agent governance policies automatically.
For example, if you want to discover Argo applications, setup a project to contain them, and then import them, a sequence of commands like this is a good start:
# 1. Discover AppProjects on the agent that are not yet mapped to Harness
harness list gitops_argo_project my-agent --level account --format json
# 2. Create the Harness orgs and projects that mappings.yaml will reference
# (there is no bulk create API, so create orgs and projects one at a time)
harness create org my-org
harness create project my-project --org my-org
# 3. Map the AppProjects to those Harness orgs and projects from a file
harness create gitops_app_project_mapping my-agent --level account -f mappings.yaml
# 4. Import the mapped projects and auto-create their services, environments, and cluster links
harness execute gitops_agent:import my-agent --level account -f import.yaml --watch
# 5. Re-check the auto-create outcome for a specific import later, by its importRequestId
harness list gitops_autocreate_log my-agent --import-request-id <import_request_id> --all --format csv > autocreate-log.csv
You get the enterprise guardrails of Harness. You get the GitOps native sync of Argo CD. You get it all without leaving your command line.
Without the control of tests and scans, speed is a damage multiplier that burns out teams. But setting up those checks should not require a mouse.
The new Harness CLI GitOps commands let developers and AI agents manage deployments at machine speed.



