claude-code-free A developer has published a guide for configuring Anthropic's Claude Code CLI tool to use OpenCode's free API endpoint instead of Anthropic's direct API. The setup requires editing the `~/.claude/settings.json` file to point `ANTHROPIC_BASE_URL` to `https://opencode.ai/zen` and setting the model to `minimax-m2.5-free`. The configuration works on both Linux via WSL2 and Windows systems with Node.js installed. Quick reference guide for setting up Claude Code with OpenCode OpenCode is an AI-powered coding assistant CLI tool that helps with software engineering tasks. It uses various LLM providers including Anthropic Claude. Website : https://opencode.ai/ https://opencode.ai/ Claude Code is Anthropic's official CLI tool for interacting with Claude AI. It can be configured to use OpenCode's free API endpoint instead of Anthropic's direct API. Product Page : https://claude.com/product/claude-code https://claude.com/product/claude-code - Windows 10/11 Machine Running WSL2 Linux Ubuntu Machine - Node.js - OpenCode Zen account sudo apt update sudo apt install nodejs npm sudo npm install -g @anthropic-ai/claude-code Edit ~/.claude/settings.json : code ~/.claude/settings.json { "env": { "ANTHROPIC BASE URL": "https://opencode.ai/zen", "ANTHROPIC MODEL": "minimax-m2.5-free", "ANTHROPIC API KEY": "opencode-api-key", "ENABLE TOOL SEARCH": "true" } } | Variable | Value | Description | |---|---|---| ANTHROPIC BASE URL | https://opencode.ai/zen | OpenCode API endpoint | ANTHROPIC MODEL | minimax-m2.5-free | Model to use | ANTHROPIC API KEY | opencode-api-key | Your OpenCode API key | ENABLE TOOL SEARCH | true | Enable tool search feature | | Command | Description | |---|---| claude -helps | To check available commands | claude -p "