icbauggw 1.2.2 → 1.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icbauggw",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "CLI tool for rotating Augment session accounts",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -2,7 +2,7 @@ const fs = require("fs");
2
2
  const path = require("path");
3
3
  const { apiRequest } = require("../utils/api");
4
4
  const { requireAuth } = require("../utils/auth");
5
- const { getSessionPath } = require("../utils/paths");
5
+ const { getSessionPath, getClaudeSettingsPath } = require("../utils/paths");
6
6
 
7
7
  async function switchCommand() {
8
8
  requireAuth();
@@ -26,6 +26,21 @@ async function switchCommand() {
26
26
  };
27
27
  fs.writeFileSync(sessionPath, JSON.stringify(session, null, 2), "utf8");
28
28
 
29
+ // Write Claude settings file
30
+ if (data.claudeSettings) {
31
+ const claudeSettingsPath = getClaudeSettingsPath();
32
+ const claudeDir = path.dirname(claudeSettingsPath);
33
+ if (!fs.existsSync(claudeDir)) {
34
+ fs.mkdirSync(claudeDir, { recursive: true });
35
+ }
36
+ fs.writeFileSync(
37
+ claudeSettingsPath,
38
+ JSON.stringify(data.claudeSettings, null, 2),
39
+ "utf8",
40
+ );
41
+ console.log(` Claude settings → ${claudeSettingsPath}`);
42
+ }
43
+
29
44
  console.log("✅ Session switched!");
30
45
  console.log(` Account: ${data.accountName}`);
31
46
  console.log(` Tenant: ${data.tenantURL}`);
@@ -9,4 +9,8 @@ function getSessionPath() {
9
9
  return path.join(os.homedir(), ".augment", "session.json");
10
10
  }
11
11
 
12
- module.exports = { getTokenPath, getSessionPath };
12
+ function getClaudeSettingsPath() {
13
+ return path.join(os.homedir(), ".claude", "settings.json");
14
+ }
15
+
16
+ module.exports = { getTokenPath, getSessionPath, getClaudeSettingsPath };