ai-cc-router 0.3.0 → 0.3.2

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.
@@ -116,10 +116,19 @@ async function askRunPreferences() {
116
116
  message: "Will this machine serve other devices on the network? (server mode)",
117
117
  default: false,
118
118
  });
119
+ // For local (non-server) mode, ask about auto-configuring Claude Code
120
+ let configureClaudeCode = true;
121
+ if (!serverMode) {
122
+ configureClaudeCode = await confirm({
123
+ message: "Configure Claude Code to use the proxy automatically? (recommended)",
124
+ default: true,
125
+ });
126
+ }
119
127
  const prefs = {
120
128
  mode: autoStart ? "service" : mode,
121
129
  serverMode,
122
130
  port: PROXY_PORT,
131
+ configureClaudeCode,
123
132
  };
124
133
  console.log(chalk.green(`\n ✓ Preferences saved. Next time 'cc-router start' will use these automatically.`));
125
134
  console.log(chalk.gray(` Change anytime with: cc-router start --reconfigure\n`));
@@ -154,13 +163,15 @@ async function maybeSetupPassword(cfg) {
154
163
  }
155
164
  }
156
165
  async function ensureClaudeCodeConfigured(prefs, cfg) {
166
+ // Skip if user opted out (server mode always skips — clients configure themselves)
167
+ if (prefs.configureClaudeCode === false || prefs.serverMode)
168
+ return;
157
169
  try {
158
170
  const { readClaudeProxySettings } = await import("../utils/claude-config.js");
159
171
  const current = readClaudeProxySettings();
160
172
  if (current.baseUrl)
161
173
  return; // already configured
162
- const host = prefs.serverMode ? "0.0.0.0" : "localhost";
163
- writeClaudeSettings(prefs.port, `http://${host === "0.0.0.0" ? "localhost" : host}:${prefs.port}`);
174
+ writeClaudeSettings(prefs.port, `http://localhost:${prefs.port}`);
164
175
  console.log(chalk.green(" ✓ Claude Code configured to use the proxy"));
165
176
  }
166
177
  catch (err) {
@@ -172,7 +183,7 @@ async function ensureClaudeCodeConfigured(prefs, cfg) {
172
183
  async function maybeUpdate() {
173
184
  let check;
174
185
  try {
175
- check = await checkForUpdate();
186
+ check = await checkForUpdate(true); // force fresh check, skip disk cache
176
187
  if (!check.updateAvailable)
177
188
  return;
178
189
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-cc-router",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Round-robin proxy for Claude Max OAuth tokens — use multiple Claude Max accounts with Claude Code",
5
5
  "type": "module",
6
6
  "bin": {