jbai-cli 1.0.1 → 1.1.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/README.md +24 -0
- package/bin/jbai-aider.js +13 -1
- package/bin/jbai-claude.js +13 -2
- package/bin/jbai-codex.js +18 -6
- package/bin/jbai-opencode.js +13 -2
- package/bin/jbai.js +6 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,6 +75,30 @@ jbai-gemini "What is Kubernetes?"
|
|
|
75
75
|
jbai-opencode
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
+
## Super Mode (Skip Confirmations)
|
|
79
|
+
|
|
80
|
+
Add `--super` (or `--yolo` or `-s`) to any command to enable maximum permissions:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Claude Code - skips all permission prompts
|
|
84
|
+
jbai-claude --super
|
|
85
|
+
|
|
86
|
+
# Codex - full auto mode
|
|
87
|
+
jbai-codex --super exec "refactor this code"
|
|
88
|
+
|
|
89
|
+
# Aider - auto-confirm all changes
|
|
90
|
+
jbai-aider --super
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
| Tool | Super Mode Flag |
|
|
94
|
+
|------|-----------------|
|
|
95
|
+
| Claude Code | `--dangerously-skip-permissions` |
|
|
96
|
+
| Codex | `--full-auto` |
|
|
97
|
+
| Aider | `--yes` |
|
|
98
|
+
| OpenCode | `--yes` |
|
|
99
|
+
|
|
100
|
+
⚠️ **Use with caution** - super mode allows the AI to make changes without confirmation.
|
|
101
|
+
|
|
78
102
|
## Using Different Models
|
|
79
103
|
|
|
80
104
|
Each tool has a sensible default, but you can specify any available model:
|
package/bin/jbai-aider.js
CHANGED
|
@@ -15,7 +15,12 @@ if (config.isTokenExpired(token)) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const endpoints = config.getEndpoints();
|
|
18
|
-
|
|
18
|
+
let args = process.argv.slice(2);
|
|
19
|
+
|
|
20
|
+
// Check for super mode (--super, --yolo, -s)
|
|
21
|
+
const superFlags = ['--super', '--yolo', '-s'];
|
|
22
|
+
const superMode = args.some(a => superFlags.includes(a));
|
|
23
|
+
args = args.filter(a => !superFlags.includes(a));
|
|
19
24
|
|
|
20
25
|
// Build aider arguments
|
|
21
26
|
const hasModel = args.includes('--model');
|
|
@@ -28,6 +33,13 @@ const aiderArgs = [
|
|
|
28
33
|
if (!hasModel) {
|
|
29
34
|
aiderArgs.push('--model', config.MODELS.openai.default);
|
|
30
35
|
}
|
|
36
|
+
|
|
37
|
+
// Add super mode flags (auto-confirm all)
|
|
38
|
+
if (superMode) {
|
|
39
|
+
aiderArgs.push('--yes');
|
|
40
|
+
console.log('🚀 Super mode: --yes (auto-confirm) enabled');
|
|
41
|
+
}
|
|
42
|
+
|
|
31
43
|
aiderArgs.push(...args);
|
|
32
44
|
|
|
33
45
|
const child = spawn('aider', aiderArgs, {
|
package/bin/jbai-claude.js
CHANGED
|
@@ -15,11 +15,22 @@ if (config.isTokenExpired(token)) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const endpoints = config.getEndpoints();
|
|
18
|
-
|
|
18
|
+
let args = process.argv.slice(2);
|
|
19
|
+
|
|
20
|
+
// Check for super mode (--super, --yolo, -s)
|
|
21
|
+
const superFlags = ['--super', '--yolo', '-s'];
|
|
22
|
+
const superMode = args.some(a => superFlags.includes(a));
|
|
23
|
+
args = args.filter(a => !superFlags.includes(a));
|
|
19
24
|
|
|
20
25
|
// Check if model specified
|
|
21
26
|
const hasModel = args.includes('--model') || args.includes('-m');
|
|
22
|
-
|
|
27
|
+
let finalArgs = hasModel ? args : ['--model', config.MODELS.claude.default, ...args];
|
|
28
|
+
|
|
29
|
+
// Add super mode flags
|
|
30
|
+
if (superMode) {
|
|
31
|
+
finalArgs = ['--dangerously-skip-permissions', ...finalArgs];
|
|
32
|
+
console.log('🚀 Super mode: --dangerously-skip-permissions enabled');
|
|
33
|
+
}
|
|
23
34
|
|
|
24
35
|
// Set environment for Claude Code
|
|
25
36
|
const env = {
|
package/bin/jbai-codex.js
CHANGED
|
@@ -18,9 +18,15 @@ if (config.isTokenExpired(token)) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const endpoints = config.getEndpoints();
|
|
21
|
-
const
|
|
22
|
-
const providerName =
|
|
23
|
-
const envVarName =
|
|
21
|
+
const environment = config.getEnvironment();
|
|
22
|
+
const providerName = environment === 'staging' ? 'jbai-staging' : 'jbai';
|
|
23
|
+
const envVarName = environment === 'staging' ? 'GRAZIE_STAGING_TOKEN' : 'GRAZIE_API_TOKEN';
|
|
24
|
+
let args = process.argv.slice(2);
|
|
25
|
+
|
|
26
|
+
// Check for super mode (--super, --yolo, -s)
|
|
27
|
+
const superFlags = ['--super', '--yolo', '-s'];
|
|
28
|
+
const superMode = args.some(a => superFlags.includes(a));
|
|
29
|
+
args = args.filter(a => !superFlags.includes(a));
|
|
24
30
|
|
|
25
31
|
// Ensure Codex config exists
|
|
26
32
|
const codexDir = path.join(os.homedir(), '.codex');
|
|
@@ -38,9 +44,9 @@ if (fs.existsSync(codexConfig)) {
|
|
|
38
44
|
|
|
39
45
|
if (!configContent.includes(`[model_providers.${providerName}]`)) {
|
|
40
46
|
const providerConfig = `
|
|
41
|
-
# JetBrains AI (${
|
|
47
|
+
# JetBrains AI (${environment})
|
|
42
48
|
[model_providers.${providerName}]
|
|
43
|
-
name = "JetBrains AI (${
|
|
49
|
+
name = "JetBrains AI (${environment})"
|
|
44
50
|
base_url = "${endpoints.openai}"
|
|
45
51
|
env_http_headers = { "Grazie-Authenticate-JWT" = "${envVarName}" }
|
|
46
52
|
wire_api = "responses"
|
|
@@ -49,13 +55,19 @@ wire_api = "responses"
|
|
|
49
55
|
console.log(`✅ Added ${providerName} provider to Codex config`);
|
|
50
56
|
}
|
|
51
57
|
|
|
52
|
-
const args = process.argv.slice(2);
|
|
53
58
|
const hasModel = args.includes('--model');
|
|
54
59
|
const finalArgs = ['-c', `model_provider=${providerName}`];
|
|
55
60
|
|
|
56
61
|
if (!hasModel) {
|
|
57
62
|
finalArgs.push('--model', config.MODELS.openai.default);
|
|
58
63
|
}
|
|
64
|
+
|
|
65
|
+
// Add super mode flags (full-auto)
|
|
66
|
+
if (superMode) {
|
|
67
|
+
finalArgs.push('--full-auto');
|
|
68
|
+
console.log('🚀 Super mode: --full-auto enabled');
|
|
69
|
+
}
|
|
70
|
+
|
|
59
71
|
finalArgs.push(...args);
|
|
60
72
|
|
|
61
73
|
const childEnv = {
|
package/bin/jbai-opencode.js
CHANGED
|
@@ -15,11 +15,22 @@ if (config.isTokenExpired(token)) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
const endpoints = config.getEndpoints();
|
|
18
|
-
|
|
18
|
+
let args = process.argv.slice(2);
|
|
19
|
+
|
|
20
|
+
// Check for super mode (--super, --yolo, -s)
|
|
21
|
+
const superFlags = ['--super', '--yolo', '-s'];
|
|
22
|
+
const superMode = args.some(a => superFlags.includes(a));
|
|
23
|
+
args = args.filter(a => !superFlags.includes(a));
|
|
19
24
|
|
|
20
25
|
// Check if model specified
|
|
21
26
|
const hasModel = args.includes('--model') || args.includes('-m');
|
|
22
|
-
|
|
27
|
+
let finalArgs = hasModel ? args : ['--model', config.MODELS.claude.default, ...args];
|
|
28
|
+
|
|
29
|
+
// Add super mode flags
|
|
30
|
+
if (superMode) {
|
|
31
|
+
finalArgs = ['--yes', ...finalArgs];
|
|
32
|
+
console.log('🚀 Super mode: --yes (auto-confirm) enabled');
|
|
33
|
+
}
|
|
23
34
|
|
|
24
35
|
// Set environment for OpenCode
|
|
25
36
|
const env = {
|
package/bin/jbai.js
CHANGED
|
@@ -26,6 +26,12 @@ TOOL WRAPPERS:
|
|
|
26
26
|
jbai-gemini Launch Gemini with JetBrains AI
|
|
27
27
|
jbai-opencode Launch OpenCode with JetBrains AI
|
|
28
28
|
|
|
29
|
+
SUPER MODE:
|
|
30
|
+
Add --super (or --yolo or -s) to skip confirmations:
|
|
31
|
+
jbai-claude --super # Skip permission prompts
|
|
32
|
+
jbai-codex --super # Full auto mode
|
|
33
|
+
jbai-aider --super # Auto-confirm changes
|
|
34
|
+
|
|
29
35
|
EXAMPLES:
|
|
30
36
|
jbai token set # Set your token
|
|
31
37
|
jbai-claude # Start Claude Code
|