Describe
Turn real command definitions into an OpenCLI document with a framework integration.
Learn more →Use built-in integrations for yargs, Commander.js, and oclif to generate an OpenCLI document from the command definitions you already maintain.
Explore the frameworks →import { Command } from 'commander';
import { createDocgenCommand, fromCommander } from '@clidoc/commander';
import { infoFromPackageJson } from '@clidoc/core';
const info = infoFromPackageJson(pkg);
const program = new Command(info.binary);
// ...register your commands...
const document = () => fromCommander(program, info);
program.addCommand(createDocgenCommand(document));
program.parse();Publishing plugins generate command pages for Docusaurus and VitePress. You can also render Markdown for other documentation sites.
Explore publishing plugins →// docusaurus.config.js
const clidocPlugin = require('@clidoc/docusaurus');
module.exports = {
plugins: [[clidocPlugin, { input: 'cli.json', outputDir: 'docs/generated-cli', basePath: '/cli' }]],
};Give your CLI a docgen command with a framework integration, then validate its OpenCLI document with clidoc.
Read the CLI guide →$ npm install -g @clidoc/cli
$ mycli docgen --output cli.json
$ clidoc validate cli.jsonTurn real command definitions into an OpenCLI document with a framework integration.
Learn more →Validate a JSON or YAML document against the OpenCLI specification.
Learn more →Generate command pages for Docusaurus, VitePress, or Markdown.
Learn more →