claude-code-sugar
v2.0.60-20251207.2
Published
Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.
Readme
Claude Code Sugar 🍯
English | 中文 | 繁體中文 | 日本語 | 한국어 | Français | Deutsch | Español | Русский
Sweet enhancements for Claude Code - because coding should be delightful everywhere! 🌍
Why We Built This
Hey there! 👋 Let's be honest - we love Claude Code, but we ran into a frustrating problem. If you're not in the US, the web search feature just... doesn't work. And when you're doing research or need to look things up while coding, that's a real pain.
So we went on a hunt for solutions. And guess what? We stumbled upon something pretty cool - there are APIs out there that not only give you free search capabilities, but also access to some seriously impressive language models. Some of these models are actually better at understanding code and handling long contexts than what you might expect!
That got us thinking: "What if we could give Claude Code users the best of both worlds?"
What Claude Code Sugar Does
Instead of hacking Claude Code itself (which would be a maintenance nightmare), we built a lightweight proxy that sits between Claude Code and these APIs. Think of it as a translator that speaks both Claude Code's language and the language of these powerful APIs.
The result? You get:
- ✅ All of Claude Code's amazing features
- ✅ Web search that actually works globally
- ✅ Access to cost-effective, high-performance models
- ✅ OpenAI protocol compatibility (because standards matter)
- ✅ Zero modifications to Claude Code (so updates just work)
Note: This project is intended for academic and research purposes.
Get Started in 30 Seconds ⚡
Make Sure you have node.js 18+ installed, then just run this script in terminal:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/claude-code-sugar/claude-code-sugar/refs/heads/main/install.sh)"The installer will ask for a Search API Key - just hop over to iFlow Open Platform, grab your free key, and paste it in. Easy peasy! 🔑
Then fire up Claude Code like you normally would:
claudeThat's it! You're now running Claude Code with global search powers and access to cost-effective models. 🚀
Want to Use Different Models? 🎛️
Out of the box, Claude Code Sugar uses the qwen3-coder-plus model, which is pretty solid for most coding tasks. But hey, maybe you want to experiment with different models or use your own API endpoints!
No problem! Just edit ~/.config/claude-code-sugar/config.json and customize away:
{
"baseURL": "your openai base url",
"apiKey": "your openai api key",
"modelMapping": {
"small_model": "auxiliary model",
"model": "main loop model",
"opus_model": "main loop model(/model select opus)"
},
"searchApiKey": "your search api key"
}The model mapping lets you assign different models to different complexity levels - pretty neat for optimizing both performance and costs! 💰
