File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ type : podcast-episode
3+ status : published
4+ slug : /posts/ep66
5+ guid : 66
6+ title : " EP66 用 TS 写命令行工具,比你想的简单多了"
7+ subtitle : " Bun 打包成单文件 binary,goreleaser 一把梭搞定签名、公证、分发"
8+ publicationDate : 2026-06-02 14:00:00
9+ author : AnnatarHe
10+ season : 3
11+ episodeNumber : 66
12+ episodeType : full
13+ excerpt : " EP66 用 TS 写命令行工具,比你想的简单多了:Bun 打包成单文件 binary,goreleaser 一把梭搞定签名、公证、分发"
14+ url : https://www.xiaoyuzhoufm.com/episode/6a1eb84b92551efcff54fc0f
15+ size : 0
16+ duration : 0
17+ explicit : false
18+ xyzLink : https://www.xiaoyuzhoufm.com/episode/6a1eb84b92551efcff54fc0f
19+ youtubeId : pVQViO74jLE
20+ biliUrl : //player.bilibili.com/player.html?isOutside=true&aid=116675856832249&bvid=BV1ugVf6mEAF&cid=38781848002&p=1
21+ categories :
22+ - cli
23+ - typescript
24+ - bun
25+ - ink
26+ - goreleaser
27+ - claude-code
28+ - tooling
29+ - frontend
30+ ---
31+
32+ ### 📕 Shownotes
33+
34+ 万物皆可 CLI 的时代(尤其 AI 起来之后),怎么写一个好用的命令行工具?这期聊点不一样的——不碰 C/Go/Rust,直接用 TypeScript + Bun 也能整一个能发给用户的 CLI。
35+
36+ 从 ` bun init ` 起步,命令解析交给 citty,界面渲染用 Ink(对,就是用 React 写 TUI),最后 ` bun build --compile ` 一把打成单文件。57 兆是大了点,但是它能用(doge)。
37+
38+ 最折磨人的签名 + 公证怎么办?goreleaser 从 2.6 开始把 bun 当一等公民支持,checksum、changelog、打包、公证、Homebrew 分发全给你包圆了。顺带提一句:Mac 开发者证书 99 刀一年,这钱是真省不掉。
39+
40+ 下期预告:怎么把这整套编译流程自动化掉。
41+
42+ 你写过 / 用过哪些有意思的 CLI?评论区聊聊~
43+
44+ 关注【异步聊技术 AsyncTalk】,每期聊点有趣又有料的技术。
45+
46+ BGM by Otologic
You can’t perform that action at this time.
0 commit comments