CLI Tool

v1.0.0

Zero-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 with email/password
dual login user@example.com mypassword

# Check authentication status
dual whoami

Commands

CommandArgumentsDescription
dual login<email> <password>Authenticate and store JWT token
dual refreshRefresh the stored access token
dual whoamiDisplay 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 helpShow 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/actions '{"type":"transfer","objectId":"obj_123"}'

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