Commet
  • Pricing
Log InTry out
Introduction

Quickstart

Learn

Resources

SDK ReferenceError HandlingTestingCLI

Plugins

Better Auth
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

CLI

Install and use the Commet CLI to generate TypeScript types from your dashboard.

Generate TypeScript types from your Commet dashboard for autocomplete in your code. Requires Node.js 18+.

Install

pnpm add -g commet
npm install -g commet
yarn global add commet

Setup

commet login     # Authenticate in browser
commet link      # Link project to organization
commet pull      # Generate TypeScript types

After running commet pull, your SDK calls get autocomplete:

await commet.usage.track({
  customerId: 'user_123',
  feature: 'api_calls', // autocomplete
})

await commet.subscriptions.create({
  customerId: 'user_123',
  planCode: 'pro', // autocomplete
})

Commands

CommandDescription
commet loginAuthenticate with Commet (opens browser)
commet logoutRemove credentials
commet whoamiShow auth status and current organization
commet linkLink project to an organization
commet unlinkUnlink project
commet switchSwitch to a different organization
commet infoShow project and auth status
commet pullGenerate .commet/types.d.ts
commet list featuresList features
commet list seatsList seat types
commet list plansList plans

Configuration files

FileCreated byPurpose
~/.commet/auth.jsoncommet loginGlobal auth credentials
.commetcommet linkProject organization settings
.commet/types.d.tscommet pullGenerated TypeScript types

Commit .commet/types.d.ts for consistent types across the team.

Switch organizations

Sandbox and live organizations share the same login and dashboard. Use commet switch to pick which organization the CLI operates on — every org shows its mode (live or sandbox) next to its name.

commet switch    # Pick a different organization
commet link      # Re-link the project if needed

Update

pnpm update -g commet
npm update -g commet
yarn global upgrade commet

How is this guide?

Testing

Test safely with sandbox environment

Better Auth

Better Auth Plugin for Billing and Subscriptions using Commet

On this page

Install
Setup
Commands
Configuration files
Switch organizations
Update