claude-yolo-extended 1.8.2 → 1.9.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.
- package/bin/ascii-art.js +65 -0
- package/bin/cl.js +5 -19
- package/bin/claude-yolo.js +5 -5
- package/package.json +1 -1
package/bin/ascii-art.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// ANSI color codes
|
|
2
|
+
const RED = '\x1b[31m';
|
|
3
|
+
const YELLOW = '\x1b[33m';
|
|
4
|
+
const CYAN = '\x1b[36m';
|
|
5
|
+
const GREEN = '\x1b[32m';
|
|
6
|
+
const RESET = '\x1b[0m';
|
|
7
|
+
const BOLD = '\x1b[1m';
|
|
8
|
+
const ORANGE = '\x1b[38;5;208m';
|
|
9
|
+
|
|
10
|
+
export const YOLO_ART = `${YELLOW}
|
|
11
|
+
██╗ ██╗ ██████╗ ██╗ ██████╗ ██╗
|
|
12
|
+
╚██╗ ██╔╝██╔═══██╗██║ ██╔═══██╗██║
|
|
13
|
+
╚████╔╝ ██║ ██║██║ ██║ ██║██║
|
|
14
|
+
╚██╔╝ ██║ ██║██║ ██║ ██║╚═╝
|
|
15
|
+
██║ ╚██████╔╝███████╗╚██████╔╝██╗
|
|
16
|
+
╚═╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝
|
|
17
|
+
${ORANGE} 🔥 NO SAFETY - MAXIMUM POWER - USE WITH CAUTION 🔥${RESET}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const SAFE_ART = `${CYAN}
|
|
21
|
+
███████╗ █████╗ ███████╗███████╗
|
|
22
|
+
██╔════╝██╔══██╗██╔════╝██╔════╝
|
|
23
|
+
███████╗███████║█████╗ █████╗
|
|
24
|
+
╚════██║██╔══██║██╔══╝ ██╔══╝
|
|
25
|
+
███████║██║ ██║██║ ███████╗
|
|
26
|
+
╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝
|
|
27
|
+
${GREEN} 🛡️ PROTECTED MODE - SAFETY FIRST 🛡️${RESET}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
export const YOLO_BANNER = `${YELLOW}🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥${RESET}`;
|
|
31
|
+
export const SAFE_BANNER = `${CYAN}🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️ 🛡️${RESET}`;
|
|
32
|
+
|
|
33
|
+
export function showYoloActivated() {
|
|
34
|
+
console.log(YOLO_BANNER);
|
|
35
|
+
console.log(YOLO_ART);
|
|
36
|
+
console.log(YOLO_BANNER);
|
|
37
|
+
console.log(`${RED}${BOLD}⚠️ WARNING: All safety checks DISABLED!${RESET}`);
|
|
38
|
+
console.log(`${RED}⚠️ Claude can access ANY file without asking!${RESET}`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function showSafeActivated() {
|
|
42
|
+
console.log(SAFE_BANNER);
|
|
43
|
+
console.log(SAFE_ART);
|
|
44
|
+
console.log(SAFE_BANNER);
|
|
45
|
+
console.log(`${GREEN}✓ Safety checks enabled${RESET}`);
|
|
46
|
+
console.log(`${GREEN}✓ Claude will ask for permissions${RESET}`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function showModeStatus(mode) {
|
|
50
|
+
console.log(`${BOLD}Claude CLI Status:${RESET}`);
|
|
51
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
52
|
+
|
|
53
|
+
if (mode === 'YOLO') {
|
|
54
|
+
console.log(YOLO_ART);
|
|
55
|
+
console.log(`Mode: ${YELLOW}${BOLD}YOLO${RESET} 🔥`);
|
|
56
|
+
console.log(`Safety: ${RED}DISABLED${RESET}`);
|
|
57
|
+
console.log(`Permissions: ${RED}BYPASSED${RESET}`);
|
|
58
|
+
} else {
|
|
59
|
+
console.log(SAFE_ART);
|
|
60
|
+
console.log(`Mode: ${CYAN}${BOLD}SAFE${RESET} 🛡️`);
|
|
61
|
+
console.log(`Safety: ${GREEN}ENABLED${RESET}`);
|
|
62
|
+
console.log(`Permissions: ${GREEN}REQUIRED${RESET}`);
|
|
63
|
+
}
|
|
64
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
65
|
+
}
|
package/bin/cl.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { spawn } from 'child_process';
|
|
6
6
|
import os from 'os';
|
|
7
7
|
import { fileURLToPath } from 'url';
|
|
8
|
+
import { showYoloActivated, showSafeActivated, showModeStatus } from './ascii-art.js';
|
|
8
9
|
|
|
9
10
|
// Get the directory of the current module
|
|
10
11
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
@@ -43,9 +44,7 @@ if (args.length > 0) {
|
|
|
43
44
|
|
|
44
45
|
switch (command) {
|
|
45
46
|
case '/YON':
|
|
46
|
-
|
|
47
|
-
console.log(`${RED}⚠️ WARNING: All safety checks will be DISABLED!${RESET}`);
|
|
48
|
-
console.log(`${RED}⚠️ Claude can access ANY file without asking!${RESET}`);
|
|
47
|
+
showYoloActivated();
|
|
49
48
|
setMode('YOLO');
|
|
50
49
|
console.log(`${YELLOW}✓ YOLO mode is now ON${RESET}`);
|
|
51
50
|
|
|
@@ -58,9 +57,7 @@ if (args.length > 0) {
|
|
|
58
57
|
break;
|
|
59
58
|
|
|
60
59
|
case '/YOFF':
|
|
61
|
-
|
|
62
|
-
console.log(`${GREEN}✓ Safety checks will be enabled${RESET}`);
|
|
63
|
-
console.log(`${GREEN}✓ Claude will ask for permissions${RESET}`);
|
|
60
|
+
showSafeActivated();
|
|
64
61
|
setMode('SAFE');
|
|
65
62
|
console.log(`${CYAN}✓ YOLO mode is now OFF (Safe mode ON)${RESET}`);
|
|
66
63
|
|
|
@@ -74,18 +71,7 @@ if (args.length > 0) {
|
|
|
74
71
|
|
|
75
72
|
case '/STATUS':
|
|
76
73
|
const mode = getMode();
|
|
77
|
-
|
|
78
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
79
|
-
if (mode === 'YOLO') {
|
|
80
|
-
console.log(`Mode: ${YELLOW}${BOLD}YOLO${RESET} 🔥`);
|
|
81
|
-
console.log(`Safety: ${RED}DISABLED${RESET}`);
|
|
82
|
-
console.log(`Permissions: ${RED}BYPASSED${RESET}`);
|
|
83
|
-
} else {
|
|
84
|
-
console.log(`Mode: ${CYAN}${BOLD}SAFE${RESET} 🛡️`);
|
|
85
|
-
console.log(`Safety: ${GREEN}ENABLED${RESET}`);
|
|
86
|
-
console.log(`Permissions: ${GREEN}REQUIRED${RESET}`);
|
|
87
|
-
}
|
|
88
|
-
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
74
|
+
showModeStatus(mode);
|
|
89
75
|
break;
|
|
90
76
|
|
|
91
77
|
case '/HELP':
|
package/bin/claude-yolo.js
CHANGED
|
@@ -9,6 +9,7 @@ import { createRequire } from 'module';
|
|
|
9
9
|
import { fileURLToPath } from 'url';
|
|
10
10
|
import { execSync } from 'child_process';
|
|
11
11
|
import readline from 'readline';
|
|
12
|
+
import { showYoloActivated, showSafeActivated, showModeStatus, YOLO_ART, SAFE_ART } from './ascii-art.js';
|
|
12
13
|
|
|
13
14
|
// ANSI color codes
|
|
14
15
|
const RED = '\x1b[31m';
|
|
@@ -211,20 +212,18 @@ async function run() {
|
|
|
211
212
|
const args = process.argv.slice(2);
|
|
212
213
|
if (args[0] === 'mode') {
|
|
213
214
|
if (args[1] === 'yolo') {
|
|
214
|
-
|
|
215
|
-
console.log(`${RED}⚠️ WARNING: All safety checks will be DISABLED!${RESET}`);
|
|
215
|
+
showYoloActivated();
|
|
216
216
|
setMode('YOLO');
|
|
217
217
|
console.log(`${YELLOW}✓ YOLO mode activated${RESET}`);
|
|
218
218
|
return;
|
|
219
219
|
} else if (args[1] === 'safe') {
|
|
220
|
-
|
|
221
|
-
console.log(`${GREEN}✓ Safety checks will be enabled${RESET}`);
|
|
220
|
+
showSafeActivated();
|
|
222
221
|
setMode('SAFE');
|
|
223
222
|
console.log(`${CYAN}✓ SAFE mode activated${RESET}`);
|
|
224
223
|
return;
|
|
225
224
|
} else {
|
|
226
225
|
const currentMode = getMode();
|
|
227
|
-
|
|
226
|
+
showModeStatus(currentMode);
|
|
228
227
|
return;
|
|
229
228
|
}
|
|
230
229
|
}
|
|
@@ -337,6 +336,7 @@ async function run() {
|
|
|
337
336
|
debug("Replaced geteuid() checks with false");
|
|
338
337
|
|
|
339
338
|
// Add warning message
|
|
339
|
+
console.log(YOLO_ART);
|
|
340
340
|
console.log(`${YELLOW}🔥 YOLO MODE ACTIVATED 🔥${RESET}`);
|
|
341
341
|
|
|
342
342
|
// Replace the loading messages array with YOLO versions
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-yolo-extended",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Claude CLI wrapper with YOLO mode (bypass safety) and SAFE mode support, auto-updates, and colorful loading messages",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claude-yolo-extended": "bin/claude-yolo.js",
|