Improve README readability

- close code fences on their own line (they were swallowing sections)
- rebuild collapsed tables into real markdown tables
- add language hints to command/JSON blocks
- replace dead blog navigation link with a source note
This commit is contained in:
ibrahim committed 2026-11-25 09:16:54 +00:00
1 parent 465e94c0c8
commit c4adf497a9
1 file changed
+68 -26
+68 -26
View File
@@ -34,7 +34,11 @@ I first tried Docker for a Kali GUI, but containers have no display server by de
**VMware Fusion** ended up being the most stable option for daily use. VMs built this way are also portable: moving to a new Mac later just means copying the VM package and reopening it, no reinstall required. **VMware Fusion** ended up being the most stable option for daily use. VMs built this way are also portable: moving to a new Mac later just means copying the VM package and reopening it, no reinstall required.
| Approach | Result on M1 || --- | --- || Docker (Kali image) | No display server by default — needs XQuartz/VNC workaround || UTM + QEMU (Kali ARM64) | Official images mostly AMD64 — inconsistent support || **VMware Fusion** | **Stable, portable, my daily driver** | | Approach | Result on M1 |
| --- | --- |
| Docker (Kali image) | No display server by default — needs XQuartz/VNC workaround |
| UTM + QEMU (Kali ARM64) | Official images mostly AMD64 — inconsistent support |
| **VMware Fusion** | **Stable, portable, my daily driver** |
--- ---
@@ -44,17 +48,26 @@ Instead of installing AI models twice, I run them on the Mac itself with **Ollam
Ollama binds to `localhost` by default. To make it reachable from the VM, I start it temporarily in the foreground: Ollama binds to `localhost` by default. To make it reachable from the VM, I start it temporarily in the foreground:
```OLLAMA_HOST=0.0.0.0:11434 ollama serve``` ```bash
OLLAMA_HOST=0.0.0.0:11434 ollama serve
```
This is intentionally a foreground-only command — hitting `Ctrl+C` reverts the binding completely, with no persistent `launchctl` environment variable left exposed on the network. This is intentionally a foreground-only command — hitting `Ctrl+C` reverts the binding completely, with no persistent `launchctl` environment variable left exposed on the network.
Find the Mac's LAN IP to use in both CLI configs below: Find the Mac's LAN IP to use in both CLI configs below:
```ipconfig getifaddr en0``` ```bash
ipconfig getifaddr en0
```
### Models currently pulled on the Mac ### Models currently pulled on the Mac
| Model | Size | Best for || --- | --- | --- || `qwen3.5:9b-mlx` | ~8.9GB | Daily driver — fast, RAM-efficient coding & reasoning || `gemma4:12b-mxfp8` | ~13GB | Multimodal / vision tasks || `gemma4:26b-mlx` | ~17GB | Stronger multimodal reasoning || `igorls/gemma-4-12B-it-heretic-GGUF:Q8_0` | ~12GB | Community uncensored fine-tune | | Model | Size | Best for |
| --- | --- | --- |
| `qwen3.5:9b-mlx` | ~8.9GB | Daily driver — fast, RAM-efficient coding & reasoning |
| `gemma4:12b-mxfp8` | ~13GB | Multimodal / vision tasks |
| `gemma4:26b-mlx` | ~17GB | Stronger multimodal reasoning |
| `igorls/gemma-4-12B-it-heretic-GGUF:Q8_0` | ~12GB | Community uncensored fine-tune |
--- ---
@@ -62,12 +75,15 @@ Find the Mac's LAN IP to use in both CLI configs below:
Create the config directory and file inside the VM: Create the config directory and file inside the VM:
```mkdir -p ~/.qwen ```bash
nano ~/.qwen/settings.json``` mkdir -p ~/.qwen
nano ~/.qwen/settings.json
```
Point it at Ollama's OpenAI-compatible endpoint on the Mac: Point it at Ollama's OpenAI-compatible endpoint on the Mac:
```{ ```json
{
"env": { "env": {
"OLLAMA_API_KEY": "ollama" "OLLAMA_API_KEY": "ollama"
}, },
@@ -84,17 +100,22 @@ Point it at Ollama's OpenAI-compatible endpoint on the Mac:
"model": { "model": {
"name": "qwen3.5:9b-mlx" "name": "qwen3.5:9b-mlx"
} }
}``` }
```
Ollama doesn't validate API keys locally, so the placeholder value `"ollama"` is enough to satisfy Qwen CLI's `envKey` requirement. Ollama doesn't validate API keys locally, so the placeholder value `"ollama"` is enough to satisfy Qwen CLI's `envKey` requirement.
Validate the JSON before relying on it: Validate the JSON before relying on it:
```python3 -m json.tool ~/.qwen/settings.json``` ```
python3 -m json.tool ~/.qwen/settings.json
```
Run it: Run it:
```qwen``` ```bash
qwen
```
Switch models mid-session with `/model`. Switch models mid-session with `/model`.
@@ -104,16 +125,21 @@ Switch models mid-session with `/model`.
Install it if needed: Install it if needed:
```sudo apt install -y nodejs npm ```bash
sudo apt install -y nodejs npm
npm install -g @continuedev/cli npm install -g @continuedev/cli
cn --version``` cn --version
```
Create the config file: Create the config file:
```mkdir -p ~/.continue ```bash
nano ~/.continue/config.yaml``` mkdir -p ~/.continue
nano ~/.continue/config.yaml
```
```name: Local Config ```
name: Local Config
version: 0.0.1 version: 0.0.1
schema: v1 schema: v1
models: models:
@@ -124,17 +150,22 @@ models:
roles: roles:
- chat - chat
- edit - edit
- apply``` - apply
```
Additional models can be added the same way — one entry per model — so all of them are selectable inside a session. Additional models can be added the same way — one entry per model — so all of them are selectable inside a session.
Continue CLI auto-detects `~/.continue/config.yaml`, so no flag is needed: Continue CLI auto-detects `~/.continue/config.yaml`, so no flag is needed:
```cn``` ```bash
cn
```
If it doesn't pick the file up automatically: If it doesn't pick the file up automatically:
```cn --config ~/.continue/config.yaml``` ```bash
cn --config ~/.continue/config.yaml
```
Note: Continue may show a tool-calling capability warning for some models (e.g. `gemma4:12b-mxfp8`) — that's Continue's internal compatibility check, not a hard failure. Note: Continue may show a tool-calling capability warning for some models (e.g. `gemma4:12b-mxfp8`) — that's Continue's internal compatibility check, not a hard failure.
@@ -146,24 +177,30 @@ For models larger than 32GB of unified memory can comfortably run — like a 31B
On the Vast.ai instance: On the Vast.ai instance:
```ollama pull tinyrick/gemma-4-31B-it-uncensored-heretic-vision-llmfan46:Q4_K_M ```
ollama list``` ollama pull tinyrick/gemma-4-31B-it-uncensored-heretic-vision-llmfan46:Q4_K_M
ollama list
```
Expose it through the instance's tunnel (typically Cloudflare), then point either CLI config at the tunnel URL instead of the Mac's LAN address: Expose it through the instance's tunnel (typically Cloudflare), then point either CLI config at the tunnel URL instead of the Mac's LAN address:
```{ ```json
{
"id": "tinyrick/gemma-4-31B-it-uncensored-heretic-vision-llmfan46:Q4_K_M", "id": "tinyrick/gemma-4-31B-it-uncensored-heretic-vision-llmfan46:Q4_K_M",
"name": "Gemma 4 31B Heretic (Vast.ai)", "name": "Gemma 4 31B Heretic (Vast.ai)",
"baseUrl": "https://<your-tunnel-url>/v1", "baseUrl": "https://<your-tunnel-url>/v1",
"envKey": "OLLAMA_API_KEY" "envKey": "OLLAMA_API_KEY"
}``` }
```
Sanity-check the endpoint before trusting it: Sanity-check the endpoint before trusting it:
```curl https://<your-tunnel-url>/v1/chat/completions \ ```bash
curl https://<your-tunnel-url>/v1/chat/completions \
-H "Authorization: Bearer ollama" \ -H "Authorization: Bearer ollama" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d '{"model": "tinyrick/gemma-4-31B-it-uncensored-heretic-vision-llmfan46:Q4_K_M", "messages": [{"role": "user", "content": "Say hi in one word"}]}'``` -d '{"model": "tinyrick/gemma-4-31B-it-uncensored-heretic-vision-llmfan46:Q4_K_M", "messages": [{"role": "user", "content": "Say hi in one word"}]}'
```
A clean response means the model is reachable and ready to select inside `qwen` or `cn`. Vast.ai instances run in unprivileged Docker containers isolated per tenant, which gives a reasonable degree of technical separation — worth factoring in if prompt privacy matters, since it remains a shared physical machine. A clean response means the model is reachable and ready to select inside `qwen` or `cn`. Vast.ai instances run in unprivileged Docker containers isolated per tenant, which gives a reasonable degree of technical separation — worth factoring in if prompt privacy matters, since it remains a shared physical machine.
@@ -171,7 +208,12 @@ A clean response means the model is reachable and ready to select inside `qwen`
## 6. Trade-offs of This Setup ## 6. Trade-offs of This Setup
| Trade-off | Detail || --- | --- || **Full control** | No subscriptions, no vendor lock-in, every component swappable || **Free (mostly)** | Only cost is on-demand GPU rental for the bigger models || **More moving parts** | Three layers (VM, host, remote) means more to keep track of than a single app || **Easy to lose track** | IP addresses and tunnel URLs change — worth keeping a running note of the current ones | | Trade-off | Detail |
| --- | --- |
| **Full control** | No subscriptions, no vendor lock-in, every component swappable |
| **Free (mostly)** | Only cost is on-demand GPU rental for the bigger models |
| **More moving parts** | Three layers (VM, host, remote) means more to keep track of than a single app |
| **Easy to lose track** | IP addresses and tunnel URLs change — worth keeping a running note of the current ones |
--- ---
@@ -203,4 +245,4 @@ This keeps the security tooling isolated inside the VM while still giving full A
--- ---
[Back to Home](/) > Originally published on [ibrahimihsan.site/blog](https://ibrahimihsan.site/blog/post.html?slug=how-i-use-my-mac-with-kali-linux-and-ai-tools)