specdriven.sh
← All specs
CLI Tool·Starter

node-cli

TypeScript CLI scaffold with argument parsing, interactive prompts, and auto-generated docs.

0 stars0 installsby anthropicupdated Mar 5, 2026
StackNode.jsTypeScriptCommander.jsInk
Tags#cli#typescript#commander#ink#node
Installterminal
npx specdriven add spec node-cli

What's included

A TypeScript CLI scaffold built on Commander.js for argument parsing and Ink for rich terminal UI. The spec includes a plugin system so users can extend the CLI with additional commands without modifying the core. TypeDoc generates API documentation automatically from JSDoc comments.

Configuration is resolved from ~/.config/<tool>/config.json, environment variables, and explicit flags - in that priority order. A built-in config command lets users view and set their configuration interactively.

Getting started

Run npx specdriven add @specs/node-cli to scaffold. Install dependencies with pnpm install. Set the name and bin fields in package.json to match your tool name. Run pnpm build to compile TypeScript to dist/ and pnpm link to make the CLI available globally in your shell.

Run pnpm test to execute the Vitest suite. Tests cover command parsing, configuration resolution, and interactive prompt flows using Ink's test renderer. Run pnpm docs to generate HTML documentation from JSDoc annotations. The changelog-writer skill keeps CHANGELOG.md up to date as you cut releases.