Monorepo for generating usage spec from CLI framework metadata.
| Package | Description |
|---|---|
@usage-spec/core |
Shared Spec types, KDL/JSON rendering via @bgotink/kdl |
@usage-spec/commander |
Commander.js integration |
@usage-spec/yargs |
yargs integration |
@usage-spec/oclif |
oclif integration |
Each adapter package provides the same API surface:
import { generate, generateKDL, generateJSON, convertRoot } from "@usage-spec/<adapter>";
// Generate KDL spec
const kdl = generate(frameworkInstance);
// Generate JSON spec
const json = generateJSON(frameworkInstance);
// Get Spec object for custom processing
const spec = convertRoot(frameworkInstance);Pipe KDL output to the usage CLI for completions, docs, and man pages:
mycli --usage-spec | usage generate completion bashaube install -r # Install dependencies
aube run build -r # Build all packages
aube run test -r # Run all testsMIT