Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions src/content/posts/ep66.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
type: podcast-episode
status: published
slug: /posts/ep66
guid: 66
title: "EP66 用 TS 写命令行工具,比你想的简单多了"
subtitle: "Bun 打包成单文件 binary,goreleaser 一把梭搞定签名、公证、分发"
publicationDate: 2026-06-02 14:00:00
author: AnnatarHe
season: 3
episodeNumber: 66
episodeType: full
excerpt: "EP66 用 TS 写命令行工具,比你想的简单多了:Bun 打包成单文件 binary,goreleaser 一把梭搞定签名、公证、分发"
url: https://www.xiaoyuzhoufm.com/episode/6a1eb84b92551efcff54fc0f
size: 0
duration: 0
explicit: false
xyzLink: https://www.xiaoyuzhoufm.com/episode/6a1eb84b92551efcff54fc0f
youtubeId: pVQViO74jLE
biliUrl: //player.bilibili.com/player.html?isOutside=true&aid=116675856832249&bvid=BV1ugVf6mEAF&cid=38781848002&p=1
categories:
- cli
- typescript
- bun
- ink
- goreleaser
- claude-code
- tooling
- frontend
---

### 📕 Shownotes

万物皆可 CLI 的时代(尤其 AI 起来之后),怎么写一个好用的命令行工具?这期聊点不一样的——不碰 C/Go/Rust,直接用 TypeScript + Bun 也能整一个能发给用户的 CLI。

从 `bun init` 起步,命令解析交给 citty,界面渲染用 Ink(对,就是用 React 写 TUI),最后 `bun build --compile` 一把打成单文件。57 兆是大了点,但是它能用(doge)。

最折磨人的签名 + 公证怎么办?goreleaser 从 2.6 开始把 bun 当一等公民支持,checksum、changelog、打包、公证、Homebrew 分发全给你包圆了。顺带提一句:Mac 开发者证书 99 刀一年,这钱是真省不掉。

下期预告:怎么把这整套编译流程自动化掉。

你写过 / 用过哪些有意思的 CLI?评论区聊聊~

关注【异步聊技术 AsyncTalk】,每期聊点有趣又有料的技术。

BGM by Otologic
Loading