KosmoKrator

productivity

Docker Hub CLI for AI Agents

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

7 functions 6 read 1 write Bearer token auth

Docker Hub CLI Setup

Docker Hub can be configured headlessly with `kosmokrator integrations:configure docker`.

# 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 docker --set access_token="$DOCKER_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor docker --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
access_token DOCKER_ACCESS_TOKEN Secret secret yes Access Token
url DOCKER_URL URL url no API Base URL

Call Docker Hub Headlessly

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

kosmo integrations:call docker.docker_list_repositories '{
  "namespace": "example_namespace",
  "page_size": 1,
  "page": 1
}' --json

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

kosmo integrations:docker docker_list_repositories '{
  "namespace": "example_namespace",
  "page_size": 1,
  "page": 1
}' --json

Agent Discovery Commands

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

kosmo integrations:docs docker --json
kosmo integrations:docs docker.docker_list_repositories --json
kosmo integrations:schema docker.docker_list_repositories --json
kosmo integrations:search "Docker Hub" --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 Docker Hub.

docker.docker_list_repositories

Read read

List Docker Hub repositories. Optionally filter by namespace. Supports pagination with page_size and page parameters.

Parameters
namespace, page_size, page

Generic CLI call

kosmo integrations:call docker.docker_list_repositories '{"namespace":"example_namespace","page_size":1,"page":1}' --json

Provider shortcut

kosmo integrations:docker docker_list_repositories '{"namespace":"example_namespace","page_size":1,"page":1}' --json

docker.docker_get_repository

Read read

Get details for a specific Docker Hub repository by namespace and name.

Parameters
namespace, name

Generic CLI call

kosmo integrations:call docker.docker_get_repository '{"namespace":"example_namespace","name":"example_name"}' --json

Provider shortcut

kosmo integrations:docker docker_get_repository '{"namespace":"example_namespace","name":"example_name"}' --json

docker.docker_list_tags

Read read

List tags for a Docker Hub repository. Supports pagination with page_size and page parameters.

Parameters
namespace, name, page_size, page

Generic CLI call

kosmo integrations:call docker.docker_list_tags '{"namespace":"example_namespace","name":"example_name","page_size":1,"page":1}' --json

Provider shortcut

kosmo integrations:docker docker_list_tags '{"namespace":"example_namespace","name":"example_name","page_size":1,"page":1}' --json

docker.docker_get_tag

Read read

Get details for a specific tag in a Docker Hub repository.

Parameters
namespace, name, tag

Generic CLI call

kosmo integrations:call docker.docker_get_tag '{"namespace":"example_namespace","name":"example_name","tag":"example_tag"}' --json

Provider shortcut

kosmo integrations:docker docker_get_tag '{"namespace":"example_namespace","name":"example_name","tag":"example_tag"}' --json

docker.docker_create_repository

Write write

Create a new Docker Hub repository under a namespace.

Parameters
namespace, name, description, full_description, is_private

Generic CLI call

kosmo integrations:call docker.docker_create_repository '{"namespace":"example_namespace","name":"example_name","description":"example_description","full_description":"example_full_description","is_private":true}' --json

Provider shortcut

kosmo integrations:docker docker_create_repository '{"namespace":"example_namespace","name":"example_name","description":"example_description","full_description":"example_full_description","is_private":true}' --json

docker.docker_list_organizations

Read read

List Docker Hub organizations the authenticated user belongs to. Supports pagination with page_size and page parameters.

Parameters
page_size, page

Generic CLI call

kosmo integrations:call docker.docker_list_organizations '{"page_size":1,"page":1}' --json

Provider shortcut

kosmo integrations:docker docker_list_organizations '{"page_size":1,"page":1}' --json

docker.docker_get_current_user

Read read

Get the profile of the currently authenticated Docker Hub user. Useful for verifying credentials and displaying account information.

Parameters
none

Generic CLI call

kosmo integrations:call docker.docker_get_current_user '{}' --json

Provider shortcut

kosmo integrations:docker docker_get_current_user '{}' --json

Function Schemas

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

docker.docker_list_repositories

List Docker Hub repositories. Optionally filter by namespace. Supports pagination with page_size and page parameters.

Operation
Read read
Schema command
kosmo integrations:schema docker.docker_list_repositories --json
ParameterTypeRequiredDescription
namespace string no Docker Hub namespace (username or organization) to filter by.
page_size integer no Number of repositories per page (default: 25).
page integer no Page number for pagination (1-indexed, default: 1).

docker.docker_get_repository

Get details for a specific Docker Hub repository by namespace and name.

Operation
Read read
Schema command
kosmo integrations:schema docker.docker_get_repository --json
ParameterTypeRequiredDescription
namespace string yes The Docker Hub namespace (username or organization).
name string yes The repository name.

docker.docker_list_tags

List tags for a Docker Hub repository. Supports pagination with page_size and page parameters.

Operation
Read read
Schema command
kosmo integrations:schema docker.docker_list_tags --json
ParameterTypeRequiredDescription
namespace string yes The Docker Hub namespace (username or organization).
name string yes The repository name.
page_size integer no Number of tags per page (default: 25).
page integer no Page number for pagination (1-indexed, default: 1).

docker.docker_get_tag

Get details for a specific tag in a Docker Hub repository.

Operation
Read read
Schema command
kosmo integrations:schema docker.docker_get_tag --json
ParameterTypeRequiredDescription
namespace string yes The Docker Hub namespace (username or organization).
name string yes The repository name.
tag string yes The tag name (e.g., "latest", "1.0.0").

docker.docker_create_repository

Create a new Docker Hub repository under a namespace.

Operation
Write write
Schema command
kosmo integrations:schema docker.docker_create_repository --json
ParameterTypeRequiredDescription
namespace string yes Docker Hub namespace (username or organization) for the repository.
name string yes Repository name (must be unique within the namespace).
description string no Short description of the repository.
full_description string no Full description (supports Markdown).
is_private boolean no Whether the repository is private (default: false).

docker.docker_list_organizations

List Docker Hub organizations the authenticated user belongs to. Supports pagination with page_size and page parameters.

Operation
Read read
Schema command
kosmo integrations:schema docker.docker_list_organizations --json
ParameterTypeRequiredDescription
page_size integer no Number of organizations per page (default: 25).
page integer no Page number for pagination (1-indexed, default: 1).

docker.docker_get_current_user

Get the profile of the currently authenticated Docker Hub user. Useful for verifying credentials and displaying account information.

Operation
Read read
Schema command
kosmo integrations:schema docker.docker_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.