adding-a-command

Official

Scaffold a new CLI command with telemetry.

Authorcaliber-ai-org
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Automates creation of a new CLI command following the Commander.js pattern.

Core Features & Use Cases

  • Commands MUST be registered in src/cli.ts using .command() and .action() with the tracked() wrapper for telemetry.
  • Command file MUST be in src/commands/{commandName}.ts and export a default async function with the signature: async (options: any, ctx: CLIContext) => Promise<void>.
  • Always use tracked(commandName, ...) in src/cli.ts to enable telemetry tracking.
  • Test file MUST be in src/commands/tests/{commandName}.test.ts with at least one happy-path test.

Quick Start

Create a new command file in src/commands/{commandName}.ts, register it in src/cli.ts with tracked('commandName', handler), and add a test file at src/commands/tests/{commandName}.test.ts to cover the happy path.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: adding-a-command
Download link: https://github.com/caliber-ai-org/ai-setup/archive/main.zip#adding-a-command

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.