Lexi词巢 Lexi
A dictionary that starts empty: every entry is generated by an LLM from a prompt, so it gets thicker the more you use it.一本「空词典」:词条不靠查,由大模型按提示词现场生成,越用越厚。
What it does做到了什么
- Shipped 0.1.0 to 0.1.3 behind a signed auto-update chain; in maintenance since从 0.1.0 迭代到 0.1.3,带签名自动更新链,现已进入维护
- 8 entry types, bilingual output that follows the UI language8 类词条(术语 / 单词 / 缩写 / 代码 / 产品公司 / 人物 / 概念 / 自定义),输出语言跟随界面
- No framework and no build step - native ES modules in the desktop shell界面无框架、无构建步骤——原生 ES Modules 直接进桌面壳
- The Rust side is 11 lines: window and system capability onlyRust 只负责窗口与系统能力,共 11 行
- A Cloudflare Worker holds the key, rate-limits, caches to R2 and trips a sliding-window breakerCloudflare Worker 代持 Key、限流、写入 R2 缓存,并按上游双窗口额度做滑动窗口熔断
- The same word queried twice costs 0 tokens同一个词第二次查询消耗 0 token
- The relay is live and public - lexi-api.bimon.net/v1/health answers right now中继已上线且可公开验证:lexi-api.bimon.net/v1/health 现在就能返回结果
Screens界面
Lexi began with a complaint about dictionaries. Looking a word up gives you what someone else decided to record; it does not give you what you actually needed to understand. So the dictionary here is empty on purpose - a prompt, a category and a model, and the entry is written for the question you asked.词巢起源于对词典的不满。查词给你的是别人决定要记录的东西,而不是你真正想弄明白的东西。所以这本词典故意是空的——一个提示词、一个分类、一个模型,词条是为你当下这个问题写出来的。
Keeping the key off the client不把 Key 放在客户端
A desktop app that talks to an LLM directly has to ship the API key, which is the same as publishing it. Lexi routes everything through a Cloudflare Worker that holds the key, applies the rate limit, and writes results into an R2 bucket shared by all users. The second person to look up the same word pays nothing.桌面应用直连大模型就必须把 API Key 打进安装包,等于公开。词巢全部走一个 Cloudflare Worker:Key 留在服务端,限流在服务端,结果写进所有用户共享的 R2 桶。第二个查同一个词的人不花钱。
Cost control as a design constraint把成本控制当成设计约束
The upstream quota is a 5-hour window plus a weekly window. Rather than a simple counter, the relay tracks both windows and trips a breaker before the quota is gone, so a heavy afternoon cannot silently break the tool for the rest of the week.上游额度是「5 小时窗口 + 周窗口」双规则。中继不是简单计数,而是同时跟踪两个窗口,在额度耗尽前熔断——避免一个活跃的下午把整周的工具悄悄用废。
A tool you can hand to someone else has to survive being used carelessly.能交给别人用的工具,必须扛得住被粗心地使用。Design note设计笔记
- No framework, no bundler, no node_modules in the app界面零框架、零打包器、零 node_modules
- Works offline for reading; only generation needs the relay阅读完全离线,只有生成需要中继
- Interface language and output language are separate settings界面语言与输出语言是两个独立设置