feat: add uxpro-cli for easy skill installation (#4)
* feat: add uxpro-cli for easy skill installation - Add CLI tool (uxpro-cli) with commands: init, versions, update - Support multiple AI assistants: claude, cursor, windsurf, antigravity, all - Update README with CLI installation guide and usage examples - Add CC BY-NC 4.0 license - Update feature counts to accurate numbers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: rename CLI from uxpro to uipro - Package: uxpro-cli -> uipro-cli - Command: uxpro -> uipro 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
56
cli/src/index.ts
Normal file
56
cli/src/index.ts
Normal file
@@ -0,0 +1,56 @@
|
||||
#!/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.0.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('-v, --version <tag>', 'Specific version to install')
|
||||
.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,
|
||||
version: options.version,
|
||||
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();
|
||||
Reference in New Issue
Block a user