KosmoKrator

productivity

Argo CD CLI for AI Agents

Use the Argo CD CLI from KosmoKrator to call Argo CD tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write API key auth

Argo CD CLI Setup

Argo CD can be configured headlessly with `kosmokrator integrations:configure argocd`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure argocd --set api_key="$ARGOCD_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor argocd --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key ARGOCD_API_KEY Secret secret yes Bearer Token
base_url ARGOCD_BASE_URL Text text no API Base URL

Call Argo CD Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call argocd.argocd_list_applications '{
  "project": "example_project",
  "selector": "example_selector",
  "repo": "example_repo"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:argocd argocd_list_applications '{
  "project": "example_project",
  "selector": "example_selector",
  "repo": "example_repo"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs argocd --json
kosmo integrations:docs argocd.argocd_list_applications --json
kosmo integrations:schema argocd.argocd_list_applications --json
kosmo integrations:search "Argo CD" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Argo CD.

argocd.argocd_list_applications

Read read

List all Argo CD applications. Optionally filter by project or label selector.

Parameters
project, selector, repo

Generic CLI call

kosmo integrations:call argocd.argocd_list_applications '{"project":"example_project","selector":"example_selector","repo":"example_repo"}' --json

Provider shortcut

kosmo integrations:argocd argocd_list_applications '{"project":"example_project","selector":"example_selector","repo":"example_repo"}' --json

argocd.argocd_get_application

Read read

Get details for a specific Argo CD application, including sync status, health, source, and destination.

Parameters
name, project, refresh

Generic CLI call

kosmo integrations:call argocd.argocd_get_application '{"name":"example_name","project":"example_project","refresh":"example_refresh"}' --json

Provider shortcut

kosmo integrations:argocd argocd_get_application '{"name":"example_name","project":"example_project","refresh":"example_refresh"}' --json

argocd.argocd_create_application

Write write

Create a new Argo CD application. Requires application name, project, source repository with path and revision, and destination cluster/namespace.

Parameters
name, project, repo_url, path, revision, dest_server, dest_namespace, sync_policy, sync_options, labels, description

Generic CLI call

kosmo integrations:call argocd.argocd_create_application '{"name":"example_name","project":"example_project","repo_url":"example_repo_url","path":"example_path","revision":"example_revision","dest_server":"example_dest_server","dest_namespace":"example_dest_namespace","sync_policy":"example_sync_policy"}' --json

Provider shortcut

kosmo integrations:argocd argocd_create_application '{"name":"example_name","project":"example_project","repo_url":"example_repo_url","path":"example_path","revision":"example_revision","dest_server":"example_dest_server","dest_namespace":"example_dest_namespace","sync_policy":"example_sync_policy"}' --json

argocd.argocd_list_projects

Read read

List all Argo CD projects.

Parameters
none

Generic CLI call

kosmo integrations:call argocd.argocd_list_projects '{}' --json

Provider shortcut

kosmo integrations:argocd argocd_list_projects '{}' --json

argocd.argocd_get_project

Read read

Get details for a specific Argo CD project, including source/destination rules and cluster configurations.

Parameters
name

Generic CLI call

kosmo integrations:call argocd.argocd_get_project '{"name":"example_name"}' --json

Provider shortcut

kosmo integrations:argocd argocd_get_project '{"name":"example_name"}' --json

argocd.argocd_list_repositories

Read read

List all configured Git repositories in Argo CD, including connection status.

Parameters
repo

Generic CLI call

kosmo integrations:call argocd.argocd_list_repositories '{"repo":"example_repo"}' --json

Provider shortcut

kosmo integrations:argocd argocd_list_repositories '{"repo":"example_repo"}' --json

argocd.argocd_get_current_user

Read read

Get the authenticated Argo CD user's profile information.

Parameters
none

Generic CLI call

kosmo integrations:call argocd.argocd_get_current_user '{}' --json

Provider shortcut

kosmo integrations:argocd argocd_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

argocd.argocd_list_applications

List all Argo CD applications. Optionally filter by project or label selector.

Operation
Read read
Schema command
kosmo integrations:schema argocd.argocd_list_applications --json
ParameterTypeRequiredDescription
project string no Filter applications by project name.
selector string no Label selector to filter applications (e.g. "env=production").
repo string no Filter by source repository URL.

argocd.argocd_get_application

Get details for a specific Argo CD application, including sync status, health, source, and destination.

Operation
Read read
Schema command
kosmo integrations:schema argocd.argocd_get_application --json
ParameterTypeRequiredDescription
name string yes The name of the Argo CD application.
project string no The project the application belongs to (optional, used for disambiguation).
refresh string no Force a refresh of the application state. Set to "true" or "hard" to refresh before returning.

argocd.argocd_create_application

Create a new Argo CD application. Requires application name, project, source repository with path and revision, and destination cluster/namespace.

Operation
Write write
Schema command
kosmo integrations:schema argocd.argocd_create_application --json
ParameterTypeRequiredDescription
name string yes The name of the application.
project string yes The Argo CD project this application belongs to.
repo_url string yes The Git repository URL for the application source.
path string yes The path within the repository containing the Kubernetes manifests or Kustomize/Helm config.
revision string no The Git revision (branch, tag, or commit SHA) to track. Defaults to HEAD.
dest_server string no The destination Kubernetes cluster API URL. Defaults to "https://kubernetes.default.svc".
dest_namespace string yes The destination Kubernetes namespace.
sync_policy string no Sync policy: "automated" for auto-sync, "manual" or empty for manual sync.
sync_options string no Comma-separated sync options (e.g. "CreateNamespace=true,PrunePropagationPolicy=foreground").
labels object no Key-value labels to apply to the application (e.g. {"env": "production"}).
description string no A human-readable description of the application.

argocd.argocd_list_projects

List all Argo CD projects.

Operation
Read read
Schema command
kosmo integrations:schema argocd.argocd_list_projects --json
ParameterTypeRequiredDescription
No parameters.

argocd.argocd_get_project

Get details for a specific Argo CD project, including source/destination rules and cluster configurations.

Operation
Read read
Schema command
kosmo integrations:schema argocd.argocd_get_project --json
ParameterTypeRequiredDescription
name string yes The name of the Argo CD project.

argocd.argocd_list_repositories

List all configured Git repositories in Argo CD, including connection status.

Operation
Read read
Schema command
kosmo integrations:schema argocd.argocd_list_repositories --json
ParameterTypeRequiredDescription
repo string no Filter by repository URL.

argocd.argocd_get_current_user

Get the authenticated Argo CD user's profile information.

Operation
Read read
Schema command
kosmo integrations:schema argocd.argocd_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.