Zen Documentation

Zen CLI

Command-line client for the Zen Partner API. Search customers, manage loyalty cards, look up transactions, and more.

Installation

🐧
Linux / macOS
Auto-detects platform, verifies checksum, adds to PATH
curl -fsSL https://downloads.zenglobal.au/cli/install.sh | sh
🪟
Windows (PowerShell)
Auto-detects platform, verifies checksum, adds to PATH
irm https://downloads.zenglobal.au/cli/install.ps1 | iex

Getting Started

1
Configure credentials
zg config login

Enter your API key and secret when prompted. Credentials are stored in ~/.config/zg/config.yaml.

2
Verify connection
zg config test
3
Start using
# Search for a customer
zg customer search --email user@example.com

# List loyalty cards
zg loyalty cards search --card-number 1234

# Get site info
zg site list --json

Commands

CommandDescription
zg configManage configuration and API profiles
zg customerCustomer operations
zg emailEmail validation
zg inventoryInventory search and lookup
zg loyaltyLoyalty cards, points, settings, groups
zg membershipMembership management
zg offerOffer search and management
zg orderOrder operations
zg siteSite listing and search
zg transactionTransaction lookup
zg voucherVoucher search and redemption
zg systemSystem health and API version
zg mcp serveStart MCP server for AI agent integration
zg versionShow CLI version and build info
zg updateSelf-update to latest version

Global Flags

--json Output as JSON
--profile Named profile
--api-key Override key
--api-secret Override secret
--api-url Override URL
--verbose Debug info
--no-color Plain output

Multiple Profiles

# Add a second profile
zg config login --profile staging

# Use it
zg site list --profile staging

AI Agent Integration

Model Context Protocol (MCP)

The CLI includes a built-in MCP server. AI agents can discover and invoke all CLI commands programmatically.

zg mcp serve

All CLI commands are automatically exposed as MCP tools with full parameter schemas.