antigravity-claude-proxy 2.6.4 → 2.6.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
@@ -280,6 +280,19 @@ function claude-antigravity {
280
280
 
281
281
  Then run `claude` for official API or `claude-antigravity` for this proxy.
282
282
 
283
+ ### Running as a System Service (systemd)
284
+
285
+ When running as a systemd service, the proxy runs under a different user (e.g. `root`), so it can't find your Claude CLI settings at `~/.claude/settings.json`. Set `CLAUDE_CONFIG_PATH` to point to the real user's `.claude` directory:
286
+
287
+ ```ini
288
+ # /etc/systemd/system/antigravity-proxy.service
289
+ [Service]
290
+ Environment=CLAUDE_CONFIG_PATH=/home/youruser/.claude
291
+ ExecStart=/usr/bin/node /path/to/antigravity-claude-proxy/src/index.js
292
+ ```
293
+
294
+ Without this, the WebUI's Claude CLI tab won't be able to read or write your Claude Code configuration.
295
+
283
296
  ---
284
297
 
285
298
  ## Documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antigravity-claude-proxy",
3
- "version": "2.6.4",
3
+ "version": "2.6.5",
4
4
  "description": "Proxy server to use Antigravity's Claude models with Claude Code CLI",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -105,11 +105,15 @@ const server = app.listen(PORT, HOST, () => {
105
105
  if (isFallbackEnabled) {
106
106
  statusSection += '║ ✓ Model fallback enabled ║\n';
107
107
  }
108
+ if (process.env.CLAUDE_CONFIG_PATH) {
109
+ statusSection += `${border} ${align4(`✓ Claude config: ${process.env.CLAUDE_CONFIG_PATH}`)}${border}\n`;
110
+ }
108
111
 
109
112
  const environmentSection = `║ Environment Variables: ║
110
113
  ║ PORT Server port (default: 8080) ║
111
114
  ║ HOST Bind address (default: 0.0.0.0) ║
112
115
  ║ HTTP_PROXY Route requests through a proxy ║
116
+ ║ CLAUDE_CONFIG_PATH Path to .claude dir (for systemd) ║
113
117
  ║ See README.md for detailed configuration examples ║`
114
118
 
115
119
  logger.log(`
@@ -3,6 +3,10 @@
3
3
  *
4
4
  * Handles reading and writing to the global Claude CLI settings file.
5
5
  * Location: ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json)
6
+ *
7
+ * When running as a system service (e.g. systemd), os.homedir() resolves to the
8
+ * service user's home directory, not the actual user's. Set CLAUDE_CONFIG_PATH to
9
+ * the real user's ~/.claude directory to fix this.
6
10
  */
7
11
 
8
12
  import fs from 'fs/promises';
@@ -12,10 +16,19 @@ import { logger } from './logger.js';
12
16
  import { DEFAULT_PRESETS } from '../constants.js';
13
17
 
14
18
  /**
15
- * Get the path to the global Claude CLI settings file
19
+ * Get the path to the global Claude CLI settings file.
20
+ *
21
+ * Resolution order:
22
+ * 1. CLAUDE_CONFIG_PATH env var (path to .claude directory, e.g. /home/user/.claude)
23
+ * 2. Default: os.homedir()/.claude/settings.json
24
+ *
16
25
  * @returns {string} Absolute path to settings.json
17
26
  */
18
27
  export function getClaudeConfigPath() {
28
+ const configDir = process.env.CLAUDE_CONFIG_PATH;
29
+ if (configDir) {
30
+ return path.join(configDir, 'settings.json');
31
+ }
19
32
  return path.join(os.homedir(), '.claude', 'settings.json');
20
33
  }
21
34