@halfagiraf/clawx 0.1.13 → 0.1.15
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 +153 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
Terminal-first coding agent — runs locally with Ollama, DeepSeek, OpenAI, or any OpenAI-compatible endpoint.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> **Beta** — Clawx is under active development. It works well with the providers we've tested (Ollama, DeepSeek, OpenAI, Anthropic) but not every combination has been battle-tested yet. If you hit a bug, [open an issue](https://github.com/stevenmcsorley/clawx/issues) — we fix things fast.
|
|
10
|
+
|
|
11
|
+
Clawx started because tools like OpenClaw kept getting heavier. Prompts ballooned, context windows filled up, and local models choked. We wanted the good parts — the tool-calling loop, the terminal UI, the coding tools — without the bloat. So we built something lean on top of the open-source [pi-coding-agent](https://github.com/badlogic/pi-mono) SDK: an agent that runs local models on modest hardware, hits DeepSeek when you need more muscle, and scales up to frontier models when the task calls for it. No token budget wasted on platform overhead. Just the model, the tools, and your prompt.
|
|
10
12
|
|
|
11
13
|
> **Fair warning:** Clawx runs with the guardrails off. It will create files, delete files, install packages, and execute shell commands — all without asking you first. That's the point. No confirmation dialogs, no "are you sure?", no waiting around. You give it a task, it gets on with it. This makes it ideal for disposable environments, home labs, Raspberry Pis, VMs, and machines you're happy to let rip. If you're pointing it at a production server with your life's work on it... maybe don't do that. Or do.
|
|
12
14
|
|
|
@@ -82,7 +84,8 @@ Tested on Windows 11, RTX 3060 12GB, 2026-03-15.
|
|
|
82
84
|
|
|
83
85
|
| Model | Provider | Tool calling | VRAM | Benchmark | Status |
|
|
84
86
|
|-------|----------|-------------|------|-----------|--------|
|
|
85
|
-
| **glm-4.7-flash:latest** | Ollama | Structured `tool_calls` | ~5 GB | 12 turns, 13 tool calls — write file + run python | **Recommended** |
|
|
87
|
+
| **glm-4.7-flash:latest** | Ollama | Structured `tool_calls` | ~5 GB | 12 turns, 13 tool calls — write file + run python | **Recommended local** |
|
|
88
|
+
| **Qwen3.5-35B-A3B** (MoE) | Ollama | Structured `tool_calls` | ~12 GB | 35B params, only 3B active per token | **Best local if you have the VRAM** |
|
|
86
89
|
| Qwen2.5-Coder-14B-abliterated Q4_K_M | Ollama | Text-only `<tool_call>` tags | ~9 GB | Tool loop never starts — model returns text, not structured calls | Not compatible |
|
|
87
90
|
| Qwen2.5-Coder-14B-abliterated Q4_K_M | llama-server `--jinja` | Text-only `<tool_call>` tags | ~9 GB | Same as above | Not compatible |
|
|
88
91
|
| GPT-4o / GPT-4-turbo | OpenAI API | Structured `tool_calls` | — | N/A (cloud) | Works |
|
|
@@ -134,7 +137,82 @@ EOF
|
|
|
134
137
|
clawx run "Create a Python script that prints the first 20 Fibonacci numbers"
|
|
135
138
|
```
|
|
136
139
|
|
|
137
|
-
### Option 2:
|
|
140
|
+
### Option 2: Qwen3.5-35B-A3B via Ollama (MoE — best local)
|
|
141
|
+
|
|
142
|
+
A 35B Mixture-of-Experts model that only activates 3B parameters per token. Fits in 12GB VRAM and punches well above its weight for coding tasks.
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# 1. Download the GGUF (or use one you already have)
|
|
146
|
+
# Example: Qwen3.5-35B-A3B-UD-Q2_K_XL.gguf (~12GB)
|
|
147
|
+
|
|
148
|
+
# 2. Create a Modelfile
|
|
149
|
+
cat > Modelfile-qwen35 << 'EOF'
|
|
150
|
+
FROM /path/to/Qwen3.5-35B-A3B-UD-Q2_K_XL.gguf
|
|
151
|
+
|
|
152
|
+
PARAMETER temperature 0.7
|
|
153
|
+
PARAMETER num_ctx 32768
|
|
154
|
+
PARAMETER stop <|im_end|>
|
|
155
|
+
PARAMETER stop <|endoftext|>
|
|
156
|
+
|
|
157
|
+
TEMPLATE """{{- if .System }}<|im_start|>system
|
|
158
|
+
{{ .System }}<|im_end|>
|
|
159
|
+
{{ end }}{{- range .Messages }}<|im_start|>{{ .Role }}
|
|
160
|
+
{{ .Content }}<|im_end|>
|
|
161
|
+
{{ end }}<|im_start|>assistant
|
|
162
|
+
"""
|
|
163
|
+
EOF
|
|
164
|
+
|
|
165
|
+
# 3. Import into Ollama
|
|
166
|
+
ollama create qwen35-35b -f Modelfile-qwen35
|
|
167
|
+
|
|
168
|
+
# 4. Configure clawx
|
|
169
|
+
clawx init
|
|
170
|
+
# Choose: Ollama → model: qwen35-35b
|
|
171
|
+
|
|
172
|
+
# Or set it directly:
|
|
173
|
+
# ~/.clawx/config
|
|
174
|
+
# CLAWDEX_PROVIDER=ollama
|
|
175
|
+
# CLAWDEX_BASE_URL=http://localhost:11434/v1
|
|
176
|
+
# CLAWDEX_MODEL=qwen35-35b
|
|
177
|
+
# CLAWDEX_API_KEY=not-needed
|
|
178
|
+
# CLAWDEX_MAX_TOKENS=16384
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Importing any GGUF into Ollama
|
|
182
|
+
|
|
183
|
+
Got a GGUF from HuggingFace or elsewhere? Here's how to use it with clawx:
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# 1. Create a Modelfile (adjust the FROM path and template for your model)
|
|
187
|
+
cat > Modelfile << 'EOF'
|
|
188
|
+
FROM /path/to/your-model.gguf
|
|
189
|
+
|
|
190
|
+
PARAMETER temperature 0.7
|
|
191
|
+
PARAMETER num_ctx 16384
|
|
192
|
+
PARAMETER stop <|im_end|>
|
|
193
|
+
PARAMETER stop <|endoftext|>
|
|
194
|
+
|
|
195
|
+
TEMPLATE """{{- if .System }}<|im_start|>system
|
|
196
|
+
{{ .System }}<|im_end|>
|
|
197
|
+
{{ end }}{{- range .Messages }}<|im_start|>{{ .Role }}
|
|
198
|
+
{{ .Content }}<|im_end|>
|
|
199
|
+
{{ end }}<|im_start|>assistant
|
|
200
|
+
"""
|
|
201
|
+
EOF
|
|
202
|
+
|
|
203
|
+
# 2. Import it
|
|
204
|
+
ollama create my-model -f Modelfile
|
|
205
|
+
|
|
206
|
+
# 3. Verify
|
|
207
|
+
ollama list
|
|
208
|
+
|
|
209
|
+
# 4. Use with clawx
|
|
210
|
+
clawx run -m my-model -p ollama -u http://localhost:11434/v1 "Your prompt here"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
> **Note:** The template above uses the ChatML format (`<|im_start|>`/`<|im_end|>`) which works with most Qwen, GLM, and many other models. Check your model's docs if it uses a different chat template (e.g. Llama, Mistral).
|
|
214
|
+
|
|
215
|
+
### Option 3: Qwen2.5-Coder-14B via Ollama (reference only)
|
|
138
216
|
|
|
139
217
|
> **Warning:** This model does NOT produce structured tool calls. It is listed here for reference only. Tool-using agent tasks will fail. You can still use it for plain chat without tools.
|
|
140
218
|
|
|
@@ -177,7 +255,7 @@ CLAWDEX_MAX_TOKENS=8192
|
|
|
177
255
|
EOF
|
|
178
256
|
```
|
|
179
257
|
|
|
180
|
-
### Option
|
|
258
|
+
### Option 3b: Qwen2.5-Coder-14B via llama-server (llama.cpp)
|
|
181
259
|
|
|
182
260
|
> **Warning:** Same limitation — text-only tool calls, not compatible with Clawx agent loop.
|
|
183
261
|
|
|
@@ -208,7 +286,7 @@ CLAWDEX_MAX_TOKENS=8192
|
|
|
208
286
|
EOF
|
|
209
287
|
```
|
|
210
288
|
|
|
211
|
-
### Option
|
|
289
|
+
### Option 4: DeepSeek API
|
|
212
290
|
|
|
213
291
|
DeepSeek is OpenAI-compatible with full structured tool calling support, including thinking mode.
|
|
214
292
|
Pricing: ~$0.27/1M input, $1.10/1M output (deepseek-chat). Very cost-effective.
|
|
@@ -239,7 +317,7 @@ EOF
|
|
|
239
317
|
clawx run "Create a FastAPI app with SQLite and JWT auth"
|
|
240
318
|
```
|
|
241
319
|
|
|
242
|
-
### Option
|
|
320
|
+
### Option 5: OpenAI API
|
|
243
321
|
|
|
244
322
|
```bash
|
|
245
323
|
cat > .env << 'EOF'
|
|
@@ -252,7 +330,7 @@ CLAWDEX_MAX_TOKENS=16384
|
|
|
252
330
|
EOF
|
|
253
331
|
```
|
|
254
332
|
|
|
255
|
-
### Option
|
|
333
|
+
### Option 6: Anthropic API
|
|
256
334
|
|
|
257
335
|
```bash
|
|
258
336
|
cat > .env << 'EOF'
|
|
@@ -267,12 +345,37 @@ EOF
|
|
|
267
345
|
|
|
268
346
|
### GPU / VRAM notes
|
|
269
347
|
|
|
270
|
-
- **RTX 3060 12GB**: Can run glm-4.7-flash (~5GB) or Qwen-14B
|
|
271
|
-
-
|
|
348
|
+
- **RTX 3060 12GB**: Can run Qwen3.5-35B-A3B (~12GB), glm-4.7-flash (~5GB), or Qwen-14B (~9GB) — but only one at a time
|
|
349
|
+
- **RTX 3070/3080 8GB**: glm-4.7-flash (~5GB) fits comfortably, 14B models are tight
|
|
350
|
+
- **RTX 4090 24GB**: Can run most models including full (non-MoE) 30B+ models
|
|
351
|
+
- To free VRAM when switching models: `ollama stop <model-name>`
|
|
272
352
|
- Ollama auto-loads models on first request and keeps them in VRAM until timeout or manual stop
|
|
353
|
+
- Check VRAM usage: `nvidia-smi` (Linux/Windows) or `ollama ps`
|
|
273
354
|
|
|
274
355
|
## Configuration reference
|
|
275
356
|
|
|
357
|
+
### Where config lives
|
|
358
|
+
|
|
359
|
+
Clawx looks for config in this order (first match wins):
|
|
360
|
+
|
|
361
|
+
| Priority | Location | Created by | Notes |
|
|
362
|
+
|----------|----------|------------|-------|
|
|
363
|
+
| 1 | `.env` in current directory | You | Per-project overrides |
|
|
364
|
+
| 2 | `~/.clawx/config` | `clawx init` | Global config (recommended) |
|
|
365
|
+
| 3 | `.env` in package install dir | Dev only | Fallback for development |
|
|
366
|
+
| 4 | `clawx.json` in current directory | You | JSON format, supports systemPrompt |
|
|
367
|
+
| 5 | Built-in defaults | — | Ollama on localhost |
|
|
368
|
+
|
|
369
|
+
**Config file paths by OS:**
|
|
370
|
+
|
|
371
|
+
| OS | Global config | Sessions |
|
|
372
|
+
|----|---------------|----------|
|
|
373
|
+
| **Windows** | `C:\Users\<you>\.clawx\config` | `C:\Users\<you>\.clawx\sessions\` |
|
|
374
|
+
| **Linux** | `~/.clawx/config` | `~/.clawx/sessions/` |
|
|
375
|
+
| **macOS** | `~/.clawx/config` | `~/.clawx/sessions/` |
|
|
376
|
+
|
|
377
|
+
The fastest way to set up is `clawx init` — it writes `~/.clawx/config` for you. To override per-project, drop a `.env` or `clawx.json` in the project directory.
|
|
378
|
+
|
|
276
379
|
### Environment variables
|
|
277
380
|
|
|
278
381
|
```bash
|
|
@@ -546,6 +649,46 @@ Next time you run `clawx`, the correct `fd` binary will be downloaded automatica
|
|
|
546
649
|
|
|
547
650
|
If you set up clawx via `clawx init`, your configured model should appear in `/models`. If it doesn't, check that your `~/.clawx/config` file has the correct `CLAWDEX_PROVIDER`, `CLAWDEX_MODEL`, and `CLAWDEX_API_KEY` values.
|
|
548
651
|
|
|
652
|
+
### Model doesn't produce tool calls
|
|
653
|
+
|
|
654
|
+
If the agent responds with text but never creates files or runs commands, your model likely doesn't support **structured tool calling**. It needs to return `tool_calls` objects in the API response, not text like `<tool_call>`. Check the [model compatibility table](#model-compatibility-and-benchmarks) — models marked "Not compatible" won't work with the agent loop.
|
|
655
|
+
|
|
656
|
+
### Connection errors
|
|
657
|
+
|
|
658
|
+
```
|
|
659
|
+
[error] Connection error.
|
|
660
|
+
```
|
|
661
|
+
|
|
662
|
+
This means clawx can't reach the model endpoint. Check:
|
|
663
|
+
- Is Ollama running? (`ollama serve` or check if the service is active)
|
|
664
|
+
- Is the base URL correct? (`http://localhost:11434/v1` for Ollama)
|
|
665
|
+
- Is the model pulled? (`ollama list` to check)
|
|
666
|
+
- For API providers: is your API key valid?
|
|
667
|
+
|
|
668
|
+
### Reporting bugs
|
|
669
|
+
|
|
670
|
+
Clawx is in beta — if something breaks, we want to know. [Open an issue](https://github.com/stevenmcsorley/clawx/issues) with:
|
|
671
|
+
|
|
672
|
+
1. **What you ran** — the command and prompt
|
|
673
|
+
2. **What happened** — error message or unexpected behaviour
|
|
674
|
+
3. **Your setup** — OS, provider, model, clawx version (`clawx --version`)
|
|
675
|
+
4. **Verbose output** — run with `-v` flag for debug logs: `clawx run -v "your prompt"`
|
|
676
|
+
|
|
677
|
+
### Tested vs untested providers
|
|
678
|
+
|
|
679
|
+
| Provider | Status |
|
|
680
|
+
|----------|--------|
|
|
681
|
+
| Ollama | Tested on Windows + Linux |
|
|
682
|
+
| DeepSeek API | Tested |
|
|
683
|
+
| OpenAI API | Tested |
|
|
684
|
+
| Anthropic API | Tested |
|
|
685
|
+
| LM Studio | Untested — should work (OpenAI-compatible) |
|
|
686
|
+
| vLLM | Untested — should work (OpenAI-compatible) |
|
|
687
|
+
| llama.cpp server | Tested — tool calling depends on model |
|
|
688
|
+
| Google / Mistral | Untested |
|
|
689
|
+
|
|
690
|
+
If you test a provider that isn't listed, let us know how it went.
|
|
691
|
+
|
|
549
692
|
## License
|
|
550
693
|
|
|
551
|
-
MIT
|
|
694
|
+
MIT. Built on the open-source [pi-coding-agent](https://github.com/badlogic/pi-mono) SDK (MIT).
|