https://github.com/coder/anyclaude
Claude Code with any LLM
https://github.com/coder/anyclaude
agents ai claude-code llm
Last synced: 5 months ago
JSON representation
Claude Code with any LLM
- Host: GitHub
- URL: https://github.com/coder/anyclaude
- Owner: coder
- License: mit
- Created: 2025-05-27T18:27:23.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-27T20:54:52.000Z (5 months ago)
- Last Synced: 2025-06-13T14:06:40.714Z (5 months ago)
- Topics: agents, ai, claude-code, llm
- Language: TypeScript
- Homepage:
- Size: 52.7 KB
- Stars: 25
- Watchers: 0
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-claude-code - anyclaude
README
# anyclaude

Use Claude Code with OpenAI, Google, xAI, and other providers.
- Extremely simple setup - just a basic command wrapper
- Uses the AI SDK for simple support of new providers
- Works with Claude Code GitHub Actions

## Get Started
```sh
# Use your favorite package manager (bun, pnpm, and npm are supported)
$ pnpm install -g anyclaude
# anyclaude is a wrapper for the Claude CLI
# `openai/`, `google/`, `xai/`, and `anthropic/` are supported
$ anyclaude --model openai/o3
```
Switch models in the Claude UI with `/model openai/o3`.
## FAQ
### What providers are supported?
See [the providers](./src/main.ts#L17) for the implementation.
- `GOOGLE_API_KEY` supports `google/*` models.
- `OPENAI_API_KEY` supports `openai/*` models.
- `XAI_API_KEY` supports `xai/*` models.
Set a custom OpenAI endpoint with `OPENAI_API_URL` to use OpenRouter
### How does this work?
Claude Code has added support for customizing the Anthropic endpoint with `ANTHROPIC_BASE_URL`.
anyclaude spawns a simple HTTP server that translates between Anthropic's format and the [AI SDK](https://github.com/vercel/ai) format, enabling support for any [AI SDK](https://github.com/vercel/ai) provider (e.g., Google, OpenAI, etc.)
## Do other models work better in Claude Code?
Not really, but it's fun to experiment with them.
`ANTHROPIC_MODEL` and `ANTHROPIC_SMALL_MODEL` are supported with the `/` syntax.