Skip to main content
The Waffo Pancake CLI (pancake) wraps the Merchant API in one command-line tool. Use it interactively, in scripts, or hand it to an AI coding agent: every command is discoverable as JSON, every write can be previewed offline, and nothing irreversible happens without an explicit confirmation flag.
Release candidate. The CLI ships as @waffo/pancake-cli on npm’s next channel (currently 0.0.1-rc.2). There is no stable release yet; Homebrew installation arrives with the first stable version. Node.js 22.14 or newer is required.

Install

Pin an exact version for automation. To update within the release-candidate channel, rerun the install command.

Log in

The CLI prints a short code and opens the Dashboard sign-in page. Check that the page shows the same code and the account you expect, then click Authorize CLI. Only approve a login you started yourself — the authorization expires after 15 minutes. Browser login starts in Test. Switch environments explicitly; the CLI verifies access before saving the selection:
Browser sessions cover day-to-day business operations in Test and Production within your existing merchant and store permissions. They cannot manage API Keys, payout or bank details, other devices, or read webhook secret fields. Active CLI sessions are listed under Dashboard → Settings → Security; pancake logout revokes the session on the server and clears local credentials.

API Key login

For CI and unattended scripts, log in with a Merchant ID and the RSA private key from Dashboard → API & Development → API Keys:
Use pancake login --key-login for a hidden interactive prompt. The CLI stores only the key’s absolute path. The Test or Production environment is determined by which key you use — env is not available for API Key sessions. Automation can inject credentials through environment variables instead of a saved login: set WAFFO_MERCHANT_ID plus exactly one of WAFFO_PRIVATE_KEY_FILE or WAFFO_PRIVATE_KEY. A complete pair overrides the saved login; a partial pair fails. Configuration lives in ~/.waffo-pancake/config.json (%USERPROFILE%\.waffo-pancake\config.json on Windows). Set WAFFO_CONFIG_DIR to use another directory.

Everyday commands

Every command accepts --json for a single machine-readable envelope; piped output switches to JSON automatically. A few examples:
Lists return one page at a time (--limit, --offset); filters go in a JSON file via --file.

Writing data safely

Writes follow the same pattern: describe the input in a JSON file, preview it offline, then execute with an explicit confirmation.
1

Read the input contract

schema prints the fields, flags, output protocol and an example for any command. Monetary amounts are decimal strings such as "19.99".
2

Preview with --dry-run

product.json
A dry run validates locally: no credentials, no network, no operation record.
3

Execute with --yes

Pass your own --idempotency-key so a retried script never creates duplicates. The CLI sends each write exactly once and records it locally; operations show <id> shows what happened.

Confirmation flags

products update replaces the whole price table. To change one currency, include every currency you want to keep. Omit prices entirely to leave prices untouched.

Outcomes

Exit codes: 0 success, 1 execution or verification failure, 2 input or configuration error, 130 interrupted.

Forward webhooks to localhost

Test your webhook handler without a public URL. After browser login:
listen opens a temporary session and forwards each event with its original body, X-Waffo-Signature and X-Waffo-Event headers, so your handler verifies signatures exactly as in production — see Webhooks. It always starts in Test; add --live to listen in Production. A 2xx from your handler acknowledges delivery; other responses retry up to three times. Ctrl+C cleans up the session, and nothing is changed on your configured webhooks.

Using the CLI with AI agents

The CLI is designed to be driven by coding agents such as Claude Code, Codex or Cursor:
  • pancake commands --json lists every command; pancake schema <command.id> --json returns its input contract. Agents never have to guess flags.
  • --dry-run lets an agent validate a plan before anything touches your account, and --yes keeps the decision to write with you.
  • --no-interactive fails fast on missing input instead of prompting.
  • The package ships a SKILL.md agent reference — read it on jsDelivr.
Prefer a one-line setup? The Dashboard’s API & Development → AI tab gives you a prompt that installs the Pancake Skill or the CLI for your store.

Limits of the release candidate

  • Webhook add / update / remove work on Test webhooks only.
  • sessions create requires API Key login.
  • listen requires browser login and cannot trigger synthetic events.
  • There is no orders get, subscriptions get or group read command; use graphql query for anything not covered.
  • Product writes reject taxIncluded — prices are always tax-exclusive.

Reference

Usage guide

Full walkthrough of every command, shipped with the package.

API coverage matrix

Which command calls which endpoint, with its verification mode.

Source on GitHub

MIT-licensed. Issues and contributions welcome.

Merchant API reference

The REST actions and GraphQL the CLI is built on.