@jcanizalez7/clauxy 0.2.3 → 0.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/README.md +0 -1
- package/dist/cli.js +6 -44
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,7 +65,6 @@ That's it! Clauxy starts the proxy and launches Claude Code automatically with t
|
|
|
65
65
|
```bash
|
|
66
66
|
# Default: Start proxy + launch Claude Code
|
|
67
67
|
clauxy # Just works!
|
|
68
|
-
clauxy "fix the bug" # Pass arguments to Claude
|
|
69
68
|
clauxy -p copilot # Use specific provider
|
|
70
69
|
clauxy -c # Re-authenticate before starting
|
|
71
70
|
clauxy --port 3000 # Use specific port (reuses existing proxy if running)
|
package/dist/cli.js
CHANGED
|
@@ -2569,7 +2569,7 @@ async function isClauxyRunning(port) {
|
|
|
2569
2569
|
}
|
|
2570
2570
|
}
|
|
2571
2571
|
async function wrapperCommand(options) {
|
|
2572
|
-
const { logLevel = "warn", connect = false, provider, port: requestedPort
|
|
2572
|
+
const { logLevel = "warn", connect = false, provider, port: requestedPort } = options;
|
|
2573
2573
|
const claudePath = await findClaudeCli();
|
|
2574
2574
|
if (!claudePath) {
|
|
2575
2575
|
console.error(c2.red("Error: Claude CLI not found."));
|
|
@@ -2622,7 +2622,7 @@ Install it with: ${c2.cyan("npm i -g @anthropic-ai/claude-code")}`);
|
|
|
2622
2622
|
const providerInfo = await getProvider(activeProvider);
|
|
2623
2623
|
console.log(`${c2.green(">")} ${c2.bold("Clauxy")} proxy on ${c2.cyan(`localhost:${proxyPort}`)} ${c2.dim(`(${providerInfo.info.name})`)}`);
|
|
2624
2624
|
}
|
|
2625
|
-
const claude = Bun.spawn(["claude"
|
|
2625
|
+
const claude = Bun.spawn(["claude"], {
|
|
2626
2626
|
env: {
|
|
2627
2627
|
...process.env,
|
|
2628
2628
|
ANTHROPIC_BASE_URL: `http://localhost:${proxyPort}`,
|
|
@@ -2796,7 +2796,7 @@ Models configured:`);
|
|
|
2796
2796
|
// package.json
|
|
2797
2797
|
var package_default = {
|
|
2798
2798
|
name: "@jcanizalez7/clauxy",
|
|
2799
|
-
version: "0.2.
|
|
2799
|
+
version: "0.2.4",
|
|
2800
2800
|
description: "Multi-provider AI proxy for Claude Code (GitHub Copilot, ChatGPT Plus, Google Gemini)",
|
|
2801
2801
|
type: "module",
|
|
2802
2802
|
bin: {
|
|
@@ -2949,7 +2949,7 @@ var main = defineCommand({
|
|
|
2949
2949
|
model,
|
|
2950
2950
|
models: model
|
|
2951
2951
|
},
|
|
2952
|
-
async run({ args
|
|
2952
|
+
async run({ args }) {
|
|
2953
2953
|
const port = args.port ? parseInt(args.port, 10) : undefined;
|
|
2954
2954
|
if (args.port && isNaN(port)) {
|
|
2955
2955
|
console.error(`Invalid port number: "${args.port}". Use --port <number> (e.g., --port 3000).`);
|
|
@@ -2959,50 +2959,12 @@ var main = defineCommand({
|
|
|
2959
2959
|
logLevel: args["log-level"],
|
|
2960
2960
|
connect: args.connect,
|
|
2961
2961
|
provider: args.provider,
|
|
2962
|
-
port
|
|
2963
|
-
claudeArgs: rawArgs
|
|
2962
|
+
port
|
|
2964
2963
|
});
|
|
2965
2964
|
}
|
|
2966
2965
|
});
|
|
2967
|
-
var SUBCOMMANDS = ["run", "auth", "model", "models", "--help", "-h", "--version", "-v"];
|
|
2968
2966
|
function cli() {
|
|
2969
|
-
|
|
2970
|
-
const firstArg = args.find((arg) => !arg.startsWith("-"));
|
|
2971
|
-
if (firstArg && !SUBCOMMANDS.includes(firstArg)) {
|
|
2972
|
-
let logLevel = "warn";
|
|
2973
|
-
let connect = false;
|
|
2974
|
-
let provider;
|
|
2975
|
-
let port;
|
|
2976
|
-
const claudeArgs = [];
|
|
2977
|
-
for (let i = 0;i < args.length; i++) {
|
|
2978
|
-
const arg = args[i];
|
|
2979
|
-
if (arg === "-l" || arg === "--log-level") {
|
|
2980
|
-
logLevel = args[++i] || "warn";
|
|
2981
|
-
} else if (arg === "-c" || arg === "--connect") {
|
|
2982
|
-
connect = true;
|
|
2983
|
-
} else if (arg === "-p" || arg === "--provider") {
|
|
2984
|
-
provider = args[++i];
|
|
2985
|
-
} else if (arg === "--port") {
|
|
2986
|
-
const portStr = args[++i];
|
|
2987
|
-
port = portStr ? parseInt(portStr, 10) : undefined;
|
|
2988
|
-
} else if (arg.startsWith("--log-level=")) {
|
|
2989
|
-
logLevel = arg.split("=")[1];
|
|
2990
|
-
} else if (arg.startsWith("--provider=")) {
|
|
2991
|
-
provider = arg.split("=")[1];
|
|
2992
|
-
} else if (arg.startsWith("--port=")) {
|
|
2993
|
-
port = parseInt(arg.split("=")[1], 10);
|
|
2994
|
-
} else if (arg.startsWith("-p=")) {
|
|
2995
|
-
provider = arg.split("=")[1];
|
|
2996
|
-
} else if (arg.startsWith("-l=")) {
|
|
2997
|
-
logLevel = arg.split("=")[1];
|
|
2998
|
-
} else {
|
|
2999
|
-
claudeArgs.push(arg);
|
|
3000
|
-
}
|
|
3001
|
-
}
|
|
3002
|
-
wrapperCommand({ logLevel, connect, provider, port, claudeArgs });
|
|
3003
|
-
} else {
|
|
3004
|
-
runMain(main);
|
|
3005
|
-
}
|
|
2967
|
+
runMain(main);
|
|
3006
2968
|
}
|
|
3007
2969
|
|
|
3008
2970
|
// cli.ts
|