DigitalOcean
Clanker supports querying and managing DigitalOcean infrastructure using the doctl CLI.
Authentication
DigitalOcean authentication requires an API token.
Obtaining a token
- Log in to the DigitalOcean control panel.
- Navigate to API > Tokens/Keys.
- Generate a new personal access token with the required scopes.
Configuration
Add your API token to ~/.clanker.yaml:
digitalocean:
api_token: "dop_v1_abc123..."Alternatively, use an environment variable:
export DO_API_TOKEN="dop_v1_abc123..."Token resolution order
digitalocean.api_tokenin the config fileDO_API_TOKENenvironment variableDIGITALOCEAN_ACCESS_TOKENenvironment variable
Prerequisites
The doctl CLI must be installed and available on your PATH:
# macOS
brew install doctl
# Linux (snap)
sudo snap install doctl
# Verify
doctl versionClanker passes the API token directly to doctl via the --access-token flag, so you do not need to run doctl auth init separately.
Querying DigitalOcean
Explicit flag
clanker ask --digitalocean "What Droplets are running?"Automatic routing
If your question mentions DigitalOcean-specific services, Clanker routes to DigitalOcean automatically:
clanker ask "List my DigitalOcean Droplets"Supported Services
Clanker queries DigitalOcean services through doctl. Commonly queried resources include:
- Droplets (virtual machines)
- Kubernetes clusters (DOKS)
- App Platform applications
- Managed Databases
- Load Balancers
- Volumes and Snapshots
- Domains and DNS records
- Container Registry
- Spaces (object storage)
- Firewalls
- VPCs
Maker Pipeline
The maker feature supports DigitalOcean infrastructure provisioning:
# Generate a plan
clanker ask --maker --digitalocean "Create a Droplet called web-server with 2GB RAM in nyc3"
# Apply the plan
clanker ask --apply --plan-file plan.jsonBefore applying DigitalOcean plans, Clanker validates API token access and checks registry push permissions if the plan involves container image operations.
Backend Credentials
DigitalOcean API tokens can be stored and retrieved through the Clanker backend:
clanker credentials store digitalocean
clanker ask --api-key ck_live_abc123 --digitalocean "List my Droplets"