मुख्य सामग्री पर जाएं
Manage your Dodo Payments resources, run AI-powered queries against your account, create checkout sessions, and test webhooks — all from the terminal. The CLI ships with an interactive TUI, a built-in AI assistant powered by MCP, and offline webhook testing.

Features

  • Interactive TUI — launch dodo with no arguments to open the full interactive interface with command palette, history, and live notifications.
  • AI assistant built in — ask questions or take actions in plain English with /ai. No extra setup, runs dodopayments-mcp locally.
  • Secure by default — API keys are stored in your OS secret store (macOS Keychain, Windows Credential Vault, Linux libsecret). No plaintext config on disk.
  • Auto update — the CLI checks for new versions on startup and notifies you in-app. Run /update to upgrade in place.
  • Webhook tooling — listen for live webhooks or trigger payloads offline for local development.

Installation

Install the CLI in one line on macOS or Linux:

Install with npm or Bun

If you already have Node or Bun, the package-manager installs always pull the latest version:

Manual installation (no Node / Bun required)

If you’d rather not pipe a remote script to sh, download the binary yourself.
1

Download the binary

Download the binary for your platform from the latest GitHub Release.
2

Rename the binary to `dodo`

3

Move it to a directory on your PATH

On Windows, moving to C:\Windows\System32 requires administrator privileges.
4

(Optional) Verify the download

Each release publishes a SHA256SUMS.txt. Verify your download with:

Authentication

Before using authenticated commands, log in with your API key:
Or, from inside the interactive TUI:
The login flow will:
  1. Open your browser to the Dodo Payments API Keys page.
  2. Prompt you to paste your API Key.
  3. Ask you to select an environment — Test Mode or Live Mode.
  4. Store the credentials in your OS secret store (Keychain on macOS, Credential Vault on Windows, libsecret on Linux).
Because credentials are stored in the OS secret store, you may be prompted for your device password the first time the CLI reads or writes credentials. If you’re upgrading from an older version, any existing plaintext API key will be migrated to the secret store and the legacy file deleted automatically.

Switching modes and logging out

You can keep one Test Mode and one Live Mode key authenticated at the same time. To clear credentials:
The logout flow lets you choose between All accounts, Test Mode, or Live Mode independently.

Usage

You can use the CLI in two modes. Run dodo with no arguments to launch the full interactive interface:
Type / to open the command palette, or just start typing — anything that isn’t a slash command is sent to the AI assistant.

2. Direct subcommands

Run commands directly without entering the TUI:
For example:
The reference tables below show every command. In the TUI, prefix them with /; in direct mode, drop the /.

AI Assistant

Ask questions or take actions in natural language. The assistant uses dodopayments-mcp running locally — no additional setup or OAuth flow required, and your AI traffic doesn’t leave your machine except to talk to the model provider. Examples:
The assistant respects your active environment (Test / Live), so it only operates on data from the environment you’re currently logged into.

Project Scaffolding

dodo init scaffolds Dodo Payments billing routes directly into an existing project. It generates the boilerplate route files, installs the matching @dodopayments/* adapter package, and safely writes the DODO_PAYMENTS_* environment variables to your .env (it only appends variables that aren’t already present). The command runs without logging in.
For the Better-Auth scaffold you can pass a comma-separated list of plugins to generate (defaults to all): checkout, portal, usage, webhooks.
The scaffolder auto-detects a src/ directory and adjusts output paths accordingly, and auto-detects your package manager (bun, pnpm, yarn, or npm) to run the correct install command.

Command Reference

Products

Manage your product catalog.

Payments

View payment transactions.

Customers

Manage your customer base.

Discounts

Manage coupons and discounts.

Licenses

Manage software licenses.

Addons

Manage product addons.

Refunds

View refund information.

Checkout

Create hosted checkout sessions.

Webhooks

The CLI includes two powerful tools for testing webhooks during development: a listener that forwards live test webhooks to your local server, and a trigger that sends mock webhook payloads to any endpoint.

Listen for webhooks

Forward webhooks from Dodo Payments directly to your local development server in real time.
1

Enter your local endpoint URL

Provide the local URL where you want to receive webhooks (e.g., http://localhost:3000/webhook).
2

Automatic setup

The CLI automatically creates a webhook endpoint on your Dodo Payments account if one doesn’t already exist, then opens a WebSocket connection to receive events in real time.
3

Receive and forward

When a webhook event fires (from a test payment, subscription change, etc.), the CLI receives it, logs the event type, and forwards the full request with headers and body to your local endpoint. The response from your endpoint is logged and sent back.
dodo wh listen requires a Test Mode API key. Live Mode keys are not supported by the listen flow.
The listener preserves the original webhook headers (webhook-id, webhook-signature, webhook-timestamp) when forwarding to your local endpoint, so you can test your signature verification logic.

Trigger test webhooks

Send mock webhook payloads to any endpoint for quick testing without needing to create real transactions.
The /wh trigger flow guides you through:
  1. Setting a destination endpoint URL
  2. Selecting a specific event to trigger from an interactive menu
dodo wh trigger does not require login. It works as a local/offline webhook payload generator.
Triggered events are not signed. While testing, disable webhook signature verification on your endpoint — for example, use unsafe_unwrap() instead of unwrap() in your webhook handler during testing only.

Supported webhook events

Environment variables

Updates

The CLI checks for a newer version on startup and surfaces a notification in the status bar when one is available. To upgrade:
Or, re-run the installer to upgrade in place:

Resources

GitHub Repository

View source code and releases

npm Package

View on npm registry

Support

अंतिम संशोधन 26 जून 2026