Detailed installation and configuration for clawcodex. For a quick overview, see the Quick Start in the main README — this guide expands on each step and adds a provider reference and troubleshooting.
- Python 3.10+ (3.11 recommended)
- git
- uv (recommended)
- An API key for at least one supported provider: Anthropic, OpenAI, Z.ai (GLM), MiniMax, OpenRouter, or DeepSeek
git clone https://github.com/agentforce314/clawcodex.git
cd clawcodex
# Create and activate a virtual environment (uv recommended)
uv venv --python 3.11
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install the package with its entry point
uv pip install -e ".[dev]"Confirm the CLI is available:
clawcodex --helpIf you'd rather not install the entry point, you can always run python -m src.cli in place of clawcodex.
clawcodex reads its configuration from ~/.clawcodex/config.json. Create it interactively or by hand.
clawcodex loginThis walks you through:
- choosing a provider —
anthropic/openai/zai/minimax/openrouter/deepseek - entering that provider's API key
- optionally setting a custom base URL
- optionally setting a default model
- setting the chosen provider as the default
Create ~/.clawcodex/config.json (only the providers you actually use are required):
{
"default_provider": "zai",
"providers": {
"anthropic": {
"api_key": "your-api-key",
"base_url": "https://api.anthropic.com",
"default_model": "claude-sonnet-4-6"
},
"zai": {
"api_key": "your-api-key",
"base_url": "https://api.z.ai/api/coding/paas/v4",
"default_model": "glm-5.2"
}
},
"env": {
"TAVILY_API_KEY": "tvly-YOUR-TAVILY-API-KEY"
}
}default_provider— which provider block to use unless overridden with--provider.providers— one block per provider (api_key,base_url,default_model).env— secrets and environment values injected at startup (e.g.TAVILY_API_KEYfor web search). Manage these withclawcodex config.
Secrets live in this single config file (the
envblock and each provider'sapi_key) — clawcodex does not read.envfiles.
| Provider key | Base URL | Example model |
|---|---|---|
anthropic |
https://api.anthropic.com |
claude-sonnet-4-6 |
openai |
https://api.openai.com/v1 |
gpt-5.4 |
zai |
https://api.z.ai/api/coding/paas/v4 |
glm-5.2 (also glm-5.1) |
minimax |
https://api.minimaxi.com/anthropic |
MiniMax-M2.7 |
openrouter |
https://openrouter.ai/api/v1 |
deepseek/deepseek-v4-pro |
deepseek |
https://api.deepseek.com |
deepseek-v4-pro |
Z.ai (GLM): clawcodex uses Z.ai's OpenAI-compatible GLM Coding Plan at
https://api.z.ai/api/coding/paas/v4, servingGLM-5.1(stable) andGLM-5.2(preview). The legacy provider nameglmis still accepted as an alias forzai. Get a key at https://z.ai/.
clawcodex # start the interactive Ink TUI (same as: python -m src.cli)
clawcodex --help # all flags: -p, --provider, --model, …
clawcodex --provider zai # start this session with a specific providerclawcodex: command not found— activate your virtualenv (source .venv/bin/activate), or runpython -m src.cli.Unknown provider/ auth errors — make sure the provider key in~/.clawcodex/config.jsonmatches a block underproviders, and that itsapi_keyis set.- Wrong Python version — clawcodex needs Python 3.10+. Check with
python --version; recreate the venv withuv venv --python 3.11if needed. - Web search not working — set
TAVILY_API_KEYin theenvblock of the config (see above).
For full provider/model details and feature status, see the main README and FEATURE_LIST.md.