jbai-cli 1.2.3 → 1.2.5

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 CHANGED
@@ -175,7 +175,7 @@ jbai doctor
175
175
  |------|-----------------|
176
176
  | Claude Code | `npm i -g @anthropic-ai/claude-code` |
177
177
  | Codex | `npm i -g @openai/codex` |
178
- | Aider | `python3 -m pip install aider-chat` |
178
+ | Aider | `pipx install aider-chat` |
179
179
  | OpenCode | `go install github.com/opencode-ai/opencode@latest` |
180
180
 
181
181
  ## Token Management
@@ -33,11 +33,14 @@ if (superMode) {
33
33
  }
34
34
 
35
35
  // Set environment for Claude Code
36
- // Only set API_KEY (not AUTH_TOKEN) to avoid conflicts
36
+ // Use ANTHROPIC_CUSTOM_HEADERS for the Grazie auth header
37
+ // Remove /v1 from endpoint - Claude Code adds it automatically
38
+ const baseUrl = endpoints.anthropic.replace(/\/v1$/, '');
37
39
  const env = {
38
40
  ...process.env,
39
- ANTHROPIC_BASE_URL: endpoints.anthropic,
40
- ANTHROPIC_API_KEY: token
41
+ ANTHROPIC_BASE_URL: baseUrl,
42
+ ANTHROPIC_API_KEY: 'placeholder',
43
+ ANTHROPIC_CUSTOM_HEADERS: `Grazie-Authenticate-JWT: ${token}`
41
44
  };
42
45
 
43
46
  // Remove any existing auth token that might conflict
@@ -55,11 +55,13 @@ if (!opencodeConfig.provider) {
55
55
  const envVarName = environment === 'staging' ? 'GRAZIE_STAGING_TOKEN' : 'GRAZIE_API_TOKEN';
56
56
 
57
57
  // Add/update JetBrains provider with custom header (using env var reference)
58
+ // Remove /v1 from endpoint - SDK adds it automatically
59
+ const baseUrl = endpoints.anthropic.replace(/\/v1$/, '');
58
60
  opencodeConfig.provider[providerName] = {
59
61
  npm: '@ai-sdk/anthropic',
60
62
  name: `JetBrains AI (${environment})`,
61
63
  options: {
62
- baseURL: endpoints.anthropic,
64
+ baseURL: baseUrl,
63
65
  apiKey: `{env:${envVarName}}`,
64
66
  headers: {
65
67
  'Grazie-Authenticate-JWT': `{env:${envVarName}}`
package/bin/jbai.js CHANGED
@@ -21,7 +21,7 @@ const TOOLS = {
21
21
  aider: {
22
22
  name: 'Aider',
23
23
  command: 'aider',
24
- install: 'python3 -m pip install aider-chat',
24
+ install: 'pipx install aider-chat',
25
25
  check: 'aider --version'
26
26
  },
27
27
  opencode: {
package/lib/config.js CHANGED
@@ -136,7 +136,7 @@ const TOOLS = {
136
136
  aider: {
137
137
  name: 'Aider',
138
138
  command: 'aider',
139
- install: 'python3 -m pip install aider-chat'
139
+ install: 'pipx install aider-chat'
140
140
  },
141
141
  opencode: {
142
142
  name: 'OpenCode',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jbai-cli",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "CLI wrappers to use AI coding tools (Claude Code, Codex, Aider, OpenCode) with JetBrains AI Platform",
5
5
  "keywords": [
6
6
  "jetbrains",