🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

affitor

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

affitor

CLI-native affiliate tracking. Connect Stripe, track commissions, manage partners — all from your terminal.

latest
Source
npmnpm
Version
0.4.1
Version published
Maintainers
1
Created
Source

affitor

CLI-native affiliate tracking. Connect Stripe, track commissions, manage partners -- all from your terminal.

Quick Start

# Create your affiliate program
npx affitor init

# Connect Stripe for automatic payment tracking
npx affitor setup stripe

# Check program health
npx affitor status

# Send test events
npx affitor test click
npx affitor test lead
npx affitor test sale

Commands

CommandDescription
affitor initCreate a new affiliate program. Interactive prompts or --no-interactive with flags.
affitor setup stripeConnect Stripe via OAuth. Auto-configures webhooks for payment tracking.
affitor setup dnsSet up DNS CNAME tracking (coming soon).
affitor statusShow program health: DNS, Stripe connection, recent events.
affitor test [type]Send a test event (click, lead, or sale).

Global Flags

FlagDescription
--jsonOutput as JSON (for AI agents and scripts)
--no-interactiveSkip all prompts, fail on missing values
--auto-confirmAuto-yes to confirmation prompts
--quietSuppress non-essential output
--api-key <key>Override API key from config
--api-url <url>Override API URL
--verboseDebug output

Non-Interactive Mode (for AI Agents)

npx affitor init \
  --name "My SaaS" \
  --domain "example.com" \
  --commission-type recurring_percent \
  --commission-rate 20 \
  --duration-months 12 \
  --cookie-duration 90 \
  --no-interactive \
  --json

What Gets Created

Running npx affitor init creates:

.affitor/
  config.json     -- program configuration
  .env.example    -- environment variables template
  skills.md       -- AI agent instructions

Stripe Auto-Connect

npx affitor setup stripe automates the entire Stripe integration:

  • Opens Stripe Connect OAuth in your browser
  • Creates webhook endpoint on your Stripe account
  • Configures event listeners for:
    • customer.created -- lead tracking
    • checkout.session.completed -- sale tracking
    • invoice.paid -- recurring commissions
    • invoice.payment_failed -- failed payment alerts
    • charge.refunded -- automatic commission clawback
    • customer.subscription.deleted -- churn tracking

Requirements

  • Node.js >= 18
  • Stripe account (for setup stripe)

License

MIT

Keywords

affiliate

FAQs

Package last updated on 15 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts