Claw Dev is a local multi-provider coding assistant launcher for the bundled terminal client in this repository. It gives you one entry point and lets you choose how model requests are resolved at startup:
- Anthropic account login or
ANTHROPIC_API_KEY - OpenAI through a local Anthropic-compatible proxy
- Google Gemini through a local Anthropic-compatible proxy
- Groq through a local Anthropic-compatible proxy
- Copilot through the GitHub Models API
- z.ai through a local Anthropic-compatible proxy
- Ollama through a local Anthropic-compatible proxy
Claw Dev is designed to feel like one tool rather than a provider-specific wrapper. The launcher, provider prompts, environment variables, and documentation are all centered around the Claw Dev name.
Leonxlnx-claude-code/- bundled terminal client and platform launchers
src/anthropicCompatProxy.ts- local Anthropic-compatible proxy used for OpenAI, Gemini, Groq, Ollama, Copilot, and z.ai
.env.example- optional environment template for local setup
package.json- root scripts for launching, building, and validating the workspace
Use the bundled client with the normal Anthropic login flow or with ANTHROPIC_API_KEY.
Use an OpenAI API key and route requests through the local compatibility proxy.
Use a Google Gemini API key and route requests through the local compatibility proxy.
Use a Groq API key and route requests through the local compatibility proxy.
Use a local or remote Ollama server and route requests through the local compatibility proxy.
This is the best option if you want local inference and do not want to depend on a cloud API provider.
Use a GitHub Models-compatible bearer token and route requests through the local compatibility proxy.
Use a z.ai API key and route requests through the local compatibility proxy.
Install the following before you begin:
- Node.js 22 or newer
- npm
- Windows users should install Git for Windows for the best terminal workflow
Provider-specific requirements:
- Anthropic
- an Anthropic account for in-app login, or
ANTHROPIC_API_KEY
- an Anthropic account for in-app login, or
- OpenAI
OPENAI_API_KEY
- Gemini
GEMINI_API_KEY
- Groq
GROQ_API_KEY
- Ollama
- a running Ollama installation
- at least one pulled model, such as
qwen3
- Copilot
COPILOT_TOKENor another GitHub Models-compatible bearer token
- z.ai
ZAI_API_KEY
These requirements apply to Claw Dev itself:
- Node.js 22+
- enough free disk space for Node dependencies and any local model assets you choose to install
- one of the following shells:
- Windows PowerShell or Command Prompt
- macOS Terminal, iTerm2,
bash, orzsh - Linux terminal with
bashorzsh
According to the official Ollama documentation:
- Ollama is available for Windows, macOS, and Linux
- the local Ollama API is served by default at
http://localhost:11434/api - no authentication is required for local API access on
http://localhost:11434 - on Windows, Ollama reads standard user and system environment variables
Official Ollama documentation explains that loaded models may run fully on GPU, fully in system memory, or split across CPU and GPU, and that actual memory use depends on the model you choose. The exact hardware requirement therefore depends primarily on model size.
Practical guidance for Claw Dev users:
- For small local coding models, 16 GB system RAM is a reasonable starting point
- For smoother local work, 32 GB RAM is strongly preferred
- A dedicated GPU helps significantly, especially for larger models and faster response times
- If you do not have a capable GPU, Ollama can still run on CPU, but generation will be slower
- Larger models require substantially more RAM or VRAM and may be impractical on entry-level hardware
Conservative model guidance:
qwen3or similar 8B-class models are the easiest place to start on consumer hardware- mid-size models usually benefit from 16 GB to 24 GB of available VRAM, or enough combined GPU and system memory for mixed CPU/GPU loading
- very large models are generally not a practical default for local coding workflows unless you already have a high-memory workstation
This guidance is an implementation recommendation based on Ollama's documented runtime behavior and common model sizes. It is not an official Ollama sizing table.
From the repository root on Windows:
cd E:\myclaudecode
npm install
copy .env.example .envFrom the repository root on macOS or Linux:
cd /path/to/myclaudecode
npm install
cp .env.example .envEditing .env is optional. Claw Dev can prompt for missing values interactively when it starts.
Start Claw Dev from the repository root on any platform:
npm run claw-devOr launch it directly from the bundled client directory on Windows:
cd E:\myclaudecode\Leonxlnx-claude-code
.\claw-dev.cmdOr launch it directly from the bundled client directory on macOS or Linux:
cd /path/to/myclaudecode/Leonxlnx-claude-code
chmod +x ./claw-dev.sh
./claw-dev.shWhen Claw Dev starts, it shows a provider selector:
- Anthropic
- OpenAI
- Gemini
- Groq
- Copilot
- z.ai
- Ollama
If a required API key is missing, Claw Dev prompts for it.
After you choose a provider, Claw Dev also lets you enter any model id you want for that session. You can press Enter to keep the suggested default, or type a custom model id such as:
gpt-4.1gpt-4o-minigemini-2.5-proopenai/gpt-oss-120bopenai/o4-miniqwen2.5-coder:14b
This makes model selection flexible even when the bundled in-app /model picker still shows provider-specific legacy labels.
Recommended .env values:
COPILOT_TOKEN=your_github_models_token_here
COPILOT_MODEL=openai/gpt-4.1-mini
COPILOT_MODEL_SONNET=openai/gpt-4.1-mini
COPILOT_MODEL_OPUS=openai/gpt-4.1
COPILOT_MODEL_HAIKU=openai/gpt-4.1-miniRecommended .env values:
ZAI_API_KEY=your_zai_api_key_here
ZAI_MODEL=glm-5Recommended .env values:
OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4.1-miniInstall Ollama from the official download page:
After installation, make sure the Ollama application or service is running.
For a lightweight starting point:
ollama pull qwen3You can verify that the model is available with:
ollama listIf Ollama is not already running in the background, start it with:
ollama serveThe default local API base URL is:
http://127.0.0.1:11434
cd E:\myclaudecode
npm run claw-devThen choose:
4. Ollama
Claw Dev will point the bundled client at the local compatibility proxy, and the proxy will forward requests to your Ollama server.
You can preconfigure Ollama mode in .env:
OLLAMA_BASE_URL=http://127.0.0.1:11434
OLLAMA_MODEL=qwen3
OLLAMA_API_KEY=
OLLAMA_KEEP_ALIVE=30m
OLLAMA_NUM_CTX=2048
OLLAMA_NUM_PREDICT=128Notes:
OLLAMA_BASE_URLshould point to your Ollama serverOLLAMA_MODELis the model name Claw Dev will requestOLLAMA_API_KEYis not required for local Ollama onlocalhostOLLAMA_API_KEYis only relevant if you are targeting an authenticated remote Ollama endpoint or the hosted Ollama APIOLLAMA_KEEP_ALIVEkeeps the model loaded between turns, which reduces repeated warm-up timeOLLAMA_NUM_CTXcontrols prompt context sizeOLLAMA_NUM_PREDICTlimits output length and can reduce latency
Useful checks:
ollama psThis shows which models are currently loaded and whether they are using CPU, GPU, or both.
You can also confirm that the Claw Dev proxy is healthy:
npm run proxy:compatThen open:
http://127.0.0.1:8789/health
When Ollama mode is configured, you should see a JSON response with the active provider and model.
If Ollama feels slow, start with the following assumptions:
- larger context windows are slower
- longer outputs are slower
- first-token latency is usually worst on the first request after model load
- CPU-only inference is much slower than GPU-backed inference
Recommended starting values for a responsive local setup:
OLLAMA_KEEP_ALIVE=30m
OLLAMA_NUM_CTX=2048
OLLAMA_NUM_PREDICT=128If you need more quality and longer context, increase OLLAMA_NUM_CTX gradually to 4096 or higher. If you want faster responses, keep it smaller.
If you need shorter answers and lower latency, reduce OLLAMA_NUM_PREDICT further.
ANTHROPIC_API_KEY=your_anthropic_api_key_here
ANTHROPIC_MODEL=claude-sonnet-4-20250514OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-4.1-miniGEMINI_API_KEY=your_gemini_api_key_here
GEMINI_MODEL=gemini-2.5-flashGROQ_API_KEY=your_groq_api_key_here
GROQ_MODEL=openai/gpt-oss-20bOLLAMA_BASE_URL=http://127.0.0.1:11434
OLLAMA_MODEL=qwen3
OLLAMA_API_KEY=
OLLAMA_KEEP_ALIVE=30m
OLLAMA_NUM_CTX=2048
OLLAMA_NUM_PREDICT=128COPILOT_TOKEN=your_github_models_token_here
COPILOT_MODEL=openai/gpt-4.1-mini
COPILOT_MODEL_SONNET=openai/gpt-4.1-mini
COPILOT_MODEL_OPUS=openai/gpt-4.1
COPILOT_MODEL_HAIKU=openai/gpt-4.1-miniZAI_API_KEY=your_zai_api_key_here
ZAI_MODEL=glm-5Check the installed launcher version:
cd E:\myclaudecode\Leonxlnx-claude-code
.\claw-dev.cmd --versionCheck the installed launcher version on macOS or Linux:
cd /path/to/myclaudecode/Leonxlnx-claude-code
chmod +x ./claw-dev.sh
./claw-dev.sh --versionSkip the provider menu and force a specific provider:
.\claw-dev.cmd --provider anthropic
.\\claw-dev.cmd --provider openai
.\claw-dev.cmd --provider gemini
.\claw-dev.cmd --provider groq
.\claw-dev.cmd --provider copilot
.\claw-dev.cmd --provider zai
.\claw-dev.cmd --provider ollamaYou can also skip the default model prompt and force any model id directly:
.\claw-dev.cmd --provider openai --model gpt-4.1
.\claw-dev.cmd --provider gemini --model gemini-2.5-pro
.\claw-dev.cmd --provider groq --model openai/gpt-oss-120b
.\claw-dev.cmd --provider copilot --model openai/o4-mini
.\claw-dev.cmd --provider zai --model glm-4.5
.\claw-dev.cmd --provider ollama --model qwen2.5-coder:14bEquivalent macOS or Linux examples:
./claw-dev.sh --provider openai --model gpt-4.1
./claw-dev.sh --provider ollama --model qwen2.5-coder:14bIf you want extra suggestions to appear in the proxy model catalog, you can define optional comma-separated model lists:
OPENAI_MODELS=gpt-4.1-mini,gpt-4.1,gpt-4o-mini,gpt-4o,o4-mini
GEMINI_MODELS=gemini-2.5-flash,gemini-2.5-pro,gemma-3-27b-it
GROQ_MODELS=openai/gpt-oss-20b,openai/gpt-oss-120b,qwen/qwen3-32b
COPILOT_MODELS=openai/gpt-4.1-mini,openai/gpt-4.1,openai/gpt-4o,openai/o4-mini
ZAI_MODELS=glm-5,glm-4.5,glm-4.5-air
OLLAMA_MODELS=qwen3,qwen2.5-coder:7b,qwen2.5-coder:14b,deepseek-r1:8bImportant note:
- the startup model override accepts any model id
- the bundled
/modelcommand inside the client is still based on the bundled UI, so its labels may not match your provider exactly - Claw Dev uses your startup model choice as the real backend model for the session
Legacy aliases are still accepted:
.\claw-dev.cmd --provider claude
.\claw-dev.cmd --provider grokRun a one-shot prompt:
echo "Summarize this repository" | .\claw-dev.cmd --bare -pBefore creating public commits, verify that your local Git identity is safe to publish.
Recommended settings for this repository:
git config user.name "Leonxlnx"
git config user.email "219127460+Leonxlnx@users.noreply.github.com"You can verify the active values with:
git config user.name
git config user.emailImportant notes:
.envis ignored by.gitignorenode_modulesis ignoreddistis ignored*.logfiles are ignored- always review
git statusbefore staging - always review
git diff --cachedbefore pushing
Useful checks:
git status --short
git diff --cachedClaw Dev works in two modes:
- Anthropic mode
- the bundled client talks to Anthropic directly
- Compatibility mode
- the bundled client talks to the local proxy
- the local proxy translates Anthropic-style
/v1/messagesrequests into OpenAI, Gemini, Groq, Ollama, Copilot, or z.ai API calls
This keeps the terminal experience consistent while allowing different model backends.
Check the following:
- Ollama is installed
- the Ollama service or background app is running
ollama serveis active if needed- the selected model was pulled successfully
OLLAMA_BASE_URLpoints to the correct server
Common causes:
- the model is running on CPU instead of GPU
- the selected model is too large for your hardware
- the model is partly swapping between GPU and system memory
- the context window is too large for your use case
- the requested answer is longer than necessary
Use:
ollama psto inspect how the model is loaded.
If PROCESSOR shows 100% CPU, slow generation is expected.
Recommended fixes:
- keep
OLLAMA_NUM_CTXat2048first - keep
OLLAMA_NUM_PREDICTlow for short answers - leave
OLLAMA_KEEP_ALIVE=30mor longer so the model stays warm - try a smaller model if local responsiveness matters more than maximum quality
That usually means Claw Dev is working correctly, but the local Ollama server is not reachable or does not have the requested model.
If you hand this repository to someone else, the shortest setup path is:
- Install Node.js 22 or newer
- Run
npm install - Start
npm run claw-dev - Choose a provider
- Supply credentials or run Ollama locally
They do not need a separate global installation of the bundled client in order to use this repository.
Useful checks:
npm run check
npm run build
npm run claw-dev -- --versionOfficial documentation used for this setup: