# free-router:我整咗個CLI工具,令氛圍編程嘅成本變成0蚊 > Author: Tony Lee > Published: 2026-02-26 > URL: https://tonylee.im/zh-HK/blog/frouter-zero-cost-vibe-coding-free-ai-api-router/ > Reading time: 1 minutes > Language: zh-HK > Tags: ai, vibe-coding, open-source, cli, frouter, opencode, nvidia-nim, openrouter ## Canonical https://tonylee.im/zh-HK/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點開始寫code。到朝早,[free-router](https://github.com/tonylee/frouter)(free-router)已經行得郁。呢個係一個CLI工具,即時發現可用嘅免費AI API,直接駁入你嘅氛圍編程環境。 ## 阻住人嘅唔係技術門檻,而係費用門檻 身邊成日有人講同一番說話:「想試吓氛圍編程,但API費用令我行唔出第一步。」對學生開發者嚟講,每月20美金都係實實在在嘅開支。諷刺嘅係,免費模型嘅容量其實已經相當可觀。NVIDIA NIM提供約100個模型嘅免費API,OpenRouter可以專門篩選出提示成本為零嘅模型。再配合OpenCode呢類開源編程工具,實際支出就係零。 問題在於,冇人將呢啲碎片串成一個完整嘅工作流。 ## 真正難嘅係搵到「依家最快嘅免費模型」 有啲人知道免費模型嘅存在。更難嘅問題係:邊個模型喺呢一秒回應最快?我親自測過,同一個模型朝早200ms就回傳結果,下晝卻要等5秒。呢種波動足以搞冧一個正常嘅編程session。 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雙胞胎。script場景下,`--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個人一齊build。我想帶啲對參與者有用嘅嘢過去。 免費能做嘅事比大多數人想像嘅多。障礙從來唔係能力,只係連接未駁上而已。 ## Related URLs - Author: https://tonylee.im/en/author/ - Publication: https://tonylee.im/en/blog/about/ - Related article: https://tonylee.im/zh-HK/blog/medvi-two-person-430m-ai-compressed-funnel/ - Related article: https://tonylee.im/zh-HK/blog/claude-code-layers-over-tools-2026/ - Related article: https://tonylee.im/zh-HK/blog/codex-inside-claude-code-openai-plugin-strategy/ ## Citation - Author: Tony Lee - Site: tonylee.im - Canonical URL: https://tonylee.im/zh-HK/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-HK/blog/ This content is original and authored by Tony Lee. Please attribute when quoting or referencing.