UNPKG

claude-code-checkpoint

Version:

Automatic project snapshots for Claude Code - never lose your work again

41 lines (34 loc) 1.03 kB
#!/usr/bin/env node import { program } from 'commander'; import chalk from 'chalk'; import { setupWizard } from '../src/setup/wizard.js'; import { uninstall } from '../src/setup/installer.js'; import { readFileSync } from 'fs'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8')); const version = packageJson.version; program .name('claude-checkpoint') .description('Automatic project snapshots for Claude Code') .version(version); program .command('setup') .description('Run the interactive setup wizard') .action(async () => { await setupWizard(); }); program .command('uninstall') .description('Remove checkpoint system') .action(async () => { await uninstall(); }); // Default action - run setup program .action(async () => { await setupWizard(); }); program.parse(process.argv);