Skip to main content
The official command-line tool for Commet. Manage billing, forward webhooks, and automate your workflow from the terminal.

Install

Requires Node.js 18+.

Authentication

commet login Authenticate via browser. Opens a device-code flow and stores your token at ~/.commet/auth.json.
In CI, set COMMET_API_KEY as an environment variable instead. The CLI uses two kinds of credentials, depending on the command: Resource commands never fall back to your commet login credentials — without an API key from the environment or a linked project, they fail and point you to commet link.

Setup

commet agents setup Prepare an existing repository for coding agents. The command preserves the rest of AGENTS.md and manages only its own delimited block, so it is safe to run again or remove later.
Use --check --output agent in automated workflows to verify that the managed instructions are current without rewriting the file. commet doctor Check the installed SDK, project configuration, agent instructions, and local environment before asking an agent to implement billing. Doctor is read-only: it does not contact Commet, modify files, or print secret values.
The agent output is compact and machine-readable enough to paste into an implementation task. For version-specific SDK guidance, start at node_modules/@commet/node/docs/README.md. commet link Link this project to a Commet organization. Re-run to switch organizations.
commet pull Fetch your billing config and generate commet.config.ts with typed features and plans.
After commet pull, your SDK calls get autocomplete for plan codes and feature codes. commet push Push your local commet.config.ts to Commet. Creates or updates features and plans to match your config.
Feature type changes (boolean to usage, etc.) are blocked via push. Change them in the dashboard.
commet create Scaffold a new Commet project from a template. Creates plans and features in your sandbox organization, generates an API key, and links the project.
commet listen Forward webhook events from Commet to your local server. No ngrok or external tunneling needed.
The argument accepts a port, host:port, or full URL:
Filter by event type:
The session stays open until Ctrl+C. Events are signed with the displayed secret.

Customers

Create and manage customers, retrieve details, and handle batch operations. commet customers create Create a customer.

Subscriptions

Create, cancel, and manage subscriptions. Change plans, activate addons, and handle balance operations. commet subscriptions create Create a subscription for a customer.
commet subscriptions cancel Cancel a subscription. Cancels at period end by default.

Plans

Create plans, attach features and prices, and configure regional pricing. commet plans create Create a plan.
commet plans add-feature Add a feature to a plan with pricing and limits.
commet plans add-price Add a price to a plan.
Create a selectable variant that changes only Argentina and inherits the rest of the base price:

Regional prices

Set local currency overrides for a price.

Features

Manage the organization’s feature catalog. commet features create Create a feature.

Feature Access

Check a customer’s feature access and usage.
Use commet usage check --customer-id user_123 --feature-code api_calls --quantity 1 for a prospective consumption decision.

Seats

Manage seat allocations for per-seat billing. commet seats add Add seats for a customer.

Usage

Track consumption events and check remaining allowance. commet usage track Track a usage event. Supports value-based tracking and AI model token tracking.

Addons

Create and manage purchasable feature extensions. commet addons create Create an addon.

Credit Packs

Create and manage credit packs for credit-based plans.

Plan Groups

Organize plans into groups for pricing tables and the customer portal.

Invoices

List invoices, download PDFs, and create adjustments. commet invoices create-adjustment Create an adjustment invoice. Use a negative amount for credits.

Payments

Create hosted payment links and charge saved payment methods. One-time payments, no subscription or plan required. See Accept One-Time Payments for the full lifecycle. commet payments create Create a hosted payment link. The customer opens the returned url and pays with any card.

Transactions

List transactions, process refunds, and retry failed payments.

Offers

Create reusable Offers independently from plans and distribution channels.
percentage uses basis points, so 2500 means 25%. Other phase types are free_trial, amount_off, and fixed_price.
An Offer does not contain purpose or plan-price associations. Attach a compatible Offer to a base price in the Dashboard for automatic introductory selection, pass its ID directly as offerId, or reference a single-discount Offer from a Promo Code.

Promo Codes

Create and manage customer-entered distribution codes for Offers. commet promo-codes create Create a promo code.

Markets

Define reusable country groups, then reference them from --market-prices when creating or updating plan prices.

Webhooks

Create and test webhook endpoints. commet webhooks create Create a webhook endpoint.
For local development, use commet listen instead of creating a webhook endpoint.

Provisioning

Issue a fresh claim link for a headlessly provisioned organization that has not been claimed yet. The command uses that organization’s API key; it cannot issue a link after a human has claimed the organization.
Use the same idempotency key when retrying the same request. Give the returned URL to the intended human owner; do not publish it or store it in source control.

API Keys

Create and manage API keys.

Portal

Generate a portal URL for customer self-service.
Provide either --customer-id or --email.

Payouts

Manage payout bank accounts and request payouts. Payout commands require a live organization API key; sandbox keys return payouts_not_available_in_sandbox. commet payouts request Request a payout of available balance.
commet payouts add-bank-account Add a destination bank account to the payout account.

Test Clock

Control the sandbox test clock to simulate the passage of time.
Sandbox only. Test clock commands fail against live organizations.
commet test-clock advance Move the test clock forward and process every billing deadline due before the target time.
The former commet test-clock process-billing command is deprecated. advance now starts billing processing automatically.

Quota

Manage quota allowances for quota-based features. commet quota add Add to a customer’s quota allowance for a feature.

Global Options

These flags work on every command: Use --output agent for structured JSON output in scripts and CI pipelines:

CI/CD

Set COMMET_API_KEY as an environment variable. No commet login needed.
.github/workflows/billing.yml
.github/workflows/subscription.yml

Configuration Files

Run commet <command> --help for the full list of flags and options on any command.