Skip to main content
The Argo CD CLI (argocd) provides a complete interface for managing your GitOps deployments. This page covers authentication, configuration, and common usage patterns.

Global Flags

The CLI supports numerous global flags that apply to all commands:

Authentication Flags

string
Argo CD server address
string
Authentication token (or set ARGOCD_AUTH_TOKEN environment variable)
string
The name of the Argo CD server context to use

Connection Flags

boolean
Skip server certificate and domain verification
boolean
Disable TLS
boolean
Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2
boolean
Connect to a random argocd-server port using port forwarding
string
Namespace name which should be used for port forwarding

Kubernetes Flags

boolean
If set to true, CLI talks directly to Kubernetes instead of Argo CD API server
string
Directs the command to the given kube-context

Authentication

Login to Argo CD Server

Authenticate with username and password:
You’ll be prompted for credentials:

SSO Login

Login using Single Sign-On:
This will open your browser for SSO authentication.

Skip TLS Verification

For testing or self-signed certificates:
Using --insecure is not recommended for production environments as it skips certificate verification.

Using Authentication Tokens

Generate and use an authentication token:

Core Mode (Direct Kubernetes Access)

For administrative tasks without going through the API server:

Configuration File

The CLI stores configuration in ~/.config/argocd/config (or $HOME/.argocd/config on older versions):

Manage Contexts

Switch between multiple Argo CD servers:

Common Usage Patterns

Quick Application Status

Sync and Deploy

Multiple Output Formats

Most commands support different output formats:

Port Forwarding

Access Argo CD without external exposure:

Shell Completion

Enable shell completion for faster command entry:

Troubleshooting

Connection Issues

Authentication Expiry

If your token expires:

Available Commands

app

Manage applications

appset

Manage ApplicationSets

cluster

Manage cluster credentials

repo

Manage repository connections

project

Manage projects

admin

Administrative commands

account

Manage account settings

Environment Variables

string
Authentication token to avoid passing --auth-token flag
string
Argo CD server address to avoid passing --server flag
string
Additional CLI options applied to all commands

Next Steps

App Commands

Learn application management commands

Cluster Commands

Configure cluster connections