Skip to main content

@anyway-sh/cli on npm

View package on npm

Source on GitHub

View source code

Installation

npm install -g anyway
Or use without installing:
npx anyway <command>

Quick Start

# Authenticate (opens browser)
anyway login

# Create a product with payment link
anyway products create --name "My Product" --price 29.99

# Get JSON output (for agent/automation use)
anyway products create --name "My Product" --price 29.99 --format json

Authentication

anyway login              # Open browser to authenticate
anyway logout             # Clear stored credentials
anyway whoami             # Show current session info
First-time login opens a browser window to complete authentication. Credentials are stored at ~/.anyway/credentials.json and auto-refreshed. For environments without a browser, the login page will display a token you can paste back into the terminal.

Commands

products

anyway products list
anyway products list --status active --page 1 --size 20
anyway products get <productId>
anyway products create --name <name> --price <amount> [--currency usd] [--description <desc>]
anyway products create --name <name> --price <amount> --type recurring --interval month
anyway products update <productId> --name <name> [--description <desc>]
anyway products archive <productId>
anyway products publish <productId>
anyway products payment-links <productId>
Creating a product automatically creates a payment link. The payment link URL is returned in the output.

orders

anyway orders list
anyway orders list --status paid --page 1 --size 20
anyway orders list --product <productId> --from 2024-01-01 --to 2024-12-31

wallets

anyway wallets balance
anyway wallets transactions
anyway wallets transactions --limit 50

dashboard

anyway dashboard templates
anyway dashboard query <templateId>
anyway dashboard query <templateId> --days 30

traces

anyway traces status
anyway traces list
anyway traces list --limit 50

developer

anyway developer keys list
anyway developer keys list --type sdk_key
anyway developer keys create --name <name>
anyway developer keys delete <keyId>

chat

anyway chat                          # Interactive chat with AI agent
anyway chat "what's my revenue?"     # Single-shot query
anyway chat --session <sessionId>    # Continue an existing session

Global Options

OptionValuesDefaultDescription
--envprod, sandbox, dev, dev-localprodTarget environment
--formattable, json, csvtableOutput format

Agent / Automation Usage

All commands support --format json for machine-readable output and return non-zero exit codes on failure.
# Create product and capture output
result=$(anyway products create --name "API Product" --price 49.99 --format json)
payment_link=$(echo $result | jq -r '.paymentLink.paymentLinkUrl')

# List orders as CSV
anyway orders list --format csv > orders.csv