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 commetnpm install -g commetyarn global add commetSetup
commet login # Authenticate in browser
commet link # Link project to organization
commet pull # Generate TypeScript typesAfter 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
| Command | Description |
|---|---|
commet login | Authenticate with Commet (opens browser) |
commet logout | Remove credentials |
commet whoami | Show auth status and current organization |
commet link | Link project to an organization |
commet unlink | Unlink project |
commet switch | Switch to a different organization |
commet info | Show project and auth status |
commet pull | Generate .commet/types.d.ts |
commet list features | List features |
commet list seats | List seat types |
commet list plans | List plans |
Configuration files
| File | Created by | Purpose |
|---|---|---|
~/.commet/auth.json | commet login | Global auth credentials |
.commet | commet link | Project organization settings |
.commet/types.d.ts | commet pull | Generated TypeScript types |
Commit .commet/types.d.ts for consistent types across the team.
Switch environments
Two isolated environments: Sandbox (sandbox.commet.co) and Production (commet.co).
commet logout
commet login # Select different environment
commet linkUpdate
pnpm update -g commetnpm update -g commetyarn global upgrade commetHow is this guide?