The open-source Claude Code alternative that runs on your own Cloudflare account
kimiflare is a terminal AI coding agent — an open-source, self-hosted alternative to Claude Code — powered by Kimi K2.7 on Cloudflare Workers AI. Same agentic workflow, your cloud, your cost, MIT-licensed.
Short answer: If you want a Claude Code-style coding agent in your terminal but prefer open source, self-hosting, and running on infrastructure you control, kimiflare is the closest Cloudflare-native option. You install it from npm, connect your own Cloudflare account, and every model call runs on Cloudflare Workers AI through your own AI Gateway — so you get per-request logs, response caching, and authoritative cost, not estimates.
What kimiflare and Claude Code have in common
Both are terminal-first agentic coding tools. They read and edit files, run shell commands, research the web, understand images, and work through multi-step tasks with a permission model that keeps you in control. Both support the Model Context Protocol (MCP) for plugging in external tools.
Where kimiflare is different
- Open source (MIT). The entire harness is on GitHub — read it, fork it, self-host it.
- Runs on your own Cloudflare account. Inference happens on Cloudflare Workers AI under your credentials. There is no separate vendor API to pay or trust.
- Kimi K2.7 with a 262K-token context window. Read entire modules, large configs, and full stack traces without losing the thread.
- Authoritative cost. Every request flows through your Cloudflare AI Gateway, so the
/costcommand reports gateway-confirmed cost per turn and per feature — not a token estimate. - No extra API keys. Beyond your Cloudflare credentials, nothing else is required to get started.
kimiflare vs Claude Code at a glance
| Capability | kimiflare | Claude Code |
|---|---|---|
| License | Open source (MIT) | Proprietary |
| Runs on | Your own Cloudflare account | Anthropic's API |
| Default model | Kimi K2.7 (Workers AI) | Claude |
| Context window | 262K tokens | 200K+ |
| Cost reporting | Authoritative (AI Gateway logs) | Estimated |
| Image understanding | Yes | Yes |
| MCP support | Yes | Yes |
| LSP code intelligence | Yes | Partial |
Reflects publicly documented capabilities at time of writing; both tools evolve quickly.
When to choose kimiflare
Choose kimiflare if you want an open-source coding agent, already use (or want to use) Cloudflare, care about keeping inference and logs in your own account, or want authoritative per-turn cost. Claude Code remains an excellent choice if you specifically want Anthropic's Claude models and a managed experience.
Get started in two commands
npm install -g kimiflare
# Run — onboarding connects your Cloudflare account
kimiflare
Or run without installing: npx kimiflare. Requires Node.js ≥ 20.
Install kimiflare Read the FAQ