@jcanizalez7/clauxy 0.1.0

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 ADDED
@@ -0,0 +1,153 @@
1
+ # Clauxy
2
+
3
+ **Use Claude Code with your existing AI subscriptions.**
4
+
5
+ [![npm version](https://img.shields.io/npm/v/clauxy.svg)](https://www.npmjs.com/package/clauxy)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ---
9
+
10
+ ## Why Clauxy?
11
+
12
+ Love Claude Code but also have subscriptions to GitHub Copilot, ChatGPT Plus, or Google Gemini?
13
+
14
+ **Clauxy lets you use Claude Code with the AI subscriptions you already have**. It acts as a transparent proxy that translates requests between Claude Code and your preferred provider.
15
+
16
+ - **GitHub Copilot** — Use your Copilot subscription (includes Claude, GPT, and more)
17
+ - **ChatGPT Plus/Pro** — Use your $20/mo ChatGPT subscription
18
+ - **Google Gemini** — Use Gemini models with your Google account
19
+
20
+ No API keys needed. Just authenticate once with OAuth and you're ready to go.
21
+
22
+ ---
23
+
24
+ ## Install
25
+
26
+ ```bash
27
+ npm install -g clauxy
28
+ ```
29
+
30
+ ---
31
+
32
+ ## Quick Start
33
+
34
+ ### 1. Start the proxy
35
+
36
+ ```bash
37
+ clauxy run
38
+ ```
39
+
40
+ First time? Select your provider and authenticate:
41
+
42
+ ```
43
+ ┌ Clauxy - Connect to AI Provider
44
+
45
+ ◆ Select your AI provider
46
+ │ ● GitHub Copilot
47
+ │ ○ ChatGPT Plus/Pro
48
+ │ ○ Google Gemini
49
+
50
+ ```
51
+
52
+ ### 2. Run Claude Code
53
+
54
+ In a new terminal:
55
+
56
+ ```bash
57
+ export ANTHROPIC_BASE_URL="http://localhost:3000"
58
+ export ANTHROPIC_API_KEY="clauxy"
59
+ claude
60
+ ```
61
+
62
+ That's it! Claude Code now uses your selected provider.
63
+
64
+ > **Tip:** Add the exports to your `~/.zshrc` or `~/.bashrc` to make them permanent.
65
+
66
+ ---
67
+
68
+ ## Commands
69
+
70
+ ```bash
71
+ clauxy run # Start the proxy
72
+ clauxy run -c # Switch provider or re-authenticate
73
+ clauxy run --port 3001 # Use a different port
74
+ clauxy model # Configure model mappings
75
+ clauxy auth list # Show configured providers
76
+ ```
77
+
78
+ ---
79
+
80
+ ## Model Mapping
81
+
82
+ Claude Code requests are automatically mapped to your provider's models:
83
+
84
+ | Claude Model | Copilot | ChatGPT | Gemini |
85
+ |--------------|---------|---------|--------|
86
+ | Opus (big) | Claude Sonnet 4 | GPT-5.2 Codex | Gemini 2.5 Pro |
87
+ | Sonnet (mid) | Claude Sonnet 4 | GPT-5.1 Codex Max | Gemini 2.5 Flash |
88
+ | Haiku (small) | Claude Haiku 4.5 | GPT-5.1 Codex Mini | Gemini 2.5 Flash Lite |
89
+
90
+ Customize with `clauxy model` or environment variables:
91
+
92
+ ```bash
93
+ CLAUXY_MODEL_BIG=gpt-4o CLAUXY_MODEL_MID=gpt-4o clauxy run
94
+ ```
95
+
96
+ ---
97
+
98
+ ## How It Works
99
+
100
+ ```
101
+ Claude Code ──Anthropic API──▶ Clauxy ──Provider API──▶ Your Provider
102
+
103
+ OAuth
104
+
105
+ ~/.clauxy/
106
+ ```
107
+
108
+ 1. Clauxy intercepts Claude Code's Anthropic API requests
109
+ 2. Translates them to your provider's format (OpenAI, Gemini, etc.)
110
+ 3. Returns responses in Anthropic format
111
+
112
+ Credentials are stored locally in `~/.clauxy/` with restricted permissions.
113
+
114
+ ---
115
+
116
+ ## Troubleshooting
117
+
118
+ **"Token refresh failed"** or **"Not authenticated"**
119
+ ```bash
120
+ clauxy run -c
121
+ ```
122
+
123
+ **Port already in use**
124
+ ```bash
125
+ clauxy run --port 3001
126
+ ```
127
+ Then update `ANTHROPIC_BASE_URL`.
128
+
129
+ **Reset everything**
130
+ ```bash
131
+ rm -rf ~/.clauxy
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Security
137
+
138
+ - OAuth tokens stored locally with `chmod 600`
139
+ - Tokens auto-refresh, no manual handling
140
+ - No data sent anywhere except your chosen provider
141
+ - Fully open source — [audit the code](https://github.com/jcanizalez/clauxy)
142
+
143
+ ---
144
+
145
+ ## Contributing
146
+
147
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
148
+
149
+ ---
150
+
151
+ ## License
152
+
153
+ MIT