KosmoKrator

data

DigitalOcean CLI for AI Agents

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

DigitalOcean CLI Setup

DigitalOcean can be configured headlessly with `kosmokrator integrations:configure digitalocean`.

Install, configure, and verify
# 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 digitalocean --set access_token="$DIGITALOCEAN_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor digitalocean --json
kosmokrator integrations:status --json

Credentials

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

KeyEnv varTypeRequiredLabel
access_token DIGITALOCEAN_ACCESS_TOKEN Secret secret yes Access Token
url DIGITALOCEAN_URL URL url no API Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call digitalocean.digitalocean_list_droplets '{"page":1,"per_page":1}' --json
Provider shortcut
kosmo integrations:digitalocean digitalocean_list_droplets '{"page":1,"per_page":1}' --json

Discovery

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

Discovery commands
kosmo integrations:docs digitalocean --json
kosmo integrations:docs digitalocean.digitalocean_list_droplets --json
kosmo integrations:schema digitalocean.digitalocean_list_droplets --json
kosmo integrations:search "DigitalOcean" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

digitalocean.digitalocean_list_droplets

List all droplets (virtual machines) in the DigitalOcean account. Returns IDs, names, status, size, region, and IP addresses.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call digitalocean.digitalocean_list_droplets '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_list_droplets '{"page":1,"per_page":1}' --json

digitalocean.digitalocean_get_droplet

Get details for a specific DigitalOcean droplet by ID. Returns full droplet information including networks, image, and region.

Read read
Parameters
id
Generic call
kosmo integrations:call digitalocean.digitalocean_get_droplet '{"id":1}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_get_droplet '{"id":1}' --json

digitalocean.digitalocean_create_droplet

Create a new DigitalOcean droplet (virtual machine). Requires a name, region, size, and image.

Write write
Parameters
name, region, size, image, ssh_keys, backups, ipv6, user_data, tags
Generic call
kosmo integrations:call digitalocean.digitalocean_create_droplet '{"name":"example_name","region":"example_region","size":"example_size","image":"example_image","ssh_keys":"example_ssh_keys","backups":true,"ipv6":true,"user_data":"example_user_data"}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_create_droplet '{"name":"example_name","region":"example_region","size":"example_size","image":"example_image","ssh_keys":"example_ssh_keys","backups":true,"ipv6":true,"user_data":"example_user_data"}' --json

digitalocean.digitalocean_delete_droplet

Permanently delete a DigitalOcean droplet. This action is irreversible and will destroy all data on the droplet.

Write write
Parameters
id
Generic call
kosmo integrations:call digitalocean.digitalocean_delete_droplet '{"id":1}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_delete_droplet '{"id":1}' --json

digitalocean.digitalocean_reboot_droplet

Reboot a DigitalOcean droplet. The droplet will be power-cycled and will be temporarily unavailable.

Write write
Parameters
id
Generic call
kosmo integrations:call digitalocean.digitalocean_reboot_droplet '{"id":1}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_reboot_droplet '{"id":1}' --json

digitalocean.digitalocean_list_domains

List all DNS domains managed in the DigitalOcean account.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call digitalocean.digitalocean_list_domains '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_list_domains '{"page":1,"per_page":1}' --json

digitalocean.digitalocean_get_domain

Get details for a specific DNS domain in DigitalOcean, including zone file and TTL information.

Read read
Parameters
name
Generic call
kosmo integrations:call digitalocean.digitalocean_get_domain '{"name":"example_name"}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_get_domain '{"name":"example_name"}' --json

digitalocean.digitalocean_list_spaces

List DigitalOcean Spaces access keys. Bucket/object listing uses the separate S3-compatible Spaces API, not this bearer-token API.

Read read
Parameters
page, per_page, sort, sort_direction, name, bucket, permission
Generic call
kosmo integrations:call digitalocean.digitalocean_list_spaces '{"page":1,"per_page":1,"sort":"example_sort","sort_direction":"example_sort_direction","name":"example_name","bucket":"example_bucket","permission":"example_permission"}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_list_spaces '{"page":1,"per_page":1,"sort":"example_sort","sort_direction":"example_sort_direction","name":"example_name","bucket":"example_bucket","permission":"example_permission"}' --json

digitalocean.digitalocean_list_kubernetes

List Kubernetes (DOKS) clusters in the DigitalOcean account.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call digitalocean.digitalocean_list_kubernetes '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_list_kubernetes '{"page":1,"per_page":1}' --json

digitalocean.digitalocean_get_current_user

Get information about the current authenticated DigitalOcean account, including email, UUID, and status.

Read read
Parameters
none
Generic call
kosmo integrations:call digitalocean.digitalocean_get_current_user '{}' --json
Shortcut
kosmo integrations:digitalocean digitalocean_get_current_user '{}' --json

Function Schemas

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

digitalocean.digitalocean_list_droplets 2 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_list_droplets --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of droplets per page (default: 20, max: 200).
digitalocean.digitalocean_get_droplet 1 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_get_droplet --json
ParameterTypeRequiredDescription
id integer yes The droplet ID.
digitalocean.digitalocean_create_droplet 9 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_create_droplet --json
ParameterTypeRequiredDescription
name string yes The hostname for the droplet (e.g., "web-01").
region string yes The region slug (e.g., "nyc3", "ams3", "sgp1").
size string yes The size slug (e.g., "s-1vcpu-1gb", "s-2vcpu-4gb").
image string yes The image slug or ID (e.g., "ubuntu-24-04-x64", "debian-12-x64").
ssh_keys array no Array of SSH key IDs or fingerprints to embed.
backups boolean no Enable automated backups (default: false).
ipv6 boolean no Enable IPv6 (default: false).
user_data string no Cloud-init user data script.
tags array no Array of tag names to apply.
digitalocean.digitalocean_delete_droplet 1 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_delete_droplet --json
ParameterTypeRequiredDescription
id integer yes The droplet ID to delete.
digitalocean.digitalocean_reboot_droplet 1 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_reboot_droplet --json
ParameterTypeRequiredDescription
id integer yes The droplet ID to reboot.
digitalocean.digitalocean_list_domains 2 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_list_domains --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of domains per page (default: 20).
digitalocean.digitalocean_get_domain 1 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_get_domain --json
ParameterTypeRequiredDescription
name string yes The domain name (e.g., "example.com").
digitalocean.digitalocean_list_spaces 7 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_list_spaces --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of items per page (default: 20).
sort string no Sort field supported by the DigitalOcean Spaces Keys API.
sort_direction string no Sort direction.
name string no Filter keys by name.
bucket string no Filter keys by bucket name.
permission string no Filter keys by permission.
digitalocean.digitalocean_list_kubernetes 2 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_list_kubernetes --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of items per page (default: 20).
digitalocean.digitalocean_get_current_user 0 parameters
Schema command
kosmo integrations:schema digitalocean.digitalocean_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.