Skip to main content

What is the Affonso CLI?

The Affonso CLI (@affonso/cli) is a command-line interface for the Affonso affiliate marketing platform. It gives you full control over affiliates, referrals, commissions, payouts, and program settings — directly from your terminal.
Every command supports --json output, making the CLI a perfect tool for AI agents that need to parse responses and chain commands together.

Who is it for?

Developers

Manage your affiliate program without leaving the terminal — list affiliates, approve applications, track commissions, and configure settings.

AI Agents

Agents like OpenClaw, Paperclip, Claude, and GPT can use shell tools to build automated affiliate workflows with structured JSON output.

Installation

npm install -g @affonso/cli
Or run directly without installing:
npx @affonso/cli <command>
Verify the installation:
affonso --version

Quick start

1

Authenticate

Log in with your Affonso account via OAuth:
affonso login
This opens your browser for secure authentication via OAuth 2.1 with PKCE. Tokens are stored locally in ~/.config/affonso/auth.json.
2

Verify your session

affonso whoami
3

Start managing affiliates

affonso affiliates list
affonso commissions list --status pending
affonso payouts list

Next steps

Authentication

Set up OAuth login or API key authentication

Commands

Full reference for all available commands

AI Agents

Use the CLI as a tool for AI agents