tpmjs/packages/tools/create-basic-tools/src/index.ts
Ajax Davis ada3ffb341 refactor: rename exportName to name across entire codebase
- Database: Migrate column export_name to name in tools table
- Prisma schema: Update Tool model to use name field
- Sync routes: Update keyword and changes sync to use name
- Railway executor: Update API endpoints to use name parameter
- API routes: Update all tool routes to use name field
- Web app: Update all pages and components
- Playground: Update tool loader and sidebar
- create-basic-tools: Update types and generators
- Scripts: Update sync and test scripts

Database migration was done via direct SQL:
  ALTER TABLE tools RENAME COLUMN export_name TO name;

The unique constraint remains on (package_id, name).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-17 17:19:21 +10:00

28 lines
1 KiB
TypeScript

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: "name: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();