codecanon
Version:
CLI tool that downloads documentation from 3rd party libraries, converts them to Markdown, and optimizes for LLMs
24 lines (23 loc) • 1.01 kB
JavaScript
import { Command } from "commander";
const program = new Command();
program
.name("codecanon")
.description("CLI tool that downloads documentation from 3rd party libraries, converts them to Markdown, and optimizes for LLMs")
.version("0.0.1");
program
.command("pull")
.description("Download and convert documentation from a library")
.argument("<library>", "Library name (e.g., react, express)")
.option("-s, --source <source>", "Documentation source (npm, github, docs)", "npm")
.option("-o, --output <dir>", "Output directory", "./docs")
.option("--format <format>", "Output format", "markdown")
.action(async (library, options) => {
console.log(`Pulling documentation for: ${library}`);
console.log(`Source: ${options.source}`);
console.log(`Output: ${options.output}`);
console.log(`Format: ${options.format}`);
// TODO: Implement pull functionality
console.log("Pull functionality not yet implemented");
});
program.parse();