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 direct mode with
ANTHROPIC_API_KEYor the bundled Anthropic login flow - OpenAI through a local Anthropic-compatible proxy
- Google Gemini through a local Anthropic-compatible proxy
- Groq through a local Anthropic-compatible proxy
- OpenRouter 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, OpenRouter, 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.
Route requests through the local compatibility proxy. By default Claw Dev uses OPENAI_API_KEY. As an experimental fallback, it can also reuse an existing ChatGPT/Codex login from ~/.codex/auth.json when available.
For new OpenAI-backed sessions, Claw Dev now prefers current GPT-5 models instead of older GPT-4-era defaults.
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 an OpenRouter API key and route requests through the local compatibility proxy.
This is the most flexible cloud option if you want to choose from a large hosted catalog and paste raw provider-qualified model ids such as anthropic/claude-sonnet-4 or google/gemini-2.5-pro.
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- or
codex loginif you want to reuse your ChatGPT/Codex OAuth session from~/.codex/auth.jsonas an experimental fallback
- Gemini
GEMINI_API_KEY
- Groq
GROQ_API_KEY
- OpenRouter
OPENROUTER_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-devnpm start is an alias for the same launcher:
npm startOr 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
- OpenRouter
- 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-5-minigpt-5.2gpt-5.2-codexgemini-2.5-proopenai/gpt-oss-120banthropic/claude-sonnet-4google/gemini-2.5-proopenrouter/freeqwen2.5-coder:14b
Claw Dev also narrows the bundled in-app /model picker to the provider-relevant model set for the current session where possible. The startup model prompt is the safest place to choose the exact backend model for the session. Some in-app labels may still reflect the bundled client naming, but the startup selection remains the real model override.
Recommended .env values:
OPENROUTER_API_KEY=your_openrouter_api_key_here
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_SITE_URL=https://github.com/Leonxlnx/claw-dev
OPENROUTER_APP_NAME=Claw Dev
OPENROUTER_MODEL=anthropic/claude-sonnet-4
OPENROUTER_MODEL_HAIKU=openrouter/free
OPENROUTER_MODEL_SONNET=anthropic/claude-sonnet-4
OPENROUTER_MODEL_OPUS=google/gemini-2.5-proUse OpenRouter when you want the largest hosted model catalog and the easiest way to paste arbitrary provider-qualified model ids. This is the best option in Claw Dev if model control matters more than strict provider branding.
Those optional *_MODEL_HAIKU, *_MODEL_SONNET, and *_MODEL_OPUS values are used to make the bundled /model command more useful during a running session.
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-5-mini
OPENAI_MODEL_HAIKU=gpt-5-nano
OPENAI_MODEL_SONNET=gpt-5-mini
OPENAI_MODEL_OPUS=gpt-5.2-codexIf ~/.codex/auth.json exists, Claw Dev can reuse that ChatGPT/Codex login as an experimental fallback. Example placeholder values such as your_openai_api_key_here are ignored. The in-app /model picker is filtered toward the active provider where possible, but provider-specific labels may still appear. Keyring-backed Codex auth is not supported yet.
Install 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:
8. 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.
Claw Dev works best when the selected backend can tolerate a large system prompt, tool schemas, and enough conversation history for agent-style turns.
Practical guidance:
- Anthropic
- best overall compatibility with the bundled client
- best choice if you want the closest thing to the default slash-command and tool flow
- Gemini
- usually the strongest non-Anthropic option for agent-style sessions
- a good default when you want better long-context behavior than GitHub Models
- OpenRouter
- best option when you want maximum hosted model choice
- especially useful if you want to swap between Anthropic, Google, OpenAI, and open models without changing providers
- OpenAI
- solid general-purpose cloud option
- best when you specifically want the current GPT-family coding models
gpt-5-miniis the best default balancegpt-5.2is the stronger general upgradegpt-5.2-codexis the best OpenAI-first option when coding quality matters more than cost
- Groq
- best when low latency matters more than raw context budget
- open model selection is strong, but tool-heavy sessions can still vary by model
- Copilot
- works, but it has a smaller practical request budget in this setup
- more likely to hit request-size issues or feel less agentic than Anthropic or Gemini
- Ollama
- best for local-only use
- model quality and speed depend heavily on your hardware and chosen model
If you want the smoothest experience, start with Anthropic, Gemini, or OpenRouter before trying Copilot or large local Ollama models.
If you want the least friction:
- Best overall
- Anthropic with a current Claude model
- Best non-Anthropic cloud flow
- Gemini with
gemini-2.5-flashorgemini-2.5-pro
- Gemini with
- Best OpenAI-first flow
- OpenAI with
gpt-5-minifor everyday coding - switch to
gpt-5.2orgpt-5.2-codexfor harder coding and planning work
- OpenAI with
- Best maximum model control
- OpenRouter with explicit provider-qualified model ids
- Best free or almost-free experimentation
- Ollama locally
- Gemini free tier
- OpenRouter free-tagged models when available
- Groq for fast hosted open-model experiments
Practical note:
- free hosted tiers change often
- OpenRouter free availability can vary by model and provider
- local Ollama is the most stable zero-cost option if your hardware can keep up
The startup flow is the most important place to configure a session correctly.
- Claw Dev now treats obvious placeholder secrets from
.env.exampleas unset - the provider menu explains what each backend is good at
- the model prompt accepts any model id, not just the suggested defaults
- the proxy tries to return actionable errors for auth failures, missing models, quota errors, context overflow, and local connectivity issues
For the most control, prefer providers that let you paste arbitrary model ids cleanly:
- OpenRouter
- OpenAI
- Groq
- Ollama
- z.ai
If you want Claw Dev to feel strong on day one, start with these:
- Anthropic
claude-sonnet-4-20250514for the smoothest overall slash-command and tool flow
- Gemini
gemini-2.5-flashfor fast general usegemini-2.5-profor heavier reasoning and larger tasks
- OpenAI
gpt-5-minias the default balancegpt-5.2for stronger all-around workgpt-5.2-codexwhen you specifically want stronger coding behavior
- OpenRouter
anthropic/claude-sonnet-4for a Claude-like hosted flowgoogle/gemini-2.5-profor long-context reasoningopenrouter/freewhen you mainly want cheap or free experimentation
- Groq
openai/gpt-oss-20bfor fast lightweight testingopenai/gpt-oss-120bwhen quality matters more than price and latency
- Ollama
qwen3orqwen2.5-coder:7bto startqwen2.5-coder:14bonly if your hardware can handle slower local inference
- Copilot
openai/gpt-4.1-minioropenai/o4-mini- avoid this path for the heaviest tool-rich sessions because the request budget is smaller
These are not broken, but they are usually the first place users hit frustration:
- very small hosted models when the session already has a lot of tools and history
- Copilot models for large tool-rich sessions
- very large local Ollama models on CPU-only hardware
- Gemma-style local models if you mainly care about coding-agent throughput instead of experimentation
ANTHROPIC_API_KEY=your_anthropic_api_key_here
ANTHROPIC_MODEL=claude-sonnet-4-20250514OPENAI_API_KEY=your_openai_api_key_here
OPENAI_MODEL=gpt-5-miniIf you already ran codex login, you can leave OPENAI_API_KEY unset and Claw Dev will reuse ~/.codex/auth.json as an experimental fallback. Example placeholder values are treated as unset.
GEMINI_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-20bOPENROUTER_API_KEY=your_openrouter_api_key_here
OPENROUTER_BASE_URL=https://openrouter.ai/api/v1
OPENROUTER_SITE_URL=https://github.com/Leonxlnx/claw-dev
OPENROUTER_APP_NAME=Claw Dev
OPENROUTER_MODEL=anthropic/claude-sonnet-4Suggested starting models:
openrouter/freeopenai/gpt-oss-20b:freemeta-llama/llama-3.3-70b-instruct:freeanthropic/claude-sonnet-4google/gemini-2.5-flashgoogle/gemini-2.5-proopenai/gpt-oss-20b:freeopenai/gpt-oss-120b
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=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 openrouter
.\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-5-mini
.\claw-dev.cmd --provider gemini --model gemini-2.5-pro
.\claw-dev.cmd --provider groq --model openai/gpt-oss-120b
.\\claw-dev.cmd --provider openrouter --model anthropic/claude-sonnet-4
.\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-5-mini
./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-5-mini,gpt-5.2,gpt-5-nano,gpt-5.2-codex,gpt-4.1,o3-mini,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
OPENROUTER_MODELS=openrouter/free,openai/gpt-oss-20b:free,meta-llama/llama-3.3-70b-instruct:free,anthropic/claude-sonnet-4,google/gemini-2.5-flash,google/gemini-2.5-pro,openai/gpt-oss-120b,meta-llama/llama-3.3-70b-instruct
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 still originates from the bundled UI, so some visible labels may look Claude-like - Claw Dev now also primes provider-specific model overrides for the common Haiku, Sonnet, and Opus slots so
/modelis more useful during a running session - the startup model choice is still the safest and most explicit backend override 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, OpenRouter, Ollama, Copilot, or z.ai API calls
This keeps the terminal experience consistent while allowing different model backends.
Claw Dev treats obvious placeholder values from .env.example as unset. Replace values such as your_openrouter_api_key_here with a real secret before testing.
That usually means one of the following:
- the API key is invalid
- the account does not have access to the selected model
- the provider expects a different token type
Recommended checks:
- re-copy the API key carefully
- confirm the selected model is available to that account
- restart Claw Dev after changing
.env
This usually means the model id is wrong for the selected provider.
Examples:
- OpenRouter expects provider-qualified ids such as
anthropic/claude-sonnet-4 - Groq expects Groq-supported ids such as
openai/gpt-oss-20b - Ollama expects the local model tag, such as
qwen3orqwen2.5-coder:14b
This usually means the backend could not fit the current agent prompt, tool schemas, and conversation history into the model's practical request budget.
Recommended fixes:
- switch to Anthropic, Gemini, or OpenRouter for larger agent-style sessions
- choose a higher-context model
- start a fresh session when the conversation becomes too large
- avoid Copilot for the heaviest tool-rich flows
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 startornpm 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: