@piceofpentogramm/alterclaude 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +61 -120
  2. package/dist/cli.mjs +17 -10
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -2,59 +2,47 @@
2
2
 
3
3
  Use Claude Code with **any LLM** — not just Claude.
4
4
 
5
- AlterClaude is a fork of Claude Code that adds an OpenAI-compatible provider shim so you can plug in GPT-4o, DeepSeek, Gemini, Llama, Mistral, or any model that speaks the OpenAI chat completions API. It also supports the ChatGPT Codex backend for `codexplan` and `codexspark`, and local inference via [Atomic Chat](https://atomic.chat/) on Apple Silicon.
5
+ AlterClaude это форк [OpenClaude](https://github.com/Gitlawb/openclaude) (который, в свою очередь, форк Claude Code), с дополнительными улучшениями: фиолетовая тема, 3-шаговый мастер настройки провайдера, обновлённый интерфейс.
6
6
 
7
- All of Claude Code's tools work — bash, file read/write/edit, grep, glob, agents, tasks, MCP — just powered by whatever model you choose.
7
+ Все инструменты Claude Code работают — bash, file read/write/edit, grep, glob, agents, tasks, MCP — просто вместо Claude ими управляет любая модель, которую вы выбрали.
8
8
 
9
9
  ---
10
10
 
11
- ## Start Here
11
+ ## Быстрый старт (рекомендуемый)
12
12
 
13
- If you are new to terminals or just want the easiest path, start with the beginner guides:
14
-
15
- - [Non-Technical Setup](docs/non-technical-setup.md)
16
- - [Windows Quick Start](docs/quick-start-windows.md)
17
- - [macOS / Linux Quick Start](docs/quick-start-mac-linux.md)
18
-
19
- If you want source builds, Bun workflows, profile launchers, or full provider examples, use:
20
-
21
- - [Advanced Setup](docs/advanced-setup.md)
22
-
23
- ---
24
-
25
- ## Beginner Install
26
-
27
- For most users, install the npm package:
13
+ Установите пакет и запустите **встроенный мастер настройки** `/provider`:
28
14
 
29
15
  ```bash
30
16
  npm install -g @piceofpentogramm/alterclaude
17
+ alterclaude
31
18
  ```
32
19
 
33
- The package name is `@piceofpentogramm/alterclaude`, but the command you run is:
20
+ Внутри AlterClaude введите:
34
21
 
35
- ```bash
36
- alterclaude
22
+ ```
23
+ /provider
37
24
  ```
38
25
 
39
- If you install via npm and later see `ripgrep not found`, install ripgrep system-wide and confirm `rg --version` works in the same terminal before starting AlterClaude.
26
+ Мастер проведёт вас через настройку: выберите провайдера (OpenAI, OpenRouter, Gemini, Ollama, Codex), введите API-ключ, укажите endpoint и модель. Профиль сохранится автоматически.
40
27
 
41
28
  ---
42
29
 
43
- ## Fastest Setup
30
+ ## Быстрый старт (вручную)
44
31
 
45
- ### Windows PowerShell
32
+ ### OpenRouter
46
33
 
47
- ```powershell
34
+ ```bash
48
35
  npm install -g @piceofpentogramm/alterclaude
49
36
 
50
- $env:CLAUDE_CODE_USE_OPENAI="1"
51
- $env:OPENAI_API_KEY="sk-your-key-here"
52
- $env:OPENAI_MODEL="gpt-4o"
37
+ export CLAUDE_CODE_USE_OPENROUTER=1
38
+ export OPENROUTER_API_KEY=sk-or-your-key-here
53
39
 
54
40
  alterclaude
55
41
  ```
56
42
 
57
- ### macOS / Linux
43
+ Модели по умолчанию: opus → `deepseek/deepseek-v4-pro`, sonnet → `deepseek/deepseek-v4-flash`, haiku → `tencent/hy3-preview`. Переопределить через `OPENROUTER_MODEL`.
44
+
45
+ ### OpenAI
58
46
 
59
47
  ```bash
60
48
  npm install -g @piceofpentogramm/alterclaude
@@ -66,81 +54,51 @@ export OPENAI_MODEL=gpt-4o
66
54
  alterclaude
67
55
  ```
68
56
 
69
- That is enough to start with OpenAI.
70
-
71
- ---
72
-
73
- ### OpenRouter (Fastest)
57
+ ### Windows PowerShell
74
58
 
75
- ```bash
59
+ ```powershell
76
60
  npm install -g @piceofpentogramm/alterclaude
77
61
 
78
- export CLAUDE_CODE_USE_OPENROUTER=1
79
- export OPENROUTER_API_KEY=sk-or-your-key-here
62
+ $env:CLAUDE_CODE_USE_OPENAI="1"
63
+ $env:OPENAI_API_KEY="sk-your-key-here"
64
+ $env:OPENAI_MODEL="gpt-4o"
80
65
 
81
66
  alterclaude
82
67
  ```
83
68
 
84
- Default model: `deepseek/deepseek-v4-flash` (haiku → `tencent/hy3-preview`, sonnet → `deepseek/deepseek-v4-flash`, opus → `deepseek/deepseek-v4-pro`). Override with `OPENROUTER_MODEL`.
85
-
86
69
  ---
87
70
 
88
- ## Choose Your Guide
89
-
90
- ### Beginner
91
-
92
- - Want the easiest setup with copy-paste steps: [Non-Technical Setup](docs/non-technical-setup.md)
93
- - On Windows: [Windows Quick Start](docs/quick-start-windows.md)
94
- - On macOS or Linux: [macOS / Linux Quick Start](docs/quick-start-mac-linux.md)
95
-
96
- ### Advanced
71
+ ## Выберите свой путь
97
72
 
98
- - Want source builds, Bun, local profiles, runtime checks, or more provider choices: [Advanced Setup](docs/advanced-setup.md)
73
+ - **[Non-Technical Setup](docs/non-technical-setup.md)** — самый простой путь, копипаст
74
+ - **[Windows Quick Start](docs/quick-start-windows.md)**
75
+ - **[macOS / Linux Quick Start](docs/quick-start-mac-linux.md)**
76
+ - **[Advanced Setup](docs/advanced-setup.md)** — сборка из исходников, Bun, профили, runtime checks
99
77
 
100
78
  ---
101
79
 
102
- ## Common Beginner Choices
103
-
104
- ### OpenRouter
105
-
106
- Best if you want to use any model through OpenRouter (DeepSeek, OpenAI, Anthropic, Gemini, and 200+ more). Set `CLAUDE_CODE_USE_OPENROUTER=1` and `OPENROUTER_API_KEY`.
107
-
108
- ### OpenAI
109
-
110
- Best default if you already have an OpenAI API key.
111
-
112
- ### Ollama
80
+ ## Что работает
113
81
 
114
- Best if you want to run models locally on your own machine.
82
+ - **Все инструменты**: Bash, FileRead, FileWrite, FileEdit, Glob, Grep, WebFetch, WebSearch, Agent, MCP, LSP, NotebookEdit, Tasks
83
+ - **Стриминг**: токены в реальном времени
84
+ - **Tool calling**: многошаговые цепочки инструментов
85
+ - **Изображения**: base64 и URL для vision-моделей
86
+ - **Slash-команды**: `/commit`, `/review`, `/compact`, `/diff`, `/doctor`, `/provider` и другие
87
+ - **Sub-агенты**: AgentTool порождает под-агентов с тем же провайдером
88
+ - **Память**: персистентная система памяти
115
89
 
116
- ### Codex
90
+ ## Что отличается от Claude Code
117
91
 
118
- Best if you already use the Codex CLI or ChatGPT Codex backend.
92
+ - **Нет thinking mode** Anthropic-специфичный extended thinking отключён
93
+ - **Нет prompt caching** — Anthropic-заголовки кэширования пропущены
94
+ - **Нет beta-фич** — Anthropic beta-заголовки игнорируются
95
+ - **Token limits** — по умолчанию 32K max output, некоторые модели могут снижать
119
96
 
120
97
  ---
121
98
 
122
- ## What Works
99
+ ## Как это работает
123
100
 
124
- - **All tools**: Bash, FileRead, FileWrite, FileEdit, Glob, Grep, WebFetch, WebSearch, Agent, MCP, LSP, NotebookEdit, Tasks
125
- - **Streaming**: Real-time token streaming
126
- - **Tool calling**: Multi-step tool chains (the model calls tools, gets results, continues)
127
- - **Images**: Base64 and URL images passed to vision models
128
- - **Slash commands**: /commit, /review, /compact, /diff, /doctor, etc.
129
- - **Sub-agents**: AgentTool spawns sub-agents using the same provider
130
- - **Memory**: Persistent memory system
131
-
132
- ## What's Different
133
-
134
- - **No thinking mode**: Anthropic's extended thinking is disabled (OpenAI models use different reasoning)
135
- - **No prompt caching**: Anthropic-specific cache headers are skipped
136
- - **No beta features**: Anthropic-specific beta headers are ignored
137
- - **Token limits**: Defaults to 32K max output — some models may cap lower, which is handled gracefully
138
-
139
- ---
140
-
141
- ## How It Works
142
-
143
- The shim (`src/services/api/openaiShim.ts`) sits between Claude Code and the LLM API:
101
+ Прослойка (`src/services/api/openaiShim.ts`) находится между Claude Code и API LLM:
144
102
 
145
103
  ```
146
104
  Claude Code Tool System
@@ -149,67 +107,50 @@ Claude Code Tool System
149
107
  Anthropic SDK interface (duck-typed)
150
108
  |
151
109
  v
152
- openaiShim.ts <-- translates formats
110
+ openaiShim.ts <-- переводит форматы
153
111
  |
154
112
  v
155
113
  OpenAI Chat Completions API
156
114
  |
157
115
  v
158
- Any compatible model
116
+ Любая совместимая модель
159
117
  ```
160
118
 
161
- It translates:
119
+ Конвертация:
162
120
  - Anthropic message blocks → OpenAI messages
163
121
  - Anthropic tool_use/tool_result → OpenAI function calls
164
122
  - OpenAI SSE streaming → Anthropic stream events
165
123
  - Anthropic system prompt arrays → OpenAI system messages
166
124
 
167
- The rest of Claude Code doesn't know it's talking to a different model.
168
-
169
- ---
170
-
171
- ## Model Quality Notes
172
-
173
- Not all models are equal at agentic tool use. Here's a rough guide:
174
-
175
- | Model | Tool Calling | Code Quality | Speed |
176
- |-------|-------------|-------------|-------|
177
- | GPT-4o | Excellent | Excellent | Fast |
178
- | DeepSeek-V3 | Great | Great | Fast |
179
- | Gemini 2.0 Flash | Great | Good | Very Fast |
180
- | Llama 3.3 70B | Good | Good | Medium |
181
- | Mistral Large | Good | Good | Fast |
182
- | GPT-4o-mini | Good | Good | Very Fast |
183
- | Qwen 2.5 72B | Good | Good | Medium |
184
- | Smaller models (<7B) | Limited | Limited | Very Fast |
185
-
186
- For best results, use models with strong function/tool calling support.
125
+ Остальной Claude Code не знает, что говорит с другой моделью.
187
126
 
188
127
  ---
189
128
 
190
- ## Files Changed from Original
129
+ ## Модели и качество
191
130
 
192
- ```
193
- src/services/api/openaiShim.ts — NEW: OpenAI-compatible API shim (724 lines)
194
- src/services/api/client.ts — Routes to shim when CLAUDE_CODE_USE_OPENAI=1
195
- src/utils/model/providers.ts — Added 'openai' provider type
196
- src/utils/model/configs.ts — Added openai model mappings
197
- src/utils/model/model.ts — Respects OPENAI_MODEL for defaults
198
- src/utils/auth.ts — Recognizes OpenAI as valid 3P provider
199
- ```
131
+ | Модель | Tool Calling | Качество кода | Скорость |
132
+ |--------|-------------|---------------|----------|
133
+ | GPT-4o | Отлично | Отлично | Быстро |
134
+ | DeepSeek-V3 | Отлично | Отлично | Быстро |
135
+ | Gemini 2.0 Flash | Отлично | Хорошо | Очень быстро |
136
+ | Llama 3.3 70B | Хорошо | Хорошо | Средне |
137
+ | Mistral Large | Хорошо | Хорошо | Быстро |
138
+ | GPT-4o-mini | Хорошо | Хорошо | Очень быстро |
139
+ | Qwen 2.5 72B | Хорошо | Хорошо | Средне |
140
+ | Маленькие модели (<7B) | Ограниченно | Ограниченно | Очень быстро |
200
141
 
201
- 6 files changed. 786 lines added. Zero dependencies added.
142
+ Для лучших результатов используйте модели с сильной поддержкой function/tool calling.
202
143
 
203
144
  ---
204
145
 
205
146
  ## Origin
206
147
 
207
- This is a fork of Claude Code, which originally became publicly accessible through an npm source map exposure on March 31, 2026.
148
+ AlterClaude форк [OpenClaude](https://github.com/Gitlawb/openclaude), который, в свою очередь, форк Claude Code, ставшего публично доступным через экспозицию npm source map 31 марта 2026.
208
149
 
209
- The original Claude Code source is the property of Anthropic. This repository is not affiliated with or endorsed by Anthropic.
150
+ Оригинальный Claude Code собственность Anthropic. Этот репозиторий не аффилирован с Anthropic и не одобрен ими.
210
151
 
211
152
  ---
212
153
 
213
154
  ## License
214
155
 
215
- This repository is provided for educational and research purposes. The original source code is subject to Anthropic's terms. The OpenAI shim additions are public domain.
156
+ MIT
package/dist/cli.mjs CHANGED
@@ -120164,7 +120164,7 @@ function printStartupScreen() {
120164
120164
  const sLen = ` ● ${sL} Ready — type /help to begin`.length;
120165
120165
  out.push(boxRow(sRow, W2, sLen));
120166
120166
  out.push(`${rgb(...BORDER)}╚${"═".repeat(W2 - 2)}╝${RESET}`);
120167
- out.push(` ${DIM}${rgb(...DIMCOL)}alterclaude ${RESET}${rgb(...ACCENT)}v${"0.1.0"}${RESET}`);
120167
+ out.push(` ${DIM}${rgb(...DIMCOL)}alterclaude ${RESET}${rgb(...ACCENT)}v${"0.1.2"}${RESET}`);
120168
120168
  out.push("");
120169
120169
  process.stdout.write(out.join(`
120170
120170
  `) + `
@@ -358918,7 +358918,7 @@ function getAnthropicEnvMetadata() {
358918
358918
  function getBuildAgeMinutes() {
358919
358919
  if (false)
358920
358920
  ;
358921
- const buildTime = new Date("2026-05-29T15:02:15.447Z").getTime();
358921
+ const buildTime = new Date("2026-05-29T15:25:34.035Z").getTime();
358922
358922
  if (isNaN(buildTime))
358923
358923
  return;
358924
358924
  return Math.floor((Date.now() - buildTime) / 60000);
@@ -441481,6 +441481,13 @@ function buildSavedProfileSummary(profile, env4) {
441481
441481
  modelLabel: getSafeDisplayValue(env4.OPENAI_MODEL, process.env, env4),
441482
441482
  endpointLabel: getSafeDisplayValue(env4.OPENAI_BASE_URL, process.env, env4)
441483
441483
  };
441484
+ case "openrouter":
441485
+ return {
441486
+ providerLabel: "OpenRouter",
441487
+ modelLabel: getSafeDisplayValue(env4.OPENROUTER_MODEL ?? DEFAULT_OPENROUTER_MODEL, process.env, env4),
441488
+ endpointLabel: getSafeDisplayValue(env4.OPENROUTER_BASE_URL ?? OPENROUTER_BASE_URL, process.env, env4),
441489
+ credentialLabel: maskSecretForDisplay(env4.OPENROUTER_API_KEY) !== undefined ? "configured" : undefined
441490
+ };
441484
441491
  case "openai":
441485
441492
  default:
441486
441493
  return {
@@ -451503,7 +451510,7 @@ var init_bridge_kick = __esm(() => {
451503
451510
  var call58 = async () => {
451504
451511
  return {
451505
451512
  type: "text",
451506
- value: `${"99.0.0"} (built ${"2026-05-29T15:02:15.447Z"})`
451513
+ value: `${"99.0.0"} (built ${"2026-05-29T15:25:34.035Z"})`
451507
451514
  };
451508
451515
  }, version2, version_default;
451509
451516
  var init_version = __esm(() => {
@@ -524644,7 +524651,7 @@ function WelcomeV2() {
524644
524651
  dimColor: true,
524645
524652
  children: [
524646
524653
  "v",
524647
- "0.1.0",
524654
+ "0.1.2",
524648
524655
  " "
524649
524656
  ]
524650
524657
  }, undefined, true, undefined, this)
@@ -524844,7 +524851,7 @@ function WelcomeV2() {
524844
524851
  dimColor: true,
524845
524852
  children: [
524846
524853
  "v",
524847
- "0.1.0",
524854
+ "0.1.2",
524848
524855
  " "
524849
524856
  ]
524850
524857
  }, undefined, true, undefined, this)
@@ -525070,7 +525077,7 @@ function AppleTerminalWelcomeV2(t0) {
525070
525077
  dimColor: true,
525071
525078
  children: [
525072
525079
  "v",
525073
- "0.1.0",
525080
+ "0.1.2",
525074
525081
  " "
525075
525082
  ]
525076
525083
  }, undefined, true, undefined, this);
@@ -525324,7 +525331,7 @@ function AppleTerminalWelcomeV2(t0) {
525324
525331
  dimColor: true,
525325
525332
  children: [
525326
525333
  "v",
525327
- "0.1.0",
525334
+ "0.1.2",
525328
525335
  " "
525329
525336
  ]
525330
525337
  }, undefined, true, undefined, this);
@@ -545872,7 +545879,7 @@ Usage: claude --remote "your task description"`, () => gracefulShutdown(1));
545872
545879
  pendingHookMessages
545873
545880
  }, renderAndRun);
545874
545881
  }
545875
- }).version("0.1.0 (Alter Claude)", "-v, --version", "Output the version number");
545882
+ }).version("0.1.2 (Alter Claude)", "-v, --version", "Output the version number");
545876
545883
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
545877
545884
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
545878
545885
  if (canUserConfigureAdvisor()) {
@@ -546452,7 +546459,7 @@ function validateProviderEnvOrExit() {
546452
546459
  async function main2() {
546453
546460
  const args = process.argv.slice(2);
546454
546461
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
546455
- console.log(`${"0.1.0"} (Alter Claude)`);
546462
+ console.log(`${"0.1.2"} (Alter Claude)`);
546456
546463
  return;
546457
546464
  }
546458
546465
  {
@@ -546564,4 +546571,4 @@ async function main2() {
546564
546571
  }
546565
546572
  main2();
546566
546573
 
546567
- //# debugId=A281A1585FC28D9664756E2164756E21
546574
+ //# debugId=80A0EDD9FC28F08A64756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piceofpentogramm/alterclaude",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Claude Code opened to any LLM — OpenAI, Gemini, DeepSeek, Ollama, and 200+ models",
5
5
  "type": "module",
6
6
  "bin": {