forked from malcolmocean/opusfluxus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.js
64 lines (54 loc) · 1.99 KB
/
cli.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
const program = require('caporal');
var pjson = require('./package.json');
program
.version(pjson.version)
.option('-b, --bot-output', 'format output to use in telegram bot');
program
.command('tree [n]', 'print your workflowy nodes')
.argument('[n]', 'print up to depth n (default: 2', 2)
.option('-i, --id <id/alias>', 'print sub nodes under the <id> (default: whole tree)', '')
.option('-n, --withnote', 'print the note of nodes (default: false)', false)
.option('-c, --hiddencompleted', 'hide the completed lists (default: false)', false)
.option('-w, --withid', 'print id of nodes (default: false)', false)
.option(', ', '')
.action(function(args, options, logger){
const mode = options.setup_mode || 'normal';
env = env || 'all';
console.log('setup for %s env(s) with %s mode', env, mode);
});
program
.command('capture')
.description('add something to a particular node')
.option('-p, --parentid <id/alias>', '36-digit uuid of parent (required) or defined alias')
.option(', --name <str>', 'what to actually put on the node (required)')
.option(', --priority=<int>', '0 as first child, 1 as second (default 0 (top)), (use a number like 10000 for bottom)', 0)
.option(', --note=<str>', 'a note for the node (default "")', '')
.action(function(args, options, logger){
});
program
.command('alias add')
.description()
.option(', ', '')
.action(function(args, options, logger){
});
program
.command('')
.description()
.option(', ', '')
.action(function(env, options){
});
program
.command('exec <cmd>')
.alias('ex')
.description('execute the given remote cmd')
.option('-e, --exec_mode <mode>', 'Which exec mode to use')
.action(function(cmd, options){
console.log('exec "%s" using %s mode', cmd, options.exec_mode);
}).on('--help', function() {
console.log('');
console.log('Examples:');
console.log('');
console.log(' $ deploy exec sequential');
console.log(' $ deploy exec async');
});
program.parse(process.argv);