CLI and Python SDK for managing DuploCloud infrastructure. Works as a standalone command-line tool or as a Python module in your own scripts and CI/CD pipelines.
30+ resource types -- tenants, services, infrastructure, hosts, RDS, S3, Lambda, ECS, Batch, Argo Workflows, and more
Plugin architecture -- resources discovered via Python entry points, easy to extend
# List services in the current tenant
duploctl service list
# Find a specific tenant
duploctl tenant find mytenant
# Create a service from a YAML file
duploctl service create -f service.yaml
# Get output as YAML
duploctl service list -o yaml
# Filter output with JMESPath
duploctl service list -q '[].Name'
# Configure AWS credentials
duploctl jit update_aws_config myportal
# Open AWS web console
duploctl jit web
# Get Kubernetes config
duploctl jit update_kubeconfig myinfra
Resource Management
# Infrastructure and tenants
duploctl infrastructure list
duploctl tenant find mytenant
# Services
duploctl service list
duploctl service create -f service.yaml -w
duploctl service update_image myservice nginx:latest
# Kubernetes resources
duploctl configmap list
duploctl secret find mysecret
duploctl cronjob list
duploctl pod list
# AWS resources
duploctl rds list
duploctl s3 list
duploctl lambda list
duploctl hosts list
Python Module
Use duploctl programmatically in your own scripts.
duplo = DuploCtl.from_creds(host="...", token="...", tenant="dev01")
# Create from a dict
duplo("service", "create", body={
"Name": "myservice",
"Image": "nginx:latest",
"Replicas": 2,
})
# Or load the resource directly
svc = duplo.load("service")
svc.create(body={"Name": "myservice", "Image": "nginx:latest"})
Docker
# Run any duploctl command
docker run -e DUPLO_HOST=... -e DUPLO_TOKEN=... -e DUPLO_TENANT=... \
duplocloud/duploctl service list
# Output as YAML
docker run -e DUPLO_HOST=... -e DUPLO_TOKEN=... -e DUPLO_TENANT=... \
duplocloud/duploctl service list -o yaml
CI/CD
duploctl integrates with all major CI/CD platforms. See the DuploCloud CI/CD docs for detailed guides.