-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcodebolt.js
executable file
·56 lines (44 loc) · 1.47 KB
/
codebolt.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
#!/usr/bin/env node
const { program } = require('commander');
const { getVersion } = require('./actions/version');
const { uploadFolder } = require('./actions/uploadfolder');
const inquirer = require('inquirer');
const {signIn,logout} = require('./actions/login')
// const { login } = require('./actions/login');
const { list } = require('./actions/list');
const {startAgent} = require('./actions/startAgent')
const { createagent } = require('./actions/createagent');
program.version('1.0.1');
program
.command('version')
.description('Check the application version')
.action(getVersion);
program
.command('createagent')
.description('Create a new Codebolt Agent')
.option('-n, --name <name>', 'name of the project')
.option('--quick', 'create agent quickly with default settings')
.action((options) => {
createagent(options);
});
program
.command('login')
.description('Log in to the application')
.action(signIn);
program
.command('logout')
.description('Log out of the application') // Added for logout
.action(logout); // Added for logout
program
.command('publish [folderPath]')
.description('Upload a folder')
.action(uploadFolder)
program
.command('list')
.description('List all the agents created and uploaded by me')
.action(list);
program
.command('start-agent [workingDir]')
.description('Start an agent in the specified working directory')
.action(startAgent);
program.parse(process.argv);