-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
executable file
·46 lines (35 loc) · 1.31 KB
/
index.ts
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
#!/usr/bin/env node
import { Command } from 'commander'
import { injectAuthCommand } from './commands/auth';
import { injectSchemaCommand } from './commands/schema';
import { injectUsersCommand } from './commands/users';
import { colors } from './utils';
import { injectFriendly } from './commands/friendly';
const figlet = require('figlet');
console.log( colors.yellow.bold(figlet.textSync('ACM-CLI', { horizontalLayout: 'full' })) );
console.log(colors.green.bold('Welcome to ACM CLI! - for manipulating website data'));
const program = new Command();
program
.name('acm-cli')
.description('ACM CLI for manipulating website data')
.version('0.1.0');
// Auth Command group
const auth = program
.command('auth')
.description('Commands for manage auth');
injectAuthCommand(auth);
// Schemas command group
const schema = program
.command('schema')
.description('Commands for manage schemas/data');
injectSchemaCommand(schema);
const users = program
.command('users')
.description('[SUPER USER ONLY] Commands for manage allowed users to use this CLI');
injectUsersCommand(users);
// Friendly UI
program
.command('friendly')
.description('Friendly UI for the CLI')
.action(injectFriendly);
program.parseAsync();