refkitnet
v0.1.0
Published
RefKit CLI for app owners and affiliates
Maintainers
Readme
refkitnet
Command-line interface for the RefKit affiliate platform. All operations call the RefKit REST API.
Install
npm install -g refkitnetOr run without installing:
npx refkitnet <command>Quick start
refkitnet auth login
refkitnet init
refkitnet statusThe CLI is an optional helper for JavaScript apps. Any backend can integrate directly through the manual REST API guide, or hand the work to a coding agent with the AI coding agent guide.
The dashboard can hand off a specific integration without extra selection prompts:
refkitnet init --app-id app_... --program-id prg_...Set REFKIT_API_URL to override the API base (default https://app.refkit.net).
Local CLI fixture
fixtures/react-app is a tracked customer application
used to exercise refkitnet init from outside the monorepo application. Build
the CLI, start the RefKit app, then run the CLI from the fixture directory:
cd C:\Dev\RefKit
npm run build:cli
npm run dev:app
cd packages\cli\fixtures\react-app
node ..\..\dist\index.js init --api-url http://localhost:3000 --app-id app_... --program-id prg_...The automated CLI test copies this fixture to a temporary directory and runs
the compiled CLI against a local mock REST server. It uses
--skip-sdk-install so tests do not access the npm registry; normal user setup
still installs the SDK by default.
Commands
| Command | Description |
| --- | --- |
| refkitnet auth login | Sign in via device authorization |
| refkitnet auth logout | Clear stored session |
| refkitnet init | Optional JavaScript setup wizard; installs the SDK and creates or reuses an app-scoped test key (--live for a live key) |
| refkitnet apps create | Create an app |
| refkitnet programs create | Create a program with commission rule (--recurring-duration-months) |
| refkitnet affiliates create | Create or invite an affiliate |
| refkitnet apps update | Change an app default program or Network visibility |
| refkitnet apps disconnect-stripe | Disconnect live Stripe before switching to API reporting |
| refkitnet network list | Browse listed programs in the RefKit Network |
| refkitnet network join | Join a listed program after accepting its current app agreement |
| refkitnet links list | List affiliate links |
| refkitnet links create | Create an affiliate link (--program-id, --link-code and/or --label, optional UTM fields) |
| refkitnet links delete | Delete an affiliate link (--program-id, --link-id; default link protected) |
| refkitnet apps agreement publish | Publish a new app affiliate agreement |
| refkitnet programs terms publish | Publish a new program terms version |
| refkitnet commissions list | List commission entries |
| refkitnet payouts ready | List affiliate payouts ready to pay |
| refkitnet payouts download | Download the current ready-to-pay CSV |
| refkitnet payouts pay-affiliate | Mark one affiliate payout paid |
| refkitnet payouts create | Create an internal payout batch (advanced) |
| refkitnet payouts resolve-item | Resolve an internal payout item (advanced) |
| refkitnet payouts mark-paid | Complete an internal payout batch (advanced) |
| refkitnet status | Show test-integration and production-readiness checklists for an app |
License
MIT
