This article follows the official documentation. We haven’t tested this tool for a hands-on review.
When a coding agent can run shell commands against a Kubernetes deployment, the Argo CD CLI lets it inspect applications managed by Argo CD. Argo CD is a GitOps continuous delivery tool for Kubernetes. It compares the live state in the cluster with the desired state stored in a Git repository and can sync the cluster back to that state. The CLI sends commands to an Argo CD server, so an agent can check deployment health and differences without editing local files.
A coding agent can start with read-only inspection: list Argo CD applications, then check one application’s sync and health status. The CLI can also change applications. For example, syncing asks Argo CD to apply an application’s desired state to the cluster. Agents should treat commands that change state as a separate step from inspection.
Install and connect
The Argo CD installation page lists Homebrew for macOS and Linux:
brew install argocd
The same page shows how to download the argocd binary from the GitHub releases for each operating system.
The CLI needs to authenticate with the server before it can inspect applications. For an interactive SSO login, run:
argocd login <ARGOCD_SERVER> --sso
Replace <ARGOCD_SERVER> with the server hostname or address provided by your organization. The --sso option starts single sign-on authentication. The login reference also documents a login with a username and password. With --core, the CLI is set up to talk to the Kubernetes API server directly. Keep credentials and tokens in an approved credential store or login flow; do not put them in an agent prompt or commit them to a repository.
After you log in, CLI commands contact the Argo CD API server, and the getting started guide says the CLI environment must be able to reach it. Reading a local copy of the repository does not let the argocd client inspect cluster state. Commands such as app list and app get request information from Argo CD over the network. The exception is --core mode, where the CLI talks directly to Kubernetes instead of the Argo CD API server.
Inspect an application
A coding agent can use app list to find an application and app get to inspect its current state:
argocd app list
argocd app get <APP_NAME>
Replace <APP_NAME> with an application name returned by the first command. The app get command shows details for the selected application, such as its source repository and destination. Its output also includes the sync status and health status. Both commands print a human-readable table by default. For output an agent can parse, add -o json to either command. The application command reference documents these commands and their options.
These commands read Argo CD state; they do not apply changes to application resources. They still make network requests and require the logged-in account to have access to the application. If the CLI reports an authorization error, the account does not have permission for that request, and the agent should report the error rather than try a different account.
Review changes before syncing
To see how an application’s desired configuration differs from its live state, run:
argocd app diff <APP_NAME>
The diff helps an agent explain what a sync would change. It does not itself apply those changes. The diff reference lists the exit codes. The command returns 0 when there is no diff and 1 when it finds one. It returns 2 on general errors. Kubernetes Secrets are left out of the diff. A sync is a separate, write-oriented command:
argocd app sync <APP_NAME>
Syncing asks Argo CD to apply the desired application state to the cluster. Run it only when the task calls for a deployment and the account has permission to make that change. The app diff and app sync commands are documented in the Argo CD application command reference.
Give the agent a bounded task
For a read-only investigation, an agent prompt can say:
Use
argocd app listto find<APP_NAME>, then runargocd app get <APP_NAME>. Report its sync status, health status, and any reported conditions. Do not run commands that change cluster state.
The agent can report what Argo CD returned, but it should not treat a healthy status as proof that an application behaves correctly for users. Argo CD reports deployment state; application-specific checks require separate evidence.