CLI Tool
v1.0.0Zero-dependency command-line interface for the DUAL Platform API. Perfect for quick testing, scripting, and CI/CD integration.
Installation
npm install -g dual-cli
Authentication
Tokens are stored in ~/.dual-cli.json and automatically attached to all subsequent requests.
Terminal
# 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 whoamiCommands
| Command | Arguments | Description |
|---|---|---|
dual login | <email> | Authenticate interactively and store JWT token |
dual refresh | — | Refresh the stored access token |
dual whoami | — | Display current authenticated user |
dual wallets | <action> [id] | Wallet operations (me, get, list) |
dual templates | <action> [id] | Template operations (list, get, search) |
dual objects | <action> [id] | Object operations (list, get, search) |
dual actions | <action> [data] | Event Bus action execution |
dual orgs | <action> [id] | Organization management |
dual webhooks | <action> [id] | Webhook management |
dual raw | <method> <path> [body] | Make any raw API call |
dual help | — | Show available commands |
Examples
Wallets
Terminal
# 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
Terminal
# List all templates dual templates list # Get template details dual templates get tmpl_abc123 # Search templates dual templates search "loyalty"
Objects
Terminal
# 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
Terminal
# Make a raw API call
dual raw GET /storage/files
dual raw POST /ebus/execute '{"action":{"transfer":{"id":"obj_123","to":"usr_456"}}}'View the source on GitHub · 327 lines · Zero dependencies · Node.js 18+