โ Back to Docs
โก DCDN CLI
Unified command-line interface for the entire DCDN Cloud platform. Manage sandboxes, compute, GPU, domains, credits, and more.
v2.0.0
Node.js
Zero Dependencies
Install
# Quick install (Linux/macOS)
curl -fsSL https://dcdncloud.com/cli/install.sh | bash
# Or via npm
npm install -g @dcdn/cli
# Verify
dcdn --version
Getting Started
# 1. Login
dcdn login
# 2. Check status
dcdn status
# 3. Create a sandbox
dcdn sandbox create my-agent --size basic --image dcdn/sandbox-base:latest
# 4. Run commands in it
dcdn sandbox exec sbx-abc123 echo hello world
# 5. Interactive shell
dcdn sandbox shell sbx-abc123
Commands
๐ Authentication
dcdn login | Sign in with email and password. Stores token in ~/.dcdn.json |
dcdn status | Show account info and credit balance |
๐๏ธ Sandbox โ Agent Environments
dcdn sandbox create <name> | Create or get a sandbox (idempotent) |
| --size lite|basic|standard|large โ CPU/RAM tier |
| --image <docker-image> โ Base image (default: ubuntu:22.04) |
dcdn sandbox list | List all sandboxes with status, node, region |
dcdn sandbox exec <id> <cmd> | Execute a command. Output goes to stdout |
dcdn sandbox shell <id> | Interactive shell (REPL). Type exit to quit |
dcdn sandbox sleep <id> | Pause sandbox (saves resources, instant resume) |
dcdn sandbox wake <id> | Resume a sleeping sandbox |
dcdn sandbox snapshot <id> | Save point-in-time state |
dcdn sandbox restore <id> <snap> | Restore from a snapshot |
dcdn sandbox destroy <id> | Permanently delete (asks for confirmation) |
๐ฅ๏ธ Compute โ VPS Instances
dcdn compute list | List VPS instances with status, plan, IP |
๐ฐ Credits & Billing
dcdn credits | Show credit balance, granted, used, expired |
dcdn billing | Alias for dcdn credits |
๐ฎ GPU Marketplace
dcdn gpu nodes | List GPU nodes with model, VRAM, status |
dcdn gpu models | Available AI models for inference |
๐ Infrastructure
dcdn domains | List domains with status and SSL |
dcdn purge <domain> | Purge CDN cache for a domain |
dcdn nodes | Network node status (CPU, RAM, uptime) |
Examples
AI Agent Workflow
# Create a sandbox for your coding agent
dcdn sandbox create coding-agent --size standard --image dcdn/sandbox-python:latest
# Clone a repo and run tests
dcdn sandbox exec sbx-abc123 git clone https://github.com/org/repo /workspace
dcdn sandbox exec sbx-abc123 cd /workspace && pip install -r requirements.txt
dcdn sandbox exec sbx-abc123 cd /workspace && pytest
# Save state before making changes
dcdn sandbox snapshot sbx-abc123
# Make changes, and if something breaks โ restore
dcdn sandbox restore sbx-abc123 snap-xyz789
# Done? Sleep it (costs $0 when sleeping)
dcdn sandbox sleep sbx-abc123
Interactive Development
# Open a shell
$ dcdn sandbox shell sbx-abc123
sandbox> python3 -c "print('hello from DCDN')"
hello from DCDN
sandbox> node -e "console.log(42)"
42
sandbox> exit
Scripting & Automation
# Use in CI/CD or scripts
SANDBOX_ID=$(dcdn sandbox create ci-runner --size basic 2>/dev/null | grep -o 'sbx-[a-f0-9]*')
dcdn sandbox exec $SANDBOX_ID "cd /workspace && npm test"
EXIT_CODE=$?
dcdn sandbox destroy $SANDBOX_ID --force
exit $EXIT_CODE
Configuration
The CLI stores credentials in ~/.dcdn.json:
{
"token": "eyJhbG...",
"email": "user@example.com"
}
You can also set credentials via environment variables:
export DCDN_API_KEY="dcdn_live_..."
export DCDN_API_URL="https://dcdncloud.com/api/v1" # optional
Available Images
| Image | Size | Contents |
dcdn/sandbox-base | 878 MB | Ubuntu 22.04, Python 3.11, Node, Git, curl, jq, build tools |
dcdn/sandbox-python | 1.7 GB | + pandas, numpy, matplotlib, scikit-learn, pytest |
dcdn/sandbox-node | 2.1 GB | + TypeScript, ESLint, Prettier, Vite, Next.js, PM2 |
dcdn/sandbox-full | 3.0 GB | Everything + Go 1.23 + Rust |
ubuntu:22.04 | 77 MB | Stock Ubuntu (fastest start) |
MCP Integration
The DCDN Sandbox also provides an MCP server for direct AI agent integration:
// Claude Desktop / Cursor config
{
"mcpServers": {
"dcdn-sandbox": {
"url": "https://dcdncloud.com/mcp/sandbox/",
"headers": {
"Authorization": "Bearer dcdn_live_YOUR_TOKEN"
}
}
}
}
12 tools available: sandbox_create, sandbox_exec, sandbox_write_file, sandbox_read_file, sandbox_list_files, sandbox_git_clone, sandbox_start_process, sandbox_list, sandbox_snapshot, sandbox_sleep, sandbox_wake, sandbox_destroy
DCDN Cloud โ Decentralized CDN, DNS, WAF, GPU Cloud & AI Platform
dcdncloud.com ยท Docs ยท Sandbox Docs ยท Dashboard