用 TS 写命令行工具,比你想的简单多了

用 TS 写命令行工具,比你想的简单多了

From AsyncTalk by AsyncTalk

June 2, 2026 · 12 min · Episode 2

About this episode

This episode discusses how to create a command line tool using TypeScript and Bun without relying on C, Go, or Rust.

万物皆可 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?评论区聊聊~ #CLI #命令行工具 #TypeScript #Bun #Ink #goreleaser #前端开发 #程序员 #开发工具 #ClaudeCode #AsyncTalk

People in this episode

Host: AsyncTalk

Topics covered

  • 命令行工具
  • TypeScript
  • Bun
  • Ink
  • goreleaser
  • 前端开发

Keywords

  • CLI
  • 命令行工具
  • TypeScript
  • Bun
  • Ink
  • goreleaser
  • 开发工具

Mentioned in this episode

Organizations: Bun, goreleaser

More episodes of AsyncTalk

Explore listener stats, chart rankings, contacts and more on the AsyncTalk podcast page.