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 the API and doctl. Commonly queried resources include:
- Droplets (virtual machines)
- Droplet autoscale pools
- Kubernetes clusters (DOKS)
- App Platform applications
- Managed Databases
- Serverless Functions and namespaces
- Serverless inference, dedicated inference, Gradient agents, Gradient models, Gradient regions, and Gradient knowledge bases
- Load Balancers
- CDNs
- Volumes and Snapshots
- Network File Storage (NFS) shares and snapshots
- Domains and DNS records
- Container Registry
- Spaces (object storage)
- Firewalls
- VPCs, VPC peerings, NAT gateways, partner network attachments, and BYOIP prefixes
- Uptime checks, uptime alerts, monitoring alerts, CSPM security scans
- Projects and project resources
Direct inventory examples:
clanker do list gradient-agents --region nyc3
clanker do list dedicated-inference
clanker do list nfs
clanker do list project-resources --project-id <project-id>
clanker do list security-scansMaker 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"