shoud-cli 1.0.6 → 1.0.8
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.
- package/bin/shoud.js +19 -10
- package/package.json +1 -1
package/bin/shoud.js
CHANGED
|
@@ -5,7 +5,7 @@ const chalk = require('chalk');
|
|
|
5
5
|
const { login } = require('../src/auth/deviceFlow');
|
|
6
6
|
const { executeTask } = require('../src/runtime/agentLoop');
|
|
7
7
|
|
|
8
|
-
// ───
|
|
8
|
+
// ─── Original SHOUD Banner Art ──────────────────────────────
|
|
9
9
|
const BANNER_ART = [
|
|
10
10
|
" ███████╗██╗ ██╗ ██████╗ ██╗ ██╗██████╗ ",
|
|
11
11
|
" ██╔════╝██║ ██║██╔═══██╗██║ ██║██╔══██╗",
|
|
@@ -15,13 +15,21 @@ const BANNER_ART = [
|
|
|
15
15
|
" ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═════╝ "
|
|
16
16
|
];
|
|
17
17
|
|
|
18
|
+
// ─── Static Banner (no animation) ──────────────────────────
|
|
19
|
+
function printStaticBanner() {
|
|
20
|
+
const color = chalk.hex('#B5F96C');
|
|
21
|
+
console.log(color(BANNER_ART.join('\n')));
|
|
22
|
+
console.log(color(' ┌──────────────────────────────────────────────────────────┐'));
|
|
23
|
+
console.log(color(' │ Give your computer a job. │'));
|
|
24
|
+
console.log(color(' └──────────────────────────────────────────────────────────┘'));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// ─── Animated Banner (for help) ─────────────────────────────
|
|
18
28
|
const SLEEP = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
19
29
|
|
|
20
|
-
// ─── Animated Banner ─────────────────────────────────────────────────────────
|
|
21
30
|
async function renderAnimatedBanner() {
|
|
22
31
|
if (!process.stdout.isTTY) {
|
|
23
|
-
|
|
24
|
-
console.log(chalk.hex('#B5F96C').bold(' Give your computer a job.\n'));
|
|
32
|
+
printStaticBanner();
|
|
25
33
|
return;
|
|
26
34
|
}
|
|
27
35
|
|
|
@@ -61,7 +69,7 @@ async function renderAnimatedBanner() {
|
|
|
61
69
|
process.stdout.write('\x1B[?25h');
|
|
62
70
|
}
|
|
63
71
|
|
|
64
|
-
// ─── Custom Help
|
|
72
|
+
// ─── Custom Help ──────────────────────────────────────────────
|
|
65
73
|
async function customHelp() {
|
|
66
74
|
console.log(chalk.hex('#B5F96C').bold('\n SHOUD Terminal Agent - Command Reference\n'));
|
|
67
75
|
console.log(chalk.gray(' Usage: shoud [command] OR shoud "[prompt]"\n'));
|
|
@@ -78,7 +86,7 @@ async function customHelp() {
|
|
|
78
86
|
console.log(` ${chalk.hex('#B5F96C')('>')} shoud "Run npm test and fix any failing test cases"\n`);
|
|
79
87
|
}
|
|
80
88
|
|
|
81
|
-
// ─── Main
|
|
89
|
+
// ─── Main ──────────────────────────────────────────────────────
|
|
82
90
|
async function main() {
|
|
83
91
|
const args = process.argv.slice(2);
|
|
84
92
|
|
|
@@ -87,8 +95,7 @@ async function main() {
|
|
|
87
95
|
args[0] === 'help' || args[0] === '--help' || args[0] === '-h' ||
|
|
88
96
|
args[0] === '--version' || args[0] === '-v') {
|
|
89
97
|
if (args[0] === '--version' || args[0] === '-v') {
|
|
90
|
-
|
|
91
|
-
program.version('1.0.0');
|
|
98
|
+
program.version('1.0.6');
|
|
92
99
|
program.parse(process.argv);
|
|
93
100
|
return;
|
|
94
101
|
}
|
|
@@ -98,7 +105,7 @@ async function main() {
|
|
|
98
105
|
}
|
|
99
106
|
|
|
100
107
|
program
|
|
101
|
-
.version('1.0.
|
|
108
|
+
.version('1.0.6')
|
|
102
109
|
.description('SHOUD Terminal Agent');
|
|
103
110
|
|
|
104
111
|
program
|
|
@@ -106,7 +113,7 @@ async function main() {
|
|
|
106
113
|
.description('Authenticate this device with your SHOUD account')
|
|
107
114
|
.action(login);
|
|
108
115
|
|
|
109
|
-
// Placeholder for status
|
|
116
|
+
// Placeholder for status
|
|
110
117
|
program
|
|
111
118
|
.command('status')
|
|
112
119
|
.description('Check your current credit balance and active plan')
|
|
@@ -123,6 +130,8 @@ async function main() {
|
|
|
123
130
|
}
|
|
124
131
|
const taskPrompt = promptArr.join(' ');
|
|
125
132
|
await executeTask(taskPrompt);
|
|
133
|
+
// ✅ After task completes, show the static banner
|
|
134
|
+
printStaticBanner();
|
|
126
135
|
});
|
|
127
136
|
|
|
128
137
|
program.parse(process.argv);
|