When to Use
- •ArgoCD application management
- •Sync status verification
- •Application diff preview
- •GitOps workflow operations
Prerequisites
- •ArgoCD CLI installed
- •Authenticated to ArgoCD server
- •Appropriate RBAC permissions
Commands
Authentication
bash
# Login to ArgoCD argocd login <ARGOCD_SERVER> --username admin --password <password> # Current context argocd context
Application Operations
bash
# List applications argocd app list # Get application status argocd app get <app-name> # Show application diff argocd app diff <app-name> # Sync application argocd app sync <app-name> # Sync with prune argocd app sync <app-name> --prune
Health & Status
bash
# Application health argocd app get <app-name> -o json | jq '.status.health.status' # Sync status argocd app get <app-name> -o json | jq '.status.sync.status' # Resources status argocd app resources <app-name>
Best Practices
- •ALWAYS diff before sync
- •Use --prune carefully in production
- •Verify health after sync
- •Use projects for access control
- •Enable auto-sync only for non-prod environments
Output Format
- •Command executed
- •Sync/health status
- •Any drift detected
- •Recommended actions
Integration with Agents
Used by: @gitops, @devops, @validation