@oneciel-ai/claude-any 0.1.24
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/LICENSE +22 -0
- package/NOTICE +9 -0
- package/README.md +435 -0
- package/claude-any-menu.py +1851 -0
- package/claude-any-tool-guard.py +440 -0
- package/claude_any.py +6039 -0
- package/docs/README.ja.md +372 -0
- package/docs/README.ko.md +373 -0
- package/docs/README.zh.md +352 -0
- package/docs/assets/claude-any-base-url.en.png +0 -0
- package/docs/assets/claude-any-base-url.ja.png +0 -0
- package/docs/assets/claude-any-base-url.ko.png +0 -0
- package/docs/assets/claude-any-base-url.png +0 -0
- package/docs/assets/claude-any-base-url.zh.png +0 -0
- package/docs/assets/claude-any-demo.en.gif +0 -0
- package/docs/assets/claude-any-demo.en.mp4 +0 -0
- package/docs/assets/claude-any-demo.gif +0 -0
- package/docs/assets/claude-any-demo.ja.gif +0 -0
- package/docs/assets/claude-any-demo.ja.mp4 +0 -0
- package/docs/assets/claude-any-demo.ko.gif +0 -0
- package/docs/assets/claude-any-demo.ko.mp4 +0 -0
- package/docs/assets/claude-any-demo.mp4 +0 -0
- package/docs/assets/claude-any-demo.zh.gif +0 -0
- package/docs/assets/claude-any-demo.zh.mp4 +0 -0
- package/docs/assets/claude-any-main.en.png +0 -0
- package/docs/assets/claude-any-main.ja.png +0 -0
- package/docs/assets/claude-any-main.ko.png +0 -0
- package/docs/assets/claude-any-main.png +0 -0
- package/docs/assets/claude-any-main.zh.png +0 -0
- package/docs/assets/claude-any-model.en.png +0 -0
- package/docs/assets/claude-any-model.ja.png +0 -0
- package/docs/assets/claude-any-model.ko.png +0 -0
- package/docs/assets/claude-any-model.png +0 -0
- package/docs/assets/claude-any-model.zh.png +0 -0
- package/docs/assets/claude-any-nvidia-nim.gif +0 -0
- package/docs/assets/claude-any-ollama-cloud.gif +0 -0
- package/docs/assets/claude-any-options.en.png +0 -0
- package/docs/assets/claude-any-options.ja.png +0 -0
- package/docs/assets/claude-any-options.ko.png +0 -0
- package/docs/assets/claude-any-options.png +0 -0
- package/docs/assets/claude-any-options.zh.png +0 -0
- package/docs/assets/claude-any-provider.en.png +0 -0
- package/docs/assets/claude-any-provider.ja.png +0 -0
- package/docs/assets/claude-any-provider.ko.png +0 -0
- package/docs/assets/claude-any-provider.png +0 -0
- package/docs/assets/claude-any-provider.zh.png +0 -0
- package/docs/assets/claude-any-test.en.png +0 -0
- package/docs/assets/claude-any-test.ja.png +0 -0
- package/docs/assets/claude-any-test.ko.png +0 -0
- package/docs/assets/claude-any-test.png +0 -0
- package/docs/assets/claude-any-test.zh.png +0 -0
- package/docs/github-descriptions.md +235 -0
- package/docs/manual.md +496 -0
- package/install.ps1 +24 -0
- package/install.sh +19 -0
- package/npm-bin/claude-any-stop.js +6 -0
- package/npm-bin/claude-any.js +5 -0
- package/npm-bin/claude-anyctl.js +5 -0
- package/npm-bin/run-claude-any.js +51 -0
- package/package.json +45 -0
package/docs/manual.md
ADDED
|
@@ -0,0 +1,496 @@
|
|
|
1
|
+
# Claude Any Manual
|
|
2
|
+
|
|
3
|
+
Claude Any is a pre-launch configuration layer for Claude Code. It lets you
|
|
4
|
+
choose a provider, model, base URL, API key, and provider options before Claude
|
|
5
|
+
Code starts, while passing normal Claude Code arguments through unchanged.
|
|
6
|
+
|
|
7
|
+
Credits: One Ciel LLC
|
|
8
|
+
|
|
9
|
+
Current version: `0.1.22`
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
Requirements:
|
|
14
|
+
|
|
15
|
+
- Python 3.10+
|
|
16
|
+
- Claude Code installed as `claude`
|
|
17
|
+
- Node/npm only if you enable optional MCP web tooling
|
|
18
|
+
|
|
19
|
+
Current install from GitHub:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm install -g https://github.com/OneCielAI/claude-any.git
|
|
23
|
+
claude-any
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Source install:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
git clone https://github.com/OneCielAI/claude-any.git
|
|
30
|
+
cd claude-any
|
|
31
|
+
./install.sh
|
|
32
|
+
claude-any
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Windows PowerShell source install:
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
git clone https://github.com/OneCielAI/claude-any.git
|
|
39
|
+
cd claude-any
|
|
40
|
+
.\install.ps1
|
|
41
|
+
claude-any
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Registry install, after the first npm publish:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npm install -g @oneciel-ai/claude-any
|
|
48
|
+
claude-any
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Upgrade:
|
|
52
|
+
|
|
53
|
+
```sh
|
|
54
|
+
# GitHub install, current recommended path
|
|
55
|
+
npm install -g https://github.com/OneCielAI/claude-any.git --force
|
|
56
|
+
claude-any version
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
To make `npm update -g @oneciel-ai/claude-any` work, the package must be
|
|
60
|
+
published to the public npm registry under the same package name:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
npm login
|
|
64
|
+
npm publish --access public
|
|
65
|
+
npm install -g @oneciel-ai/claude-any
|
|
66
|
+
npm update -g @oneciel-ai/claude-any
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
For automated publishing, create an npm automation token, save it as the
|
|
70
|
+
repository secret `NPM_TOKEN`, then publish a GitHub Release or run the
|
|
71
|
+
`Publish to npm` workflow manually.
|
|
72
|
+
|
|
73
|
+
Versioning uses SemVer. For future releases, bump `version` in `package.json`,
|
|
74
|
+
create a matching Git tag such as `v0.1.1`, and publish a GitHub Release to
|
|
75
|
+
trigger the npm publish workflow. After registry publication, the normal
|
|
76
|
+
registry upgrade command will be:
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
npm update -g @oneciel-ai/claude-any
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
macOS has not been fully tested by the maintainer yet. The project uses
|
|
84
|
+
portable Python and shell wrappers, so it is expected to work; please report
|
|
85
|
+
issues if you find them.
|
|
86
|
+
|
|
87
|
+
## Interactive Menu
|
|
88
|
+
|
|
89
|
+
Run:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
claude-any
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The menu appears before Claude Code starts. Use arrow keys to move and Enter to
|
|
96
|
+
edit or select:
|
|
97
|
+
|
|
98
|
+
- Language: English, Korean, Japanese, Chinese.
|
|
99
|
+
- Provider: Anthropic, Ollama, Ollama Cloud, vLLM, NVIDIA hosted, self-hosted NIM.
|
|
100
|
+
- API key: enter only when the selected provider needs one.
|
|
101
|
+
- Base URL: provider-aware default or custom endpoint.
|
|
102
|
+
- Model: provider model picker when available, custom input otherwise.
|
|
103
|
+
- Options: provider-specific generation, timeout, and preset settings.
|
|
104
|
+
- Compatibility test: checks a plain text response, a required `tool_use`, and
|
|
105
|
+
a `tool_result` follow-up before launching Claude Code.
|
|
106
|
+
- Launch Claude Code: starts Claude Code with the selected configuration.
|
|
107
|
+
|
|
108
|
+
The lower status area shows connection checks, API-key state, provider notes,
|
|
109
|
+
and compatibility-test results.
|
|
110
|
+
For vLLM and self-hosted NIM, the compatibility test also reads `/v1/models`
|
|
111
|
+
when available and prints the runtime `max_model_len` next to Claude Any's
|
|
112
|
+
configured `context_window` and `max_output_tokens`.
|
|
113
|
+
If the runtime model reports one context size but Claude Any is configured for
|
|
114
|
+
another, the test output shows both values so you can fix either the server
|
|
115
|
+
startup flags or the client preset.
|
|
116
|
+
|
|
117
|
+
### LLM Option Presets
|
|
118
|
+
|
|
119
|
+
Open `LLM options`, then select `Apply preset` to apply a provider-aware preset
|
|
120
|
+
without editing every parameter manually. Claude Any currently includes:
|
|
121
|
+
|
|
122
|
+
- Balanced Claude Code: stable 4K-output default for normal Claude Code use.
|
|
123
|
+
- Coding deterministic: lower randomness for edits, scripts, and code review.
|
|
124
|
+
- Fast short tasks: shorter output and timeout for quick background jobs.
|
|
125
|
+
- Long context 65K: 65K context target with a 4K output reserve.
|
|
126
|
+
- Large output/report: 8K output for summaries and reports.
|
|
127
|
+
- Reasoning model: longer timeout and reasoning-friendly sampling.
|
|
128
|
+
|
|
129
|
+
The recommended preset is chosen from the current provider and model name. For
|
|
130
|
+
example, `coder` models prefer the coding preset, `r1`/`thinking` models prefer
|
|
131
|
+
the reasoning preset, and vLLM/NIM models configured for 65K context prefer the
|
|
132
|
+
long-context preset. For vLLM native mode, the server must still be launched
|
|
133
|
+
with a matching `--max-model-len`; Claude Any cannot raise the server-side
|
|
134
|
+
context limit from the client.
|
|
135
|
+
|
|
136
|
+
## Provider Setup
|
|
137
|
+
|
|
138
|
+
### Anthropic
|
|
139
|
+
|
|
140
|
+
Anthropic uses native Claude Code behavior. You can either log in through
|
|
141
|
+
Claude Code or use an Anthropic API key.
|
|
142
|
+
|
|
143
|
+
- Claude Code docs: https://docs.anthropic.com/en/docs/claude-code
|
|
144
|
+
- Claude Console API keys: https://console.anthropic.com/settings/keys
|
|
145
|
+
|
|
146
|
+
### Ollama
|
|
147
|
+
|
|
148
|
+
Local Ollama normally does not need an API key. Use a local base URL such as:
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
http://127.0.0.1:11434
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Ollama also provides Anthropic Messages API compatibility for tools such as
|
|
155
|
+
Claude Code. If you use `:cloud` models through a local Ollama host, sign in on
|
|
156
|
+
that Ollama host:
|
|
157
|
+
|
|
158
|
+
```sh
|
|
159
|
+
ollama signin
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Links:
|
|
163
|
+
|
|
164
|
+
- Ollama Anthropic compatibility: https://docs.ollama.com/api/anthropic-compatibility
|
|
165
|
+
- Ollama authentication: https://docs.ollama.com/api/authentication
|
|
166
|
+
|
|
167
|
+
### Ollama Cloud
|
|
168
|
+
|
|
169
|
+
Ollama Cloud is for direct calls to `https://ollama.com/api`. It requires an
|
|
170
|
+
Ollama API key. Cloud model names must end in `:cloud`.
|
|
171
|
+
|
|
172
|
+
Links:
|
|
173
|
+
|
|
174
|
+
- Ollama Cloud: https://ollama.com/cloud
|
|
175
|
+
- Ollama API keys: https://ollama.com/settings/keys
|
|
176
|
+
- Ollama sign in: https://ollama.com/signin
|
|
177
|
+
|
|
178
|
+
### vLLM
|
|
179
|
+
|
|
180
|
+
Use a vLLM server that exposes the Anthropic Messages API used by Claude Code.
|
|
181
|
+
The base URL should be the server root, for example:
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
http://127.0.0.1:8000
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Claude Any and Claude Code will call `/v1/messages` under that base URL. Use an
|
|
188
|
+
API key only if your vLLM server is configured to require one.
|
|
189
|
+
|
|
190
|
+
For Claude Code, vLLM tool calling must be started with a parser that matches
|
|
191
|
+
the model family. A server can answer text requests and still fail Claude Code
|
|
192
|
+
if `--tool-call-parser` is wrong. For Qwen3-Coder, use `qwen3_xml`:
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
vllm serve Qwen/Qwen3-Coder-30B-A3B-Instruct \
|
|
196
|
+
--host 0.0.0.0 \
|
|
197
|
+
--port 8000 \
|
|
198
|
+
--served-model-name qwen3-coder-30b \
|
|
199
|
+
--max-model-len 65536 \
|
|
200
|
+
--enable-auto-tool-choice \
|
|
201
|
+
--tool-call-parser qwen3_xml
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Hermes-style models and some older Qwen tool templates may use `hermes`
|
|
205
|
+
instead, but do not assume `hermes` is correct for every Qwen model. Run
|
|
206
|
+
`claude-any test` after changing the parser; the test now checks text,
|
|
207
|
+
`tool_use`, and `tool_result`.
|
|
208
|
+
|
|
209
|
+
Links:
|
|
210
|
+
|
|
211
|
+
- vLLM Claude Code integration: https://docs.vllm.ai/en/latest/serving/integrations/claude_code/
|
|
212
|
+
- vLLM tool calling: https://docs.vllm.ai/en/stable/features/tool_calling/
|
|
213
|
+
- vLLM GitHub: https://github.com/vllm-project/vllm
|
|
214
|
+
|
|
215
|
+
### NVIDIA Hosted NIM
|
|
216
|
+
|
|
217
|
+
NVIDIA hosted models are available through NVIDIA API Catalog. Claude Any uses a
|
|
218
|
+
compatibility route for hosted models and requires an NVIDIA API key.
|
|
219
|
+
|
|
220
|
+
Links:
|
|
221
|
+
|
|
222
|
+
- NVIDIA API Catalog: https://build.nvidia.com/
|
|
223
|
+
- API Catalog quickstart: https://docs.api.nvidia.com/nim/docs/api-quickstart
|
|
224
|
+
|
|
225
|
+
### Self-Hosted NVIDIA NIM
|
|
226
|
+
|
|
227
|
+
Self-hosted NIM for LLMs can expose an Anthropic-compatible `/v1/messages`
|
|
228
|
+
endpoint. Use the NIM host base URL, not the OpenAI chat-completions URL.
|
|
229
|
+
|
|
230
|
+
Links:
|
|
231
|
+
|
|
232
|
+
- Claude Code with NIM: https://docs.nvidia.com/nim/large-language-models/latest/ai-assistant-integrations/claude-code.html
|
|
233
|
+
- NIM for LLMs getting started: https://docs.nvidia.com/nim/large-language-models/1.14.0/getting-started.html
|
|
234
|
+
- NGC personal keys: https://org.ngc.nvidia.com/setup/personal-keys
|
|
235
|
+
|
|
236
|
+
## Headless Usage
|
|
237
|
+
|
|
238
|
+
Claude Any options use the `--ca-*` prefix so they do not collide with Claude
|
|
239
|
+
Code flags. All other arguments pass through to Claude Code.
|
|
240
|
+
|
|
241
|
+
Headless mode is for launching Claude Code directly without opening the
|
|
242
|
+
pre-launch menu. It is useful for SSH sessions, scripts, scheduled jobs,
|
|
243
|
+
CI-like automation, and remote servers. Any `--ca-*` option updates Claude
|
|
244
|
+
Any's saved configuration first, skips the menu, starts the required
|
|
245
|
+
router/proxy services, then immediately executes Claude Code with the remaining
|
|
246
|
+
arguments.
|
|
247
|
+
|
|
248
|
+
Basic pattern:
|
|
249
|
+
|
|
250
|
+
```sh
|
|
251
|
+
claude-any --ca-provider PROVIDER --ca-model MODEL [claude-code args...]
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
Direct Claude Code launch examples:
|
|
255
|
+
|
|
256
|
+
```sh
|
|
257
|
+
# Open an interactive Claude Code session immediately with the saved model.
|
|
258
|
+
claude-any --ca-provider ollama-cloud --ca-model glm-5.1
|
|
259
|
+
|
|
260
|
+
# Run one non-interactive Claude Code prompt and print text output.
|
|
261
|
+
claude-any \
|
|
262
|
+
--ca-provider ollama-cloud \
|
|
263
|
+
--ca-model glm-5.1 \
|
|
264
|
+
--ca-api-key-env OLLAMA_API_KEY \
|
|
265
|
+
--ca-no-update-check \
|
|
266
|
+
-p "Reply with OK only." \
|
|
267
|
+
--output-format text
|
|
268
|
+
|
|
269
|
+
# Use the current saved Claude Any provider/model and pass args straight to Claude Code.
|
|
270
|
+
claude-any --ca-no-update-check -p "Summarize the current project." --output-format text
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
In these examples, `claude-any` is not just configuring settings. It starts
|
|
274
|
+
Claude Code in the same command. The `--ca-*` flags are consumed by Claude Any;
|
|
275
|
+
the prompt flags such as `-p` and `--output-format` are passed through to
|
|
276
|
+
Claude Code.
|
|
277
|
+
|
|
278
|
+
Provider setup examples:
|
|
279
|
+
|
|
280
|
+
```sh
|
|
281
|
+
# Local Ollama
|
|
282
|
+
claude-any \
|
|
283
|
+
--ca-provider ollama \
|
|
284
|
+
--ca-base-url http://127.0.0.1:11434 \
|
|
285
|
+
--ca-model qwen3-coder \
|
|
286
|
+
--ca-no-update-check \
|
|
287
|
+
-p "Reply with OK only." --output-format text
|
|
288
|
+
|
|
289
|
+
# Ollama Cloud, reading the key from an environment variable
|
|
290
|
+
export OLLAMA_API_KEY="..."
|
|
291
|
+
claude-any \
|
|
292
|
+
--ca-provider ollama-cloud \
|
|
293
|
+
--ca-api-key-env OLLAMA_API_KEY \
|
|
294
|
+
--ca-model glm-5.1 \
|
|
295
|
+
-p "Summarize this repository." --output-format text
|
|
296
|
+
|
|
297
|
+
# vLLM Anthropic-compatible endpoint
|
|
298
|
+
claude-any \
|
|
299
|
+
--ca-provider vllm \
|
|
300
|
+
--ca-base-url http://127.0.0.1:8000 \
|
|
301
|
+
--ca-model my-model \
|
|
302
|
+
--ca-context-window 65536 \
|
|
303
|
+
--ca-max-output-tokens 4096
|
|
304
|
+
|
|
305
|
+
# NVIDIA hosted API Catalog through the local compatibility proxy
|
|
306
|
+
export NVIDIA_API_KEY="..."
|
|
307
|
+
claude-any \
|
|
308
|
+
--ca-provider nvidia-hosted \
|
|
309
|
+
--ca-api-key-env NVIDIA_API_KEY \
|
|
310
|
+
--ca-model moonshotai/kimi-k2.6 \
|
|
311
|
+
--ca-request-timeout-ms 1800000
|
|
312
|
+
|
|
313
|
+
# Self-hosted NIM Anthropic-compatible endpoint
|
|
314
|
+
claude-any \
|
|
315
|
+
--ca-provider self-hosted-nim \
|
|
316
|
+
--ca-base-url http://127.0.0.1:8000 \
|
|
317
|
+
--ca-model model \
|
|
318
|
+
--ca-api-key not-used
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
Passing Claude Code arguments:
|
|
322
|
+
|
|
323
|
+
```sh
|
|
324
|
+
# Everything not recognized as --ca-* is passed through to Claude Code.
|
|
325
|
+
claude-any --ca-provider ollama-cloud -p "Write a short status report." --output-format text
|
|
326
|
+
|
|
327
|
+
# Use -- when you want to visually separate Claude Any setup from Claude args.
|
|
328
|
+
claude-any --ca-provider ollama-cloud --ca-model glm-5.1 -- -p "Reply OK" --output-format text
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Compatibility tests without the menu:
|
|
332
|
+
|
|
333
|
+
```sh
|
|
334
|
+
# Auto mode: fast default. NVIDIA hosted uses a text-only quick test.
|
|
335
|
+
claude-any test 60 auto
|
|
336
|
+
|
|
337
|
+
# Smoke mode: text response plus required tool_use.
|
|
338
|
+
claude-any test 120 smoke
|
|
339
|
+
|
|
340
|
+
# Full mode: text, tool_use, and tool_result round trip.
|
|
341
|
+
claude-any test 180 full
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Service cleanup and status:
|
|
345
|
+
|
|
346
|
+
```sh
|
|
347
|
+
claude-any status
|
|
348
|
+
claude-any stop
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
Common Claude Any setup flags:
|
|
352
|
+
|
|
353
|
+
| Flag | Purpose |
|
|
354
|
+
| --- | --- |
|
|
355
|
+
| `--ca-provider PROVIDER` | Set provider and skip the menu for this launch. |
|
|
356
|
+
| `--ca-model MODEL` | Set the current provider model. |
|
|
357
|
+
| `--ca-base-url URL` | Set the current provider base URL. |
|
|
358
|
+
| `--ca-api-key KEY` | Store the current provider API key directly. Prefer env vars for scripts. |
|
|
359
|
+
| `--ca-api-key-env ENVVAR` | Store the current provider API key from an environment variable. |
|
|
360
|
+
| `--ca-set-api-key PROVIDER KEY` | Store a key for a specific provider. |
|
|
361
|
+
| `--ca-set-api-key-env PROVIDER ENVVAR` | Store a provider key from an environment variable. |
|
|
362
|
+
| `--ca-max-output-tokens VALUE` | Set provider output-token cap. |
|
|
363
|
+
| `--ca-context-window VALUE` | Set provider/router context-window cap where supported. |
|
|
364
|
+
| `--ca-request-timeout-ms VALUE` | Set upstream request timeout in milliseconds. |
|
|
365
|
+
| `--ca-ollama-num-ctx VALUE` | Set Ollama `num_ctx`. |
|
|
366
|
+
| `--ca-ollama-ctx-range MIN MAX` | Set Ollama auto context range. |
|
|
367
|
+
| `--ca-ollama-option KEY=VALUE` | Set an Ollama option such as `temperature=0.3`. |
|
|
368
|
+
| `--ca-web-search` / `--ca-no-web-search` | Force-enable or disable web-search MCP for this launch. |
|
|
369
|
+
| `--ca-disable-skills` / `--ca-enable-skills` | Control Claude Code skills for this launch. |
|
|
370
|
+
| `--ca-no-update-check` | Skip the Claude Code update check. |
|
|
371
|
+
| `--ca-status` | Print status and exit. |
|
|
372
|
+
| `--ca-stop` | Stop managed router/proxy services and exit. |
|
|
373
|
+
|
|
374
|
+
Notes for automation:
|
|
375
|
+
|
|
376
|
+
- `--ca-api-key-env` avoids putting secrets directly in shell history.
|
|
377
|
+
- `claude-any stop` is safe to run before scripted tests to remove stale
|
|
378
|
+
router/proxy processes.
|
|
379
|
+
- Use `claude-any test 60 auto` for a quick readiness check and reserve
|
|
380
|
+
`claude-any test 180 full` for deeper provider validation.
|
|
381
|
+
- Headless flags persist in `~/.config/claude-any/config.json`, so the next
|
|
382
|
+
interactive launch starts from the same provider/model settings.
|
|
383
|
+
|
|
384
|
+
## Recommended Uses
|
|
385
|
+
|
|
386
|
+
Claude Any is a good fit for slower background work where steady throughput
|
|
387
|
+
matters more than instant interaction:
|
|
388
|
+
|
|
389
|
+
- Docker host maintenance and cleanup.
|
|
390
|
+
- Windows, Linux, and remote server administration.
|
|
391
|
+
- Finding unused files and turning cleanup into repeatable scripts.
|
|
392
|
+
- Periodic security checklists and configuration review.
|
|
393
|
+
- Log review for failed sign-in attempts, exposed services, suspicious access,
|
|
394
|
+
and other intrusion indicators.
|
|
395
|
+
- Noisy Windows Event Log review, including possible virus, ransomware,
|
|
396
|
+
brute-force, and remote-access intrusion attempts.
|
|
397
|
+
- Drafting operational reports from command output and logs.
|
|
398
|
+
- Turning requests like "install PostgreSQL in a Docker container" or "analyze
|
|
399
|
+
today's Docker logs and email me a report" into commands, scripts, scheduled
|
|
400
|
+
jobs, and summaries.
|
|
401
|
+
|
|
402
|
+
### Tiered Supervision Pattern
|
|
403
|
+
|
|
404
|
+
A practical operating pattern is to combine models by cost and capability:
|
|
405
|
+
|
|
406
|
+
- Small or cheaper models watch logs, detect possible issues, and prepare first
|
|
407
|
+
summaries.
|
|
408
|
+
- A larger model reviews the findings, writes policy, decides priority, and
|
|
409
|
+
plans the response.
|
|
410
|
+
- Small models then execute routine commands, cleanup, reporting, or scheduled
|
|
411
|
+
checks under the larger model's supervision.
|
|
412
|
+
|
|
413
|
+
It is not a replacement for dedicated monitoring, EDR, SIEM, or security
|
|
414
|
+
products. It is useful as an operator assistant that can inspect logs, propose
|
|
415
|
+
scripts, summarize findings, and produce readable reports while preserving
|
|
416
|
+
premium Claude/Codex tokens for harder work.
|
|
417
|
+
Used this way, Claude Any can become a free or low-cost system security watcher
|
|
418
|
+
for routine checks and summaries.
|
|
419
|
+
|
|
420
|
+
## Web Search
|
|
421
|
+
|
|
422
|
+
Non-native providers may not have Claude Code's remote web-search capability.
|
|
423
|
+
Claude Any can wire separate MCP tools for DuckDuckGo search and URL fetch so
|
|
424
|
+
agents can still perform web research through explicit tools.
|
|
425
|
+
|
|
426
|
+
## Service Lifecycle
|
|
427
|
+
|
|
428
|
+
Claude Any starts provider helpers on demand rather than keeping every helper
|
|
429
|
+
alive permanently.
|
|
430
|
+
|
|
431
|
+
- `claude-any stop` stops managed Claude Any router and NVIDIA proxy processes.
|
|
432
|
+
- When launching Claude Code, Claude Any starts only the services required by
|
|
433
|
+
the selected provider.
|
|
434
|
+
- Ollama and Ollama Cloud router mode use the Claude Any router on
|
|
435
|
+
`127.0.0.1:8799`.
|
|
436
|
+
- NVIDIA hosted router mode uses the Claude Any router on `127.0.0.1:8799` and
|
|
437
|
+
starts `nvd-claude-proxy` on `127.0.0.1:8788` only when that provider needs it.
|
|
438
|
+
- For clean provider-switch testing, run `claude-any stop`, select the provider,
|
|
439
|
+
then launch or test. This avoids stale port ownership from old sessions.
|
|
440
|
+
|
|
441
|
+
## Development Story
|
|
442
|
+
|
|
443
|
+
Claude Any started because long Claude Code sessions can run out of premium
|
|
444
|
+
tokens even on a high plan. The intent is to keep work moving while waiting for
|
|
445
|
+
the next token window: slower but usable providers can handle summaries,
|
|
446
|
+
research, journals, simple code, and delegated background tasks.
|
|
447
|
+
|
|
448
|
+
During development, Anthropic-compatible Messages endpoints proved to be the
|
|
449
|
+
cleanest integration path for Claude Code. Ollama, vLLM, and NIM can expose
|
|
450
|
+
those routes. Generic OpenAI-compatible chat endpoints were not selected as the
|
|
451
|
+
primary route because tool-call translation was less stable around parameters,
|
|
452
|
+
tool results, repeated calls, retries, and model selection.
|
|
453
|
+
|
|
454
|
+
The vLLM work also showed that a successful text response is not enough for
|
|
455
|
+
Claude Code. The selected model and server need compatible tool-call formatting.
|
|
456
|
+
In particular, Qwen3-Coder should use vLLM's `qwen3_xml` tool parser. Claude Any
|
|
457
|
+
therefore expanded its compatibility test to cover text, `tool_use`, and
|
|
458
|
+
`tool_result` phases.
|
|
459
|
+
|
|
460
|
+
Local Qwen 3.6 27B Q4 runs were tested through Ollama and vLLM on RTX 5090 and
|
|
461
|
+
MSI GB10-class hardware. They worked, but the speed belongs in a different
|
|
462
|
+
category from native Claude Code or Codex. For this hybrid workflow, some
|
|
463
|
+
hosted/cloud models from NVIDIA NIM and Ollama Cloud were more practical than
|
|
464
|
+
expected.
|
|
465
|
+
|
|
466
|
+
## Demo Assets
|
|
467
|
+
|
|
468
|
+
Demo images, GIF, and MP4 are generated from a script:
|
|
469
|
+
|
|
470
|
+
```sh
|
|
471
|
+
python scripts/make_demo_assets.py
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
Generated files live in `docs/assets/`.
|
|
475
|
+
|
|
476
|
+
## Troubleshooting
|
|
477
|
+
|
|
478
|
+
- If the first request says a model does not exist, re-open the menu and select
|
|
479
|
+
a model that the current provider actually serves.
|
|
480
|
+
- If Ollama Cloud returns authentication errors, check `OLLAMA_API_KEY` or use
|
|
481
|
+
the API key menu.
|
|
482
|
+
- If local Ollama cloud models fail, run `ollama signin` on the Ollama host.
|
|
483
|
+
- If vLLM or NIM returns model `404`, map Claude Code's model aliases to the
|
|
484
|
+
served model name or select the custom model entry.
|
|
485
|
+
- If vLLM tool calls fail, verify both model support and the vLLM
|
|
486
|
+
`--tool-call-parser`/chat-template combination. Qwen3-Coder should start with
|
|
487
|
+
`--enable-auto-tool-choice --tool-call-parser qwen3_xml`.
|
|
488
|
+
- If Claude Code update checks fail due to disk space, clean local caches or
|
|
489
|
+
skip the check with `--ca-no-update-check`.
|
|
490
|
+
|
|
491
|
+
## Security Checklist
|
|
492
|
+
|
|
493
|
+
- Do not commit `~/.config/claude-any/`.
|
|
494
|
+
- Do not commit API keys, tokens, screenshots containing secrets, or router logs.
|
|
495
|
+
- Prefer environment variables for keys in automation.
|
|
496
|
+
- Revoke and rotate any key that was pasted into chat, logs, or issue reports.
|
package/install.ps1
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
$ErrorActionPreference = "Stop"
|
|
2
|
+
|
|
3
|
+
$prefix = if ($env:PREFIX) { $env:PREFIX } else { Join-Path $HOME ".local" }
|
|
4
|
+
$shareDir = if ($env:CLAUDE_ANY_HOME) { $env:CLAUDE_ANY_HOME } else { Join-Path $prefix "share\claude-any" }
|
|
5
|
+
$binDir = Join-Path $prefix "bin"
|
|
6
|
+
|
|
7
|
+
New-Item -ItemType Directory -Force -Path $shareDir, $binDir | Out-Null
|
|
8
|
+
|
|
9
|
+
Copy-Item -Force "claude_any.py" (Join-Path $shareDir "claude_any.py")
|
|
10
|
+
Copy-Item -Force "claude-any-menu.py" (Join-Path $binDir "claude-any-menu.py")
|
|
11
|
+
Copy-Item -Force "claude-any-tool-guard.py" (Join-Path $binDir "claude-any-tool-guard.py")
|
|
12
|
+
Copy-Item -Force "claude-any" (Join-Path $binDir "claude-any")
|
|
13
|
+
Copy-Item -Force "claude-any.cmd" (Join-Path $binDir "claude-any.cmd")
|
|
14
|
+
Copy-Item -Force "claude-any.ps1" (Join-Path $binDir "claude-any.ps1")
|
|
15
|
+
Copy-Item -Force "claude-anyctl" (Join-Path $binDir "claude-anyctl")
|
|
16
|
+
Copy-Item -Force "claude-anyctl.cmd" (Join-Path $binDir "claude-anyctl.cmd")
|
|
17
|
+
Copy-Item -Force "claude-anyctl.ps1" (Join-Path $binDir "claude-anyctl.ps1")
|
|
18
|
+
Copy-Item -Force "claude-any-stop" (Join-Path $binDir "claude-any-stop")
|
|
19
|
+
Copy-Item -Force "claude-any-stop.cmd" (Join-Path $binDir "claude-any-stop.cmd")
|
|
20
|
+
Copy-Item -Force "claude-any-stop.ps1" (Join-Path $binDir "claude-any-stop.ps1")
|
|
21
|
+
|
|
22
|
+
Write-Host "Installed Claude Any to $shareDir"
|
|
23
|
+
Write-Host "Add $binDir to PATH if claude-any is not found."
|
|
24
|
+
|
package/install.sh
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
PREFIX="${PREFIX:-"$HOME/.local"}"
|
|
5
|
+
SHARE_DIR="${CLAUDE_ANY_HOME:-"$PREFIX/share/claude-any"}"
|
|
6
|
+
BIN_DIR="$PREFIX/bin"
|
|
7
|
+
|
|
8
|
+
mkdir -p "$SHARE_DIR" "$BIN_DIR"
|
|
9
|
+
|
|
10
|
+
install -m 755 claude_any.py "$SHARE_DIR/claude_any.py"
|
|
11
|
+
install -m 755 claude-any-menu.py "$BIN_DIR/claude-any-menu"
|
|
12
|
+
install -m 755 claude-any-tool-guard.py "$BIN_DIR/claude-any-tool-guard"
|
|
13
|
+
install -m 755 claude-any "$BIN_DIR/claude-any"
|
|
14
|
+
install -m 755 claude-anyctl "$BIN_DIR/claude-anyctl"
|
|
15
|
+
install -m 755 claude-any-stop "$BIN_DIR/claude-any-stop"
|
|
16
|
+
|
|
17
|
+
printf 'Installed Claude Any to %s\n' "$SHARE_DIR"
|
|
18
|
+
printf 'Launch with: %s/claude-any\n' "$BIN_DIR"
|
|
19
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const { spawnSync } = require("node:child_process");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
|
|
7
|
+
const root = path.resolve(__dirname, "..");
|
|
8
|
+
const script = path.join(root, "claude_any.py");
|
|
9
|
+
const extra = process.argv.slice(2);
|
|
10
|
+
const mode = Object.prototype.hasOwnProperty.call(process.env, "CLAUDE_ANY_NPM_MODE")
|
|
11
|
+
? process.env.CLAUDE_ANY_NPM_MODE
|
|
12
|
+
: "cli";
|
|
13
|
+
|
|
14
|
+
function candidates() {
|
|
15
|
+
if (process.env.CLAUDE_ANY_PYTHON) {
|
|
16
|
+
return [[process.env.CLAUDE_ANY_PYTHON, []]];
|
|
17
|
+
}
|
|
18
|
+
if (process.platform === "win32") {
|
|
19
|
+
return [
|
|
20
|
+
["py", ["-3"]],
|
|
21
|
+
["python", []],
|
|
22
|
+
["python3", []],
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
return [
|
|
26
|
+
["python3", []],
|
|
27
|
+
["python", []],
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
let lastError = null;
|
|
32
|
+
for (const [command, prefix] of candidates()) {
|
|
33
|
+
const scriptArgs = mode ? [mode, ...extra] : extra;
|
|
34
|
+
const args = [...prefix, script, ...scriptArgs];
|
|
35
|
+
const result = spawnSync(command, args, { stdio: "inherit" });
|
|
36
|
+
if (result.error && result.error.code === "ENOENT") {
|
|
37
|
+
lastError = result.error;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (result.error) {
|
|
41
|
+
console.error(result.error.message);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
process.exit(result.status ?? 0);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
console.error("Claude Any requires Python 3.10+.");
|
|
48
|
+
if (lastError) {
|
|
49
|
+
console.error(lastError.message);
|
|
50
|
+
}
|
|
51
|
+
process.exit(1);
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@oneciel-ai/claude-any",
|
|
3
|
+
"version": "0.1.24",
|
|
4
|
+
"description": "Claude Code provider selector for Anthropic, Ollama, Ollama Cloud, vLLM, NVIDIA hosted, and self-hosted NIM.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "One Ciel LLC",
|
|
7
|
+
"homepage": "https://github.com/OneCielAI/claude-any#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/OneCielAI/claude-any.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/OneCielAI/claude-any/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"bin": {
|
|
17
|
+
"claude-any": "npm-bin/claude-any.js",
|
|
18
|
+
"claude-anyctl": "npm-bin/claude-anyctl.js",
|
|
19
|
+
"claude-any-stop": "npm-bin/claude-any-stop.js"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"claude_any.py",
|
|
23
|
+
"claude-any-menu.py",
|
|
24
|
+
"claude-any-tool-guard.py",
|
|
25
|
+
"npm-bin/",
|
|
26
|
+
"install.sh",
|
|
27
|
+
"install.ps1",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"NOTICE",
|
|
31
|
+
"docs/"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"test": "python -m py_compile claude_any.py claude-any-menu.py claude-any-tool-guard.py scripts/make_demo_assets.py",
|
|
35
|
+
"lint": "python -m ruff check .",
|
|
36
|
+
"demo:assets": "python scripts/make_demo_assets.py"
|
|
37
|
+
},
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public",
|
|
40
|
+
"registry": "https://registry.npmjs.org/"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18"
|
|
44
|
+
}
|
|
45
|
+
}
|