.command("build [configPath]", "Build project", (yarg) => { return yarg .positional("configPath", { type: "string", default: process.cwd(),
'Upload and publish a tflite model', (yargs) => { yargs.positional('model_file', { describe: 'Path to a tflite model', type: 'string' }); yargs.positional('name', { describe: 'Display name for the model', type: 'string' "Update one of your project's models", (yargs) => { yargs.positional('model_id', { describe: 'The ID of the model you want to update', type: 'number' "Delete a model from your project", (yargs) => { yargs.positional('model_id', { describe: 'The ID of the model you want to delete', type: 'number'
require('yargs') .command('$0 <input> [output]', 'Obfuscate <input> ASAR file', (yargs) => { yargs .positional('input', { describe: 'input ASAR file to be obfuscated', demandOption: true, }) .option('output', { alias: 'o', description: 'output ASAR file', default: null }) })
require('yargs') .command('* <file-path>', 'parse and convert the input file', (yargs) => { yargs.positional('file-path', { describe: 'the input USFM or JSON file to be parsed and converted', }); }) .alias('l', 'level') .describe('l', 'specify the level of strictness in parsing') .choices('l', ['relaxed']) .describe('filter', 'filters out only the specific contents from input USFM') .choices('filter', ['scripture']) .describe('format', 'specifies the output file format') .choices('format', ['csv', 'tsv', 'usfm', 'json']) .alias('o', 'output') .describe('o', 'specify the fully qualified file path for output.') .alias('h', 'help') .alias('v', 'version') .help('help')
yargs .usage('git cactus <command>') .demandCommand(1, 'You need to provide a cactus command') .command('cut [level]', 'cuts a release branch from origin/master', (yargs) => { yargs .positional('level', { choices: ['major', 'minor'], default: 'minor', describe: 'The level of the release' }); }, wrap(cactus.cutReleaseBranch)) .command('tag', 'tags a version on a release branch', () => {}, wrap(cactus.tagVersion)) .group(['upstream'], 'Git Options:') .option('upstream', { default: 'origin', describe: 'Upstream remote name'}) .example('git cactus cut', 'Cuts a new release branch (minor)') .example('git cactus tag', 'Tags a new version (patch)')
yarg.command('save [name]', 'saves previous scan permanently', (yargs) => { yargs.positional('name', { type: 'string', describe: 'name of the file in which your scan will be saved' }) }, function(argv) { if(!argv) { console.log(`${logSymbols.warning} ${chalk.yellow('Please enter the name for the file of the scan you want to save')}`); } fs.access('data/temporary.json', fs.F_OK, (err) => { if (err) throw err; fs.readFile('data/temporary.json', 'utf8', (err1, data) => { if (err1) throw err1; let realdata = JSON.parse(data); for(let i = 0; i < realdata.array.length; i++) { fs.writeFile(`data/${argv.name}.json`, realdata.array[i], (err2) => { if (err2) throw err2; console.log(`${chalk.blue('Your scan has been permanently saved in file:')} ${chalk.green(`${argv.name}.json`)}`) }); } }); }) });
cli .command( 'init [<template-name>]', 'Scaffold a Basys project using a starter template', yargs => { yargs.positional('template-name', { type: 'string', describe: 'username/repo from GitHub or local directory', }); }, ) .command('help [<command>]', 'Show help for basys-cli', yargs => { yargs.positional('command', {type: 'string'}); }) .help()
cli .command('dev [<app-name>]', 'Start a development server', yargs => { yargs.positional('app-name', {type: 'string'}); yargs.option('b', {describe: 'Disable the app builder'}); }) .command('build [<app-name>]', 'Build the app for production', yargs => { yargs.positional('app-name', {type: 'string'}); }) .command('start [<app-name>]', 'Serve a production bundle', yargs => { yargs.positional('app-name', {type: 'string'}); }) .command('test:unit', 'Run unit tests') .command('test:e2e [<app-name>]', 'Run end-to-end tests', yargs => { yargs.positional('app-name', {type: 'string'}); }) .command('lint', 'Lint the project code') .command('lint:fix', 'Lint the project code and apply fixes')
yarg.command('open [file]', 'opens save file and returns data in the terminal', (yargs) => { yargs.positional('file', { type: 'string', describe: 'file to open' }) }, function(argv) { if(!argv) { console.log(`${logSymbols.warning} ${chalk.yellow('Please enter the name of the file you want to open')}`); } fs.access(`data/${argv.file}`, fs.F_OK, (err) => { if (err) throw err; fs.readFile(`data/${argv.file}`, 'utf8', (err1, data) => { if(err1) throw err1; let realdata = JSON.parse(data); for(let i = 0; i < realdata.array.length; i++) { let selected = realdata.array[i]; console.log(`${chalk.blue('ip:')} ${chalk.green(selected.ip)} ${chalk.blue('port:')} ${chalk.green(selected.port)} ${chalk.blue('success:')} ${selected.success == true ? chalk.green(selected.success) : chalk.red(selected.success)}`); } }) }); });
yargs .usage('$0 <target>', 'Run the tunnel server', yargs => { yargs.positional('target', { describe: 'The URL to which proxy the requests to', type: 'string'
yargs => { yargs .positional('password', { type: 'string', default: 'password', describe: 'the password text to hash', }) .positional('rounds', { type: 'number', default: 12, yargs => { yargs .positional('hash', { type: 'string', default: 'password', describe: 'the password text to hash', }) .positional('password', { type: 'string', describe: 'the hash of the password to compare',
'Upload and publish a tflite model', (yargs) => { yargs.positional('model_file', { describe: 'Path to a tflite model', type: 'string' }); yargs.positional('name', { describe: 'Display name for the model', type: 'string' "Update one of your project's models", (yargs) => { yargs.positional('model_id', { describe: 'The ID of the model you want to update', type: 'number' "Delete a model from your project", (yargs) => { yargs.positional('model_id', { describe: 'The ID of the model you want to delete', type: 'number'
cli .command( 'init [<template-name>]', 'Scaffold a Basys project using a starter template', yargs => { yargs.positional('template-name', { type: 'string', describe: 'username/repo from GitHub or local directory', }); }, ) .command('help [<command>]', 'Show help for basys-cli', yargs => { yargs.positional('command', {type: 'string'}); }) .help()
cli .command('dev [<app-name>]', 'Start a development server', yargs => { yargs.positional('app-name', {type: 'string'}); yargs.option('b', {describe: 'Disable the app builder'}); }) .command('build [<app-name>]', 'Build the app for production', yargs => { yargs.positional('app-name', {type: 'string'}); }) .command('start [<app-name>]', 'Serve a production bundle', yargs => { yargs.positional('app-name', {type: 'string'}); }) .command('test:unit', 'Run unit tests') .command('test:e2e [<app-name>]', 'Run end-to-end tests', yargs => { yargs.positional('app-name', {type: 'string'}); }) .command('lint', 'Lint the project code') .command('lint:fix', 'Lint the project code and apply fixes')