Skip to main content
Docs navigation

CLI (nwp)

Drive your NextWave site from the terminal. One binary, every resource, machine-readable output.

The nwp command-line tool talks to your own WordPress site over the nwp/v1 REST API. Every operation runs as the connected user and is gated by that user's WordPress capabilities — there is no central key.

Install

Run it on demand with npx — no global install required:

bash
$ npx @island-pitch/nextwave-cli <command>

Or install it globally so the bare nwp binary is on your PATH:

bash
$ npm i -g @island-pitch/nextwave-cli

Connect

The CLI reads three environment variables — your site URL, the WordPress username, and that user's Application Password. Export them once per shell:

bash
export WORDPRESS_SITE_URL=https://members.example.com
export WORDPRESS_USERNAME=jane@example.com
export WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx"

Prefer not to manage env vars by hand? Run nwp configure to write a saved connection, nwp doctor to verify connectivity and surface misconfiguration, and nwp whoami to confirm which user you're authenticated as.

Commands

Every command follows the same shape: nwp <resource> <action> — for example nwp members list or nwp benefits create. The resource groups map one-to-one onto the REST surface:

GroupWhat it manages
membersMembership records — create, list, update, renew, and expire members.
tiersMembership tiers, pricing, and duration/lifetime configuration.
benefitsBenefit definitions and their assignment to tiers.
venuesVenues where benefits are redeemed and check-ins occur.
redemptionsBenefit redemption records and usage tracking.
nfc-cardsNFC card provisioning and member linkage.
campaignsQR and marketing campaigns.
event-signupsEvent sign-up submissions.
signup-listsSign-up list definitions that collect submissions.
landing-pagesCampaign and sign-up landing pages.
renewal-configRenewal reminder automation settings.
renewal-logsA history of sent renewal reminders.
emceeThe live Emcee Controller experience state.
wyrWould You Rather experience content and rounds.
caption-clashCaption Clash experience content and rounds.
ask-speakerAsk the Speaker audience questions.
settingsPlugin-wide settings.
feature-flagsLicense-gated feature registry state.
licenseLicense status and activation.
systemSystem info and health checks.
cronScheduled task status and manual triggers.
provisionFirst-run provisioning and seed operations.

Machine-readable output

Add --output json (alias --json) to any command to get a stable JSON envelope instead of a formatted table — ideal for scripts and agents. Use --output table for the human-readable default.

bash
$ nwp members list --output json

Successful calls return a { success: true, data } envelope. Failures return the same envelope with success: false and a structured error, so you can branch on the error code rather than parsing prose:

json
{
  "success": false,
  "error": {
    "code": "rest_forbidden",
    "message": "You are not allowed to manage members.",
    "status": 403
  }
}

Exit codes

The process exit code mirrors the outcome so scripts can react without parsing output:

ExitMeaning
0Success.
1Unexpected crash or transport failure (network, DNS, TLS).
2Not found (HTTP 404) — the resource or route does not exist.
3Forbidden, validation error, or a disabled feature (HTTP 403).
4Unauthenticated (HTTP 401) — credentials missing or rejected.

Stuck on an exit code or auth error? See Troubleshooting. For common multi-step workflows, see Recipes.

Self-hosted

Every nwp command targets the site in WORDPRESS_SITE_URL — your own WordPress install, not a shared NextWave host. Your data never leaves your infrastructure.