claude-yolo 1.3.1 → 1.5.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/.specstory/history/.what-is-this.md +54 -0
- package/README.md +38 -7
- package/bin/claude-yolo.js +77 -1
- package/make-yolo.sh +43 -0
- package/package.json +3 -3
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# SpecStory Artifacts Directory
|
|
2
|
+
|
|
3
|
+
This directory is automatically created and maintained by the SpecStory extension to preserve your Cursor composer and chat history.
|
|
4
|
+
|
|
5
|
+
## What's Here?
|
|
6
|
+
|
|
7
|
+
- `.specstory/history`: Contains markdown files of your AI coding sessions
|
|
8
|
+
- Each file represents a separate chat or composer session
|
|
9
|
+
- Files are automatically updated as you work
|
|
10
|
+
|
|
11
|
+
## Valuable Uses
|
|
12
|
+
|
|
13
|
+
- Capture: Keep your context window up-to-date when starting new Chat/Composer sessions via @ references
|
|
14
|
+
- Search: For previous prompts and code snippets
|
|
15
|
+
- Learn: Meta-analyze your patterns and learn from your past experiences
|
|
16
|
+
|
|
17
|
+
## Version Control
|
|
18
|
+
|
|
19
|
+
We recommend keeping this directory under version control to maintain a history of your AI interactions. However, if you prefer not to version these files, you can exclude them by adding this to your `.gitignore`:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
.specstory/**
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Searching Your Codebase
|
|
26
|
+
|
|
27
|
+
When searching your codebase in Cursor, search results may include your previous AI coding interactions. To focus solely on your actual code files, you can exclude the AI interaction history from search results.
|
|
28
|
+
|
|
29
|
+
To exclude AI interaction history:
|
|
30
|
+
|
|
31
|
+
1. Open the "Find in Files" search in Cursor (Cmd/Ctrl + Shift + F)
|
|
32
|
+
2. Navigate to the "files to exclude" section
|
|
33
|
+
3. Add the following pattern:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
.specstory/*
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This will ensure your searches only return results from your working codebase files.
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
- Auto-save only works when Cursor/sqlite flushes data to disk. This results in a small delay after the AI response is complete before SpecStory can save the history.
|
|
44
|
+
- Auto-save does not yet work on remote WSL workspaces.
|
|
45
|
+
|
|
46
|
+
## Settings
|
|
47
|
+
|
|
48
|
+
You can control auto-saving behavior in Cursor:
|
|
49
|
+
|
|
50
|
+
1. Open Cursor → Settings → VS Code Settings (Cmd/Ctrl + ,)
|
|
51
|
+
2. Search for "SpecStory"
|
|
52
|
+
3. Find "Auto Save" setting to enable/disable
|
|
53
|
+
|
|
54
|
+
Auto-save occurs when changes are detected in Cursor's sqlite database, or every 2 minutes as a safety net.
|
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ A wrapper for the Claude CLI that always enables danger mode by bypassing Docker
|
|
|
8
8
|
npm install -g claude-yolo
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
GitHub: [https://github.com/eastlondoner/claude-yolo](https://github.com/eastlondoner/claude-yolo)
|
|
12
|
+
|
|
11
13
|
## Usage
|
|
12
14
|
|
|
13
15
|
```bash
|
|
@@ -17,17 +19,29 @@ claude-yolo [options]
|
|
|
17
19
|
All arguments and options are passed directly to the Claude CLI.
|
|
18
20
|
|
|
19
21
|
This wrapper:
|
|
20
|
-
1.
|
|
21
|
-
2.
|
|
22
|
+
1. Checks for and automatically installs updates to the Claude package
|
|
23
|
+
2. Displays "🔥 YOLO MODE ACTIVATED 🔥" warning in yellow text
|
|
24
|
+
3. Creates a modified copy of the Claude CLI code to bypass permission checks
|
|
22
25
|
- Replaces all `getIsDocker()` calls with `true`
|
|
23
26
|
- Replaces all `hasInternetAccess()` calls with `false`
|
|
24
|
-
|
|
25
|
-
4.
|
|
26
|
-
5.
|
|
27
|
+
- Adds colorful YOLO-themed loading messages
|
|
28
|
+
4. Leaves the original Claude CLI file untouched (won't affect your normal `claude` command)
|
|
29
|
+
5. Adds the `--dangerously-skip-permissions` flag to command line arguments
|
|
30
|
+
6. Imports the modified copy of the CLI
|
|
31
|
+
|
|
32
|
+
## New in Version 1.5.0
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
- **YOLO Mode Warning**: Displays a "🔥 YOLO MODE ACTIVATED 🔥" warning in yellow text
|
|
35
|
+
- **Colorful Loading Messages**: Adds fun YOLO-themed loading messages with colorful text
|
|
36
|
+
- "Thinking (safety's off, hold on tight)" in red
|
|
37
|
+
- "Computing (all gas, no brakes, lfg)" in yellow
|
|
38
|
+
- "Clauding (yolo mode engaged)" in magenta
|
|
39
|
+
- "Processing (dangerous mode! I guess you can just do things)" in cyan
|
|
29
40
|
|
|
30
|
-
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- **Auto-update**: Automatically checks for and installs updates to the Claude package at runtime
|
|
44
|
+
- **Non-destructive approach**: Creates a separate modified copy of the CLI file instead of modifying the original
|
|
31
45
|
- **Safe for global installations**: Your regular `claude` command will work normally even after installing claude-yolo
|
|
32
46
|
- **Debug mode**: Set the `DEBUG=1` environment variable to see detailed logs about the modifications
|
|
33
47
|
|
|
@@ -43,6 +57,23 @@ If you encounter any issues, you can run with debug output:
|
|
|
43
57
|
DEBUG=1 claude-yolo
|
|
44
58
|
```
|
|
45
59
|
|
|
60
|
+
This will show additional information about:
|
|
61
|
+
- Claude package update checks
|
|
62
|
+
- Current and latest available versions
|
|
63
|
+
- When updates are being installed
|
|
64
|
+
- Modifications being made to the CLI file
|
|
65
|
+
|
|
66
|
+
## Auto-Update Feature
|
|
67
|
+
|
|
68
|
+
Claude YOLO automatically checks for updates to the Claude package each time it runs:
|
|
69
|
+
|
|
70
|
+
1. When you run `claude-yolo`, it checks for the latest version of `@anthropic-ai/claude-code` on npm
|
|
71
|
+
2. If your installed version is outdated, it will:
|
|
72
|
+
- Update your package.json with the latest version
|
|
73
|
+
- Run npm install to get the newest version
|
|
74
|
+
- Notify you that an update was applied
|
|
75
|
+
3. This ensures you're always using the latest Claude CLI features
|
|
76
|
+
|
|
46
77
|
## Disclaimer
|
|
47
78
|
|
|
48
79
|
This is an unofficial tool and not supported by Anthropic. Use at your own risk.
|
package/bin/claude-yolo.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
console.log("YOLO");
|
|
4
3
|
|
|
5
4
|
import fs from 'fs';
|
|
6
5
|
import path from 'path';
|
|
7
6
|
import { createRequire } from 'module';
|
|
8
7
|
import { fileURLToPath } from 'url';
|
|
8
|
+
import { execSync } from 'child_process';
|
|
9
9
|
|
|
10
10
|
// Debug logging function that only logs if DEBUG env var is set
|
|
11
11
|
const debug = (message) => {
|
|
@@ -24,11 +24,57 @@ while (!fs.existsSync(path.join(nodeModulesDir, 'node_modules')) && nodeModulesD
|
|
|
24
24
|
nodeModulesDir = path.resolve(nodeModulesDir, '..');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
// Path to check package info
|
|
28
|
+
const packageJsonPath = path.join(nodeModulesDir, 'package.json');
|
|
29
|
+
|
|
30
|
+
// Check for updates to Claude package
|
|
31
|
+
async function checkForUpdates() {
|
|
32
|
+
try {
|
|
33
|
+
debug("Checking for Claude package updates...");
|
|
34
|
+
|
|
35
|
+
// Get the latest version available on npm
|
|
36
|
+
const latestVersionCmd = "npm view @anthropic-ai/claude-code version";
|
|
37
|
+
const latestVersion = execSync(latestVersionCmd).toString().trim();
|
|
38
|
+
debug(`Latest Claude version on npm: ${latestVersion}`);
|
|
39
|
+
|
|
40
|
+
// Get our current installed version
|
|
41
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
42
|
+
const dependencies = packageJson.dependencies || {};
|
|
43
|
+
const currentVersion = dependencies['@anthropic-ai/claude-code'];
|
|
44
|
+
|
|
45
|
+
debug(`Current dependency in package.json: ${currentVersion}`);
|
|
46
|
+
|
|
47
|
+
// If using a specific version (not "latest"), and it's out of date, update
|
|
48
|
+
if (currentVersion !== "latest" && currentVersion !== latestVersion) {
|
|
49
|
+
console.log(`Updating Claude package from ${currentVersion || 'unknown'} to ${latestVersion}...`);
|
|
50
|
+
|
|
51
|
+
// Update package.json
|
|
52
|
+
packageJson.dependencies['@anthropic-ai/claude-code'] = latestVersion;
|
|
53
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
54
|
+
|
|
55
|
+
// Run npm install
|
|
56
|
+
console.log("Running npm install to update dependencies...");
|
|
57
|
+
execSync("npm install", { stdio: 'inherit', cwd: nodeModulesDir });
|
|
58
|
+
console.log("Update complete!");
|
|
59
|
+
} else if (currentVersion === "latest") {
|
|
60
|
+
// If using "latest", just make sure we have the latest version installed
|
|
61
|
+
debug("Using 'latest' tag in package.json, running npm install to ensure we have the newest version");
|
|
62
|
+
execSync("npm install", { stdio: 'inherit', cwd: nodeModulesDir });
|
|
63
|
+
}
|
|
64
|
+
} catch (error) {
|
|
65
|
+
console.error("Error checking for updates:", error.message);
|
|
66
|
+
debug(error.stack);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
27
70
|
// Path to the Claude CLI file
|
|
28
71
|
const claudeDir = path.join(nodeModulesDir, 'node_modules', '@anthropic-ai', 'claude-code');
|
|
29
72
|
const originalCliPath = path.join(claudeDir, 'cli.mjs');
|
|
30
73
|
const yoloCliPath = path.join(claudeDir, 'cli-yolo.mjs');
|
|
31
74
|
|
|
75
|
+
// Check and update Claude package first
|
|
76
|
+
await checkForUpdates();
|
|
77
|
+
|
|
32
78
|
if (!fs.existsSync(originalCliPath)) {
|
|
33
79
|
console.error(`Error: ${originalCliPath} not found. Make sure @anthropic-ai/claude-code is installed.`);
|
|
34
80
|
process.exit(1);
|
|
@@ -45,6 +91,36 @@ debug("Replaced all instances of *.getIsDocker() with true");
|
|
|
45
91
|
cliContent = cliContent.replace(/[a-zA-Z0-9_]*\.hasInternetAccess\(\)/g, 'false');
|
|
46
92
|
debug("Replaced all instances of *.hasInternetAccess() with false");
|
|
47
93
|
|
|
94
|
+
// Add warning message
|
|
95
|
+
console.log("\x1b[33m🔥 YOLO MODE ACTIVATED 🔥\x1b[0m");
|
|
96
|
+
|
|
97
|
+
// Replace the loading messages array with YOLO versions
|
|
98
|
+
const originalArray = '["Accomplishing","Actioning","Actualizing","Baking","Brewing","Calculating","Cerebrating","Churning","Clauding","Coalescing","Cogitating","Computing","Conjuring","Considering","Cooking","Crafting","Creating","Crunching","Deliberating","Determining","Doing","Effecting","Finagling","Forging","Forming","Generating","Hatching","Herding","Honking","Hustling","Ideating","Inferring","Manifesting","Marinating","Moseying","Mulling","Mustering","Musing","Noodling","Percolating","Pondering","Processing","Puttering","Reticulating","Ruminating","Schlepping","Shucking","Simmering","Smooshing","Spinning","Stewing","Synthesizing","Thinking","Transmuting","Vibing","Working"]';
|
|
99
|
+
const yoloSuffixes = [
|
|
100
|
+
" \x1b[31m(safety's off, hold on tight)\x1b[0m",
|
|
101
|
+
" \x1b[33m(all gas, no brakes, lfg)\x1b[0m",
|
|
102
|
+
" \x1b[35m(yolo mode engaged)\x1b[0m",
|
|
103
|
+
" \x1b[36m(dangerous mode! I guess you can just do things)\x1b[0m"
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
// Function to add a random YOLO suffix to each word in the array
|
|
107
|
+
const addYoloSuffixes = (arrayStr) => {
|
|
108
|
+
try {
|
|
109
|
+
const array = JSON.parse(arrayStr);
|
|
110
|
+
const yoloArray = array.map(word => {
|
|
111
|
+
const randomSuffix = yoloSuffixes[Math.floor(Math.random() * yoloSuffixes.length)];
|
|
112
|
+
return word + randomSuffix;
|
|
113
|
+
});
|
|
114
|
+
return JSON.stringify(yoloArray);
|
|
115
|
+
} catch (e) {
|
|
116
|
+
debug(`Error modifying loading messages array: ${e.message}`);
|
|
117
|
+
return arrayStr;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
cliContent = cliContent.replace(originalArray, addYoloSuffixes(originalArray));
|
|
122
|
+
debug("Replaced loading messages with YOLO versions");
|
|
123
|
+
|
|
48
124
|
// Write the modified content to a new file, leaving the original untouched
|
|
49
125
|
fs.writeFileSync(yoloCliPath, cliContent);
|
|
50
126
|
debug(`Created modified CLI at ${yoloCliPath}`);
|
package/make-yolo.sh
CHANGED
|
@@ -20,10 +20,53 @@ echo "Created backup at ${CLI_FILE}.backup"
|
|
|
20
20
|
sed -i.bak1 's/[a-zA-Z0-9_]*\.getIsDocker()/true/g' "$CLI_FILE"
|
|
21
21
|
echo "Replaced all instances of *.getIsDocker() with true"
|
|
22
22
|
|
|
23
|
+
# Print warning message
|
|
24
|
+
echo 'echo -e "\033[33m🔥 YOLO MODE ACTIVATED 🔥\033[0m"' >> "$CLI_FILE"
|
|
25
|
+
echo "Added warning message"
|
|
26
|
+
|
|
23
27
|
# Replace any object's hasInternetAccess() call with false
|
|
24
28
|
sed -i.bak2 's/[a-zA-Z0-9_]*\.hasInternetAccess()/false/g' "$CLI_FILE"
|
|
25
29
|
echo "Replaced all instances of *.hasInternetAccess() with false"
|
|
26
30
|
|
|
31
|
+
# Replace the loading messages array with YOLO versions
|
|
32
|
+
ORIGINAL_ARRAY='["Accomplishing","Actioning","Actualizing","Baking","Brewing","Calculating","Cerebrating","Churning","Clauding","Coalescing","Cogitating","Computing","Conjuring","Considering","Cooking","Crafting","Creating","Crunching","Deliberating","Determining","Doing","Effecting","Finagling","Forging","Forming","Generating","Hatching","Herding","Honking","Hustling","Ideating","Inferring","Manifesting","Marinating","Moseying","Mulling","Mustering","Musing","Noodling","Percolating","Pondering","Processing","Puttering","Reticulating","Ruminating","Schlepping","Shucking","Simmering","Smooshing","Spinning","Stewing","Synthesizing","Thinking","Transmuting","Vibing","Working"]'
|
|
33
|
+
|
|
34
|
+
# Create a temporary file with a Python script to modify the array
|
|
35
|
+
cat > /tmp/modify_array.py << 'EOF'
|
|
36
|
+
import re
|
|
37
|
+
import json
|
|
38
|
+
import random
|
|
39
|
+
import sys
|
|
40
|
+
|
|
41
|
+
file_path = sys.argv[1]
|
|
42
|
+
with open(file_path, 'r') as f:
|
|
43
|
+
content = f.read()
|
|
44
|
+
|
|
45
|
+
original_array = '["Accomplishing","Actioning","Actualizing","Baking","Brewing","Calculating","Cerebrating","Churning","Clauding","Coalescing","Cogitating","Computing","Conjuring","Considering","Cooking","Crafting","Creating","Crunching","Deliberating","Determining","Doing","Effecting","Finagling","Forging","Forming","Generating","Hatching","Herding","Honking","Hustling","Ideating","Inferring","Manifesting","Marinating","Moseying","Mulling","Mustering","Musing","Noodling","Percolating","Pondering","Processing","Puttering","Reticulating","Ruminating","Schlepping","Shucking","Simmering","Smooshing","Spinning","Stewing","Synthesizing","Thinking","Transmuting","Vibing","Working"]'
|
|
46
|
+
yolo_suffixes = [
|
|
47
|
+
" \033[31m(safety's off, hold on tight)\033[0m",
|
|
48
|
+
" \033[33m(all gas, no brakes, lfg)\033[0m",
|
|
49
|
+
" \033[35m(yolo mode engaged)\033[0m",
|
|
50
|
+
" \033[36m(dangerous mode! I guess you can just do things)\033[0m"
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
array = json.loads(original_array)
|
|
54
|
+
yolo_array = [word + random.choice(yolo_suffixes) for word in array]
|
|
55
|
+
yolo_array_json = json.dumps(yolo_array)
|
|
56
|
+
|
|
57
|
+
modified_content = content.replace(original_array, yolo_array_json)
|
|
58
|
+
|
|
59
|
+
with open(file_path, 'w') as f:
|
|
60
|
+
f.write(modified_content)
|
|
61
|
+
EOF
|
|
62
|
+
|
|
63
|
+
# Run the Python script to modify the array
|
|
64
|
+
python3 /tmp/modify_array.py "$CLI_FILE"
|
|
65
|
+
echo "Replaced loading messages with YOLO versions"
|
|
66
|
+
|
|
67
|
+
# Clean up temporary file
|
|
68
|
+
rm /tmp/modify_array.py
|
|
69
|
+
|
|
27
70
|
# Clean up the .bak files created by sed
|
|
28
71
|
rm -f "${CLI_FILE}.bak1" "${CLI_FILE}.bak2"
|
|
29
72
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-yolo",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "YOLO wrapper for Claude CLI with danger mode always enabled",
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "YOLO wrapper for Claude CLI with danger mode always enabled, auto-updates, and colorful loading messages",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claude-yolo": "./bin/claude-yolo.js"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@anthropic-ai/claude-code": "
|
|
9
|
+
"@anthropic-ai/claude-code": "0.2.14"
|
|
10
10
|
},
|
|
11
11
|
"type": "module"
|
|
12
12
|
}
|