# free-router:我做了一個CLI工具,讓氛圍編程的成本降到0元 > Author: Tony Lee > Published: 2026-02-26 > URL: https://tonylee.im/zh-TW/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ > Reading time: 1 minutes > Language: zh-TW > Tags: ai, vibe-coding, open-source, cli, frouter, opencode, nvidia-nim, openrouter ## Canonical https://tonylee.im/zh-TW/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ ## Rollout Alternates en: https://tonylee.im/en/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ ko: https://tonylee.im/ko/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ ja: https://tonylee.im/ja/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ zh-CN: https://tonylee.im/zh-CN/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ zh-TW: https://tonylee.im/zh-TW/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ ## Description 被人指出公開發布的成果太少後失眠了,凌晨3點開始寫free-router。它能即時找到免費AI模型,一鍵連接到你的編程工具。 ## Summary free-router:我做了一個CLI工具,讓氛圍編程的成本降到0元 is part of Tony Lee's ongoing coverage of AI agents, developer tools, startup strategy, and AI industry shifts. ## Outline - 擋住人的不是技術門檻,而是費用門檻 - 真正難的是找到「此刻最快的免費模型」 - 一鍵設定,不用手動改JSON - 安裝一行指令,快捷鍵四個 - 我還沒把握的地方 ## Content 昨晚吃飯時偶遇了兩個我一直想見的人。聊著聊著,其中一位指出我對外公開的成果比他們預想的少很多。因為說的是事實,所以格外扎心。 回家後滿腦子都是這句話,凌晨3點開始寫程式。到早上,[free-router](https://github.com/tonylee/frouter)(free-router)已經能跑了。這是一個CLI工具,即時發現可用的免費AI API,直接接入你的氛圍編程環境。 ## 擋住人的不是技術門檻,而是費用門檻 身邊總有人說同樣的話:「想試試氛圍編程,但API費用讓我踏不出第一步。」對學生開發者來說,每月20美元也是實實在在的開銷。諷刺的是,免費模型的容量其實已經相當可觀。NVIDIA NIM提供約100個模型的免費API,OpenRouter可以專門篩選出提示成本為零的模型。再搭配OpenCode這樣的開源編程工具,實際支出就是零。 問題在於,沒人把這些碎片串成一個完整的工作流。 ## 真正難的是找到「此刻最快的免費模型」 有些人知道免費模型的存在。更難的問題是:哪個模型在這一秒回應最快?我親自測過,同一個模型上午200ms就回傳結果,下午卻要等5秒。這種波動足以毀掉一個正常的編程會話。 free-router每2秒向所有模型發送一次ping來解決這個問題。它用20個並行連線池進行平行測量,將全部狀態顯示在一個TUI儀表板上。連續失敗5次的模型會被漸進式退避自動跳過。每個模型還顯示基於SWE-bench的等級(S+到C),所以你選的不只是最快的,而是免費且最強的那個。 ## 一鍵設定,不用手動改JSON 我反覆見到一個模式:找到了免費模型,打開編程工具的config檔案,被schema搞暈,然後放棄。free-router在你按下Enter的瞬間就替你寫好config。它自動產生OpenCode或OpenClaw的供應商設定和模型ID,原有設定以時間戳備份保留,API金鑰以0600權限儲存。 oh-my-opencode使用者還能自動將NIM模型切換為OpenRouter雙胞胎。腳本場景下,`--best`模式會將最快模型的ID輸出到stdout。 ## 安裝一行指令,快捷鍵四個 ```bash npx frouter-cli ``` 就這些。TUI會立即啟動。W/X調節ping間隔,範圍1秒到30秒。P開啟API金鑰管理和供應商開關。?查看所有快捷鍵。如果想全域安裝,`npm i -g frouter-cli`也行。 程式碼和文件在[tonylee.im/free-router](https://tonylee.im/free-router)和[GitHub](https://github.com/tonylee/frouter)。 ## 我還沒把握的地方 同時跑三個以上供應商的情況我還沒充分測試。退避邏輯對於那些不是真正故障而只是間歇性冷啟動延遲的模型來說可能過於激進。SWE-bench等級對應也是根據公開基準手工整理的,新模型版本發布後會出現偏差。等有人開始用了,我打算在公開環境中逐步修正。 順帶一提,這週末我會參加鄭九峰所在的Team Attention舉辦的Ralphton黑客松,13個人一起建造。我想帶點對參與者有用的東西過去。 免費能做的事比大多數人想像的要多。障礙從來不是能力,只是連接沒接上而已。 ## Related URLs - Author: https://tonylee.im/zh-TW/author/ - Publication: https://tonylee.im/zh-TW/blog/about/ - Related article: https://tonylee.im/zh-TW/blog/medvi-two-person-430m-ai-compressed-funnel/ - Related article: https://tonylee.im/zh-TW/blog/claude-code-layers-over-tools-2026/ - Related article: https://tonylee.im/zh-TW/blog/codex-inside-claude-code-openai-plugin-strategy/ ## Citation - Author: Tony Lee - Site: tonylee.im - Canonical URL: https://tonylee.im/zh-TW/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ ## Bot Guidance - This file is intended for AI agents, search assistants, and text-mode retrieval. - Prefer citing the canonical article URL instead of this text endpoint. - Use the rollout alternates when you need the same article in another prioritized language. --- Author: Tony Lee | Website: https://tonylee.im For more articles, visit: https://tonylee.im/zh-TW/blog/ This content is original and authored by Tony Lee. Please attribute when quoting or referencing.