tsoft-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/tsoft-cli.js +37 -0
  2. package/package.json +16 -0
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { program } = require('commander');
4
+ const inquirer = require('inquirer');
5
+
6
+ program
7
+ .version('1.0.0')
8
+ .description('TSoft CLI');
9
+
10
+ program
11
+ .command('init')
12
+ .description('Initialize a new project')
13
+ .action(() => {
14
+ console.log('Project initialized.');
15
+ });
16
+
17
+ program
18
+ .command('login')
19
+ .description('Login to your account')
20
+ .action(() => {
21
+ inquirer.prompt([
22
+ {
23
+ type: 'input',
24
+ name: 'username',
25
+ message: 'Enter your username:'
26
+ },
27
+ {
28
+ type: 'password',
29
+ name: 'password',
30
+ message: 'Enter your password:'
31
+ }
32
+ ]).then(answers => {
33
+ console.log('Logging in with:', answers);
34
+ });
35
+ });
36
+
37
+ program.parse(process.argv);
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "tsoft-cli",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "dependencies": {
13
+ "commander": "^12.1.0",
14
+ "inquirer": "^9.2.23"
15
+ }
16
+ }