Files
ui-ux-pro-max-skill/cli/src/index.ts
Viet Tran 17d8ce53d4 feat: bundle skill assets in npm package (#12)
- Add assets folder with all skill files (.claude, .cursor, .windsurf, .agent, .shared)
- Simplify init command to copy from bundled assets instead of GitHub download
- Remove --version option (version tied to npm package)
- No more GitHub API rate limits
- Works offline
- Bump to v1.1.0

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 10:50:17 +07:00

55 lines
1.6 KiB
JavaScript

#!/usr/bin/env node
import { Command } from 'commander';
import { initCommand } from './commands/init.js';
import { versionsCommand } from './commands/versions.js';
import { updateCommand } from './commands/update.js';
import type { AIType } from './types/index.js';
import { AI_TYPES } from './types/index.js';
const program = new Command();
program
.name('uipro')
.description('CLI to install UI/UX Pro Max skill for AI coding assistants')
.version('1.1.0');
program
.command('init')
.description('Install UI/UX Pro Max skill to current project')
.option('-a, --ai <type>', `AI assistant type (${AI_TYPES.join(', ')})`)
.option('-f, --force', 'Overwrite existing files')
.action(async (options) => {
if (options.ai && !AI_TYPES.includes(options.ai)) {
console.error(`Invalid AI type: ${options.ai}`);
console.error(`Valid types: ${AI_TYPES.join(', ')}`);
process.exit(1);
}
await initCommand({
ai: options.ai as AIType | undefined,
force: options.force,
});
});
program
.command('versions')
.description('List available versions')
.action(versionsCommand);
program
.command('update')
.description('Update UI/UX Pro Max to latest version')
.option('-a, --ai <type>', `AI assistant type (${AI_TYPES.join(', ')})`)
.action(async (options) => {
if (options.ai && !AI_TYPES.includes(options.ai)) {
console.error(`Invalid AI type: ${options.ai}`);
console.error(`Valid types: ${AI_TYPES.join(', ')}`);
process.exit(1);
}
await updateCommand({
ai: options.ai as AIType | undefined,
});
});
program.parse();