CLI Tool
Zero-dependency command-line interface for the Dual Platform API, perfect for quick testing, scripting, and CI/CD integration.
The CLI Tool (v1.0.0) is a zero-dependency command-line interface for the Dual Platform API. Perfect for quick testing, scripting, and CI/CD integration.
Installation
bash
npm install -g dual-cli
Authentication
Tokens are stored in ~/.dual-cli.json and automatically attached to all subsequent requests.
bash
# Login interactively (prompts for password securely)dual login user@example.com# Or use environment variable for CI/CDDUAL_PASSWORD=${DUAL_PASSWORD} dual login user@example.com# Check authentication statusdual whoami
Commands
Examples
Wallets
bash
# Get current wallet profiledual wallets me# Get wallet by IDdual wallets get wal_abc123# List recent walletsdual wallets list --limit 5
Templates
bash
# List all templatesdual templates list# Get template detailsdual templates get tmpl_abc123# Search templatesdual templates search "loyalty"
Objects
bash
# List objectsdual objects list --limit 10# Get object by IDdual objects get obj_abc123# Search objects by templatedual objects list --template tmpl_abc123
Raw API Calls
bash
# Make a raw API calldual raw GET /storage/filesdual raw POST /ebus/actions '{"type":"transfer","objectId":"obj_123"}'
View the source on GitHub · 327 lines · Zero dependencies · Node.js 18+