@jcanizalez7/clauxy 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/dist/cli.js +37 -30
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -5209,7 +5209,7 @@ class CopilotProvider {
5209
5209
  };
5210
5210
  await Auth.set("copilot", credentials);
5211
5211
  this.cachedCredentials = credentials;
5212
- console.log(` Authentication successful!
5212
+ console.log(` \x1B[32m+\x1B[0m Authentication successful!
5213
5213
  `);
5214
5214
  return { type: "success", credentials };
5215
5215
  }
@@ -5258,7 +5258,7 @@ class CopilotProvider {
5258
5258
  this.cachedCredentials.access = copilotToken.token;
5259
5259
  this.cachedCredentials.expires = copilotToken.expires_at * 1000;
5260
5260
  await Auth.set("copilot", this.cachedCredentials);
5261
- console.log(" Copilot access token refreshed");
5261
+ console.log("\x1B[32m+\x1B[0m Copilot access token refreshed");
5262
5262
  }
5263
5263
  return this.cachedCredentials.access;
5264
5264
  }
@@ -5503,7 +5503,7 @@ class ChatGPTProvider {
5503
5503
  };
5504
5504
  await Auth.set("chatgpt", credentials);
5505
5505
  this.cachedCredentials = credentials;
5506
- console.log(` Authentication successful!
5506
+ console.log(` \x1B[32m+\x1B[0m Authentication successful!
5507
5507
  `);
5508
5508
  return { type: "success", credentials };
5509
5509
  } catch (error) {
@@ -5532,7 +5532,7 @@ class ChatGPTProvider {
5532
5532
  this.cachedCredentials.refresh = tokens.refresh;
5533
5533
  this.cachedCredentials.expires = tokens.expires;
5534
5534
  await Auth.set("chatgpt", this.cachedCredentials);
5535
- console.log(" ChatGPT access token refreshed");
5535
+ console.log("\x1B[32m+\x1B[0m ChatGPT access token refreshed");
5536
5536
  }
5537
5537
  return this.cachedCredentials.access;
5538
5538
  }
@@ -5745,7 +5745,7 @@ class GoogleProvider {
5745
5745
  };
5746
5746
  await Auth.set("google", credentials);
5747
5747
  this.cachedCredentials = credentials;
5748
- console.log(` Authentication successful!
5748
+ console.log(` \x1B[32m+\x1B[0m Authentication successful!
5749
5749
  `);
5750
5750
  return { type: "success", credentials };
5751
5751
  } catch (error) {
@@ -5774,7 +5774,7 @@ class GoogleProvider {
5774
5774
  this.cachedCredentials.refresh = tokens.refresh;
5775
5775
  this.cachedCredentials.expires = tokens.expires;
5776
5776
  await Auth.set("google", this.cachedCredentials);
5777
- console.log(" Google access token refreshed");
5777
+ console.log("\x1B[32m+\x1B[0m Google access token refreshed");
5778
5778
  }
5779
5779
  return this.cachedCredentials.access;
5780
5780
  }
@@ -6866,7 +6866,7 @@ function convertAnthropicToOpenAI(anthropicReq) {
6866
6866
  ...tools && { tools }
6867
6867
  };
6868
6868
  }
6869
- var LOG_LEVELS, currentLogLevel, log, DEFAULT_PORT, PORT_RANGE, provider, convertOpenAIToAnthropic, token, models, PORT, server, wireApi, wireApiLabel;
6869
+ var LOG_LEVELS, currentLogLevel, log, DEFAULT_PORT, PORT_RANGE, provider, convertOpenAIToAnthropic, token, models, PORT, server, c4, wireApi, wireApiLabel;
6870
6870
  var init_proxy = __esm(async () => {
6871
6871
  init_providers();
6872
6872
  init_config();
@@ -6913,16 +6913,16 @@ var init_proxy = __esm(async () => {
6913
6913
  PORT_RANGE = [3000, 3001, 3002, 3003, 3004, 3005];
6914
6914
  provider = await loadProvider();
6915
6915
  convertOpenAIToAnthropic = convertResponse;
6916
- log.info(`\uD83D\uDD11 Authenticating with ${provider.info.name}...`);
6916
+ log.info(`Authenticating with ${provider.info.name}...`);
6917
6917
  token = await provider.getToken();
6918
- log.info(" Authentication successful");
6918
+ log.info("\x1B[32m+\x1B[0m Authentication successful");
6919
6919
  if (provider.loadCodeAssist) {
6920
- log.info("\uD83D\uDD04 Initializing Cloud Code session...");
6920
+ log.info("Initializing Cloud Code session...");
6921
6921
  const projectId = await provider.loadCodeAssist();
6922
6922
  if (projectId) {
6923
- log.info(`✅ Cloud Code project: ${projectId}`);
6923
+ log.info(`\x1B[32m+\x1B[0m Cloud Code project: ${projectId}`);
6924
6924
  } else {
6925
- log.warn("⚠️ Could not get Cloud Code project ID - requests may fail");
6925
+ log.warn("\x1B[33m!\x1B[0m Could not get Cloud Code project ID - requests may fail");
6926
6926
  }
6927
6927
  }
6928
6928
  models = { big: "default", mid: "default", small: "default" };
@@ -7128,31 +7128,38 @@ var init_proxy = __esm(async () => {
7128
7128
  }
7129
7129
  }
7130
7130
  });
7131
+ c4 = {
7132
+ green: (s2) => `\x1B[32m${s2}\x1B[0m`,
7133
+ cyan: (s2) => `\x1B[36m${s2}\x1B[0m`,
7134
+ yellow: (s2) => `\x1B[33m${s2}\x1B[0m`,
7135
+ dim: (s2) => `\x1B[2m${s2}\x1B[0m`,
7136
+ bold: (s2) => `\x1B[1m${s2}\x1B[0m`
7137
+ };
7131
7138
  wireApi = provider.info.wireApi || "chat";
7132
7139
  wireApiLabel = wireApi === "gemini" ? "Gemini API" : wireApi === "responses" ? "Responses API" : "Chat Completions";
7133
- log.raw("".repeat(60));
7134
- log.raw(`\uD83D\uDE80 Clauxy proxy ready on http://localhost:${PORT}`);
7135
- log.raw(`\uD83D\uDCE1 Provider: ${provider.info.name}`);
7136
- log.raw(`\uD83D\uDD0C Wire API: ${wireApiLabel}`);
7137
- log.raw("".repeat(60));
7140
+ log.raw(c4.dim("=".repeat(60)));
7141
+ log.raw(`${c4.green(">")} ${c4.bold("Clauxy")} proxy ready on ${c4.cyan(`http://localhost:${PORT}`)}`);
7142
+ log.raw(`${c4.green(">")} Provider: ${c4.cyan(provider.info.name)}`);
7143
+ log.raw(`${c4.green(">")} Wire API: ${c4.cyan(wireApiLabel)}`);
7144
+ log.raw(c4.dim("=".repeat(60)));
7138
7145
  log.raw(`
7139
- \uD83C\uDFAF Model Mapping (Claude -> Provider):`);
7140
- log.raw(` opus/big -> ${models.big}`);
7141
- log.raw(` sonnet/mid -> ${models.mid}`);
7142
- log.raw(` haiku/small -> ${models.small}`);
7146
+ ${c4.yellow("Model Mapping")} (Claude -> Provider):`);
7147
+ log.raw(` opus/big -> ${c4.cyan(models.big)}`);
7148
+ log.raw(` sonnet/mid -> ${c4.cyan(models.mid)}`);
7149
+ log.raw(` haiku/small -> ${c4.cyan(models.small)}`);
7143
7150
  log.raw(`
7144
- \uD83D\uDCA1 To change models:`);
7145
- log.raw(" CLAUXY_MODEL_BIG=<model> CLAUXY_MODEL_MID=<model> CLAUXY_MODEL_SMALL=<model>");
7146
- log.raw(" Or run: clauxy model");
7147
- log.raw("".repeat(60));
7151
+ ${c4.yellow("To change models:")}`);
7152
+ log.raw(c4.dim(" CLAUXY_MODEL_BIG=<model> CLAUXY_MODEL_MID=<model> CLAUXY_MODEL_SMALL=<model>"));
7153
+ log.raw(c4.dim(" Or run: clauxy model"));
7154
+ log.raw(c4.dim("=".repeat(60)));
7148
7155
  log.raw(`
7149
- \uD83D\uDCDD Run in a NEW terminal:
7156
+ ${c4.yellow("Run in a NEW terminal:")}
7150
7157
  `);
7151
- log.raw(` export ANTHROPIC_BASE_URL="http://localhost:${PORT}"`);
7152
- log.raw(` export ANTHROPIC_API_KEY="dummy"`);
7153
- log.raw(` claude
7158
+ log.raw(` ${c4.green("export")} ANTHROPIC_BASE_URL=${c4.cyan(`"http://localhost:${PORT}"`)}`);
7159
+ log.raw(` ${c4.green("export")} ANTHROPIC_API_KEY=${c4.cyan('"clauxy"')}`);
7160
+ log.raw(` ${c4.bold("claude")}
7154
7161
  `);
7155
- log.raw("".repeat(60));
7162
+ log.raw(c4.dim("=".repeat(60)));
7156
7163
  });
7157
7164
 
7158
7165
  // node_modules/consola/dist/core.mjs
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@jcanizalez7/clauxy",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Multi-provider AI proxy for Claude Code (GitHub Copilot, ChatGPT Plus, Google Gemini)",
5
5
  "type": "module",
6
6
  "bin": {
7
- "claux": "dist/cli.js"
7
+ "clauxy": "dist/cli.js"
8
8
  },
9
9
  "files": [
10
10
  "dist"