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/CD
DUAL_PASSWORD=${DUAL_PASSWORD} dual login user@example.com
# Check authentication status
dual whoami

Commands

Examples

Wallets

bash
# Get current wallet profile
dual wallets me
# Get wallet by ID
dual wallets get wal_abc123
# List recent wallets
dual wallets list --limit 5

Templates

bash
# List all templates
dual templates list
# Get template details
dual templates get tmpl_abc123
# Search templates
dual templates search "loyalty"

Objects

bash
# List objects
dual objects list --limit 10
# Get object by ID
dual objects get obj_abc123
# Search objects by template
dual objects list --template tmpl_abc123

Raw API Calls

bash
# Make a raw API call
dual raw GET /storage/files
dual raw POST /ebus/actions '{"type":"transfer","objectId":"obj_123"}'

View the source on GitHub · 327 lines · Zero dependencies · Node.js 18+