- Interactive CLI generator for scaffolding TPMJS tool packages - Generates packages with minimum 2 tools (ideally 2-3) - Zod 4 schemas - uses Zod directly (not jsonSchema wrapper) - One file per tool in src/tools/<toolName>.ts - TPMJS validated against official schemas from @tpmjs/types - Complete package generation ready to publish to npm - Works both standalone and in monorepo packages/ folders 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
30 lines
1 KiB
JavaScript
30 lines
1 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
import { Command } from 'commander';
|
|
import { runInteractiveCLI } from './cli.js';
|
|
|
|
const program = new Command();
|
|
|
|
program
|
|
.name('create-basic-tools')
|
|
.description('CLI generator for scaffolding production-ready TPMJS tool packages')
|
|
.version('0.0.1')
|
|
.option('--name <name>', 'Package name (e.g., @myorg/content-tools)')
|
|
.option('--description <description>', 'Package description')
|
|
.option('--category <category>', 'Tool category')
|
|
.option('--tool <tool...>', 'Tool definition (format: "exportName:description")')
|
|
.option('--output <path>', 'Output path')
|
|
.option('--yes', 'Skip confirmation prompt')
|
|
.action(async (options) => {
|
|
// For now, only support interactive mode
|
|
// CLI flags mode can be added later
|
|
if (options.name || options.description || options.category || options.tool) {
|
|
console.log('CLI flags mode is not yet implemented.');
|
|
console.log('Please run without flags for interactive mode.');
|
|
process.exit(1);
|
|
}
|
|
|
|
await runInteractiveCLI();
|
|
});
|
|
|
|
program.parse();
|