Kimiflare
Moonshot's open-weight Kimi running on your own Cloudflare account. No middleman.
Ask AI about Kimiflare
Powered by Claude Β· Grounded in docs
I know everything about Kimiflare. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
A terminal coding agent powered by Kimi-K2.6 on Cloudflare Workers AI.
Moonshot's 1T-parameter open-source model, running directly in your terminal.
Two ways to run
| Mode | How it works | Best for |
|---|---|---|
| BYOK | Bring your own Cloudflare Account ID + API Token. Traffic goes straight to Workers AI from your account. | Power users who want full control and direct billing. |
| Kimiflare Cloud | Device auth β no API key needed. We proxy requests through our managed endpoint. | Getting started quickly without a Cloudflare account. |
π Try Kimiflare Cloud free β sign up and get 5 million tokens on us until May 14, 2026. Run
kimiflare --cloudor pick "Cloud (managed)" during onboarding.
What to remember
- 262k context window β Read entire modules, large configs, and full stack traces without the model losing track.
- Image understanding β Drop image paths (PNG, JPG, WebP, GIF, BMP up to 5 MB) into any prompt. Great for UI reviews, diagrams, and screenshots.
- Plan / Edit / Auto modes β
planblocks mutating tools for safe research.edit(default) prompts per mutating call.autoapproves everything for trusted tasks. - Live cost tracking β Status bar shows real-time spend based on Cloudflare pricing. Know exactly what each turn costs.
- LSP + MCP β Semantic code intelligence (hover, go-to-definition, references, diagnostics) via Language Server Protocol. Extend with external tools via Model Context Protocol.
- Local structured memory β SQLite + embeddings cross-session memory. The agent recalls facts, instructions, and preferences across sessions via
remember,recall, andforgettools. - Web search, GitHub, and headless browser β Research the web, read GitHub repos, and fetch JavaScript-rendered pages without leaving your terminal.
Recently shipped
- Turn supervisor architecture β graceful preemption, visual cleanup, and better multi-step task management.
- Web search, GitHub read-only, and headless browser tools β research without leaving the terminal.
- Tiered skill routing β the agent picks the right skill depth for the task, with visible TUI indicators.
- Extensible JSON themes β WCAG contrast-validated, fully customizable color palettes.
- KIMI.md drift detection β memory-based staleness indicators warn when your project context file is out of date.
- Fuzzy @ file picker β type
@to mention files with fuzzy matching and inline filtering. - Kimiflare Cloud mode β device auth, no API key needed, with real-time token budget tracking.
- Context-window guardrails β prevents runs that would exceed the model's limit before they start.
See the full changelog at github.com/sinameraji/kimiflare/releases.
Quick start
npm install -g kimiflare
kimiflare
On first run, an interactive onboarding wizard asks how you want to connect β BYOK or Cloud. That's it.
Or run without installing:
npx kimiflare
Requires Node.js β₯ 20.
One-shot mode
kimiflare -p "summarize PLAN.md" # stream answer to stdout
kimiflare -p "..." --dangerously-allow-all # auto-approve mutating tools (for scripts)
kimiflare -p "..." --reasoning # include chain-of-thought in stderr
Image understanding
kimiflare
βΊ fix the layout bug in this screenshot docs/bug.png
βΊ convert this mockup design.png to Tailwind HTML
Slash commands
| Command | Effect |
|---|---|
/mode edit|plan|auto | Switch permission mode |
/thinking low|medium|high | Reasoning effort (persists) |
/theme | Interactive theme picker (Ctrl+T) |
/resume | Pick a past conversation to restore |
/compact | Summarize older turns to free context |
/init | Scan repo and write KIMI.md project context |
/memory | Show memory stats and search |
/mcp list / /mcp reload | Manage MCP servers |
/reasoning | Toggle chain-of-thought display |
/cost | Show token usage for current turn |
/update | Check for updates |
/help | List all commands |
Keyboard shortcuts
| Shortcut | Action |
|---|---|
Ctrl+C / Esc | Interrupt current turn when busy; exit when idle |
Ctrl+R | Toggle reasoning display |
Ctrl+O | Toggle verbose tool output |
Ctrl+T | Open theme picker |
Shift+Tab | Cycle mode (edit β plan β auto) |
β / β | Walk prompt history |
Development
git clone https://github.com/sinameraji/kimiflare
cd kimiflare
npm install
npm run build
npm link
Scripts:
npm run buildβ bundle with tsupnpm run devβ run via tsxnpm run typecheckβtsc --noEmitnpm testβ run tests
Contributing
- Fork the repository
- Create a branch:
git checkout -b feat/your-feature - Make your changes
- Run
npm run typecheckandnpm run build - Commit with Conventional Commits
- Open a Pull Request
Built by Sina Meraji and contributors Β· MIT License
