UNPKG

cdp-wallet-onramp-kit

Version:

Complete toolkit for Coinbase Developer Platform (CDP) Embedded Wallets and Onramp integration with reusable components, utilities, and documentation

45 lines (39 loc) 1.33 kB
#!/usr/bin/env node const { Command } = require('commander'); const { initProject } = require('../dist/commands/init-project'); const { setupDocs } = require('../dist/commands/setup-docs'); const chalk = require('chalk'); const program = new Command(); program .name('cdp-wallet-onramp') .description('CDP Wallet & Onramp toolkit') .version('1.0.1'); program .command('setup') .description('Set up documentation and templates') .option('-d, --dir <directory>', 'Target directory', './doc') .option('-f, --force', 'Overwrite existing files') .action(async (options) => { try { await setupDocs(options); console.log(chalk.green('✅ CDP documentation setup complete!')); } catch (error) { console.error(chalk.red('❌ Setup failed:'), error); process.exit(1); } }); program .command('init') .description('Initialize new project with CDP integration') .option('-t, --template <template>', 'Template type', 'basic') .option('-d, --dir <directory>', 'Target directory', '.') .action(async (options) => { try { await initProject(options); console.log(chalk.green('✅ CDP project initialized!')); } catch (error) { console.error(chalk.red('❌ Initialization failed:'), error); process.exit(1); } }); program.parse(process.argv);