UNPKG

edicek

Version:

CLI tool for exporting knowledge from Edicek to Markdown files

28 lines 1.28 kB
#!/usr/bin/env node "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); // @ts-ignore - JSON import works in build, ignore TS error const package_json_1 = require("../package.json"); const commander_1 = require("commander"); const chalk_1 = __importDefault(require("chalk")); const export_1 = require("./lib/commands/export"); const program = new commander_1.Command(); program.name('edicek').description('CLI tool for exporting knowledge from Edicek').version(package_json_1.version); program .command('export') .description('Export knowledge from Edicek workspace') .option('-t, --token <token>', 'Authentication token') .option('-o, --output <path>', 'Output directory', './.edicek') .option('-e, --endpoint <url>', 'GraphQL endpoint URL', 'https://my.edicek.com/api/graphql') .action(export_1.exportCommand); // Handle unknown commands program.on('command:*', () => { console.error(chalk_1.default.red(`Invalid command: ${program.args.join(' ')}`)); console.log('See --help for a list of available commands.'); process.exit(1); }); program.parse(); //# sourceMappingURL=cli.js.map