YAMLResume 登陸 Homebrew

YAMLResume 已收錄進 Homebrew,簡化在 macOS 上的安裝與升級

YAMLResume 剛剛被 Homebrew 接受Homebrew 是 macOS 上最流行的套件管理工具。這代表 macOS 使用者現在可以用一個可信的命令安裝並保持 YAMLResume 為最新版本——無需手動全域安裝 Node.js,無需處理雜亂的路徑。本文展示使用 Homebrew 取得 YAMLResume 的詳細步驟,以及用於產生最佳 PDF 輸出的排版引擎。

YAMLResume on Homebrew

為什麼重要

過去在 macOS 上取得 YAMLResume CLI 的典型步驟是:

  1. 安裝 Node.js
  2. 透過 Node.js 套件管理器 (npm/pnpm/yarn/bun) 安裝 yamlresume CLI
  3. 安裝排版引擎 用以產生 PDF

一個 Homebrew formula 可以把第 1 步和第 2 步合併,因爲 Homebrew 能幫你管理 Node.js 依賴。這減少環境配置問題並簡化升級(brew upgrade yamlresume)。

快速安裝

brew install yamlresume

若尚未安裝 Node.js,Homebrew 會自動作為依賴安裝。

接著驗證:

$ yamlresume help
Usage: yamlresume [options] [command]

YAMLResume — Resume as Code in YAML

 __   __ _    __  __ _     ____
 \ \ / // \  |  \/  | |   |  _ \ ___  ___ _   _ ___  ___   ___
  \ V // _ \ | |\/| | |   | |_) / _ \/ __| | | / _ \/ _ \ / _ \
   | |/ ___ \| |  | | |___|  _ <  __/\__ \ |_| | | | | | |  __/
   |_/_/   \_\_|  |_|_____|_| \_\___||___/\____|_| |_| |_|\___|


Options:
  -V, --version                  output the version number
  -v, --verbose                  verbose output
  -h, --help                     display help for command

Commands:
  new [filename]                 create a new resume
  build [options] <resume-path>  build a resume to LaTeX and PDF
  dev [options] <resume-path>    build a resume on file changes (watch mode)
  languages                      i18n and l10n support
  templates                      manage resume templates
  validate <resume-path>         validate a resume against the YAMLResume schema
  help [command]                 display help for command

如果能看到幫助輸出,說明 YAMLResume CLI 已經在你的 PATH 中。

YAMLResume 依賴排版引擎以產生 PDF;你可以透過 Homebrew 安裝 MacTeXTectonic

選項 A:完整 TeX Live (XeTeX)

透過 MacTeX cask 安裝(包含 XeTeX):

# install the full mactex
brew install mactex
# or if you want to save some disk space
brew install mactex-no-gui

安裝後確保 TeX 可執行檔位於 PATH(Homebrew 通常在 /Library/TeX/texbin 下建立符號連結)。測試:

$ xelatex --version
XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022)
kpathsea version 6.3.4
Copyright 2022 SIL International, Jonathan Kew and Khaled Hosny.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 70.1; using 70.1
Compiled with zlib version 1.2.11; using 1.2.11
Compiled with FreeType2 version 2.11.1; using 2.11.1
Compiled with Graphite2 version 1.3.14; using 1.3.14
Compiled with HarfBuzz version 3.4.0; using 3.4.0
Compiled with libpng version 1.6.37; using 1.6.37
Compiled with pplib version v2.05 less toxic i hope
Using Mac OS X Core Text and Cocoa frameworks

選項 B:Tectonic(輕量)

$ brew install tectonic
$ tectonic --version

該選哪個?

引擎優點缺點
XeTeX相容性最高;成熟生態下載體積大(4–6 GB)
Tectonic初始體積極小;自動取得所需 LaTeX 套件與 XeTeX 相比偶爾有相容性差異

若遇到無法解釋的 LaTeX 套件問題或進階字型處理情況,改回 XeTeX。

建立並構建履歷

建立一份初始 YAML 履歷:

$ yamlresume new my-resume.yml
✔ Created my-resume.yml successfully.

在編輯器中查看與修改 my-resume.yml,然後構建 PDF:

$ yamlresume build my-resume.yml
◐ Generating resume PDF with command: xelatex -halt-on-error my-resume.tex...
✔ Generated resume PDF successfully.

內部流程:

  1. my-resume.yml 轉換為 LaTeX (my-resume.tex)
  2. 呼叫排版引擎 (xelatextectonic)
  3. 產生 my-resume.pdf

升級

保持最新(新模板、修復、i18n 改進):

$ brew update
$ brew upgrade yamlresume

移除

$ brew uninstall yamlresume

僅在不再需要時移除可選依賴(字型、TeX 引擎等)。

疑難排解

使用詳細模式協助診斷構建問題:

$ yamlresume build --verbose my-resume.yml

常見解法:

  • 缺少排版引擎:安裝 MacTeX 或使用 Tectonic。
  • 寫入檔案權限被拒:確認目前目錄可寫(避免系統路徑)。
  • Tectonic 出現奇怪 LaTeX 錯誤:改回 XeTeX (brew install mactex)。

結語

被 Homebrew 收錄降低了新用戶的門檻並體現項目的成熟度。如遇特殊情況,歡迎提交 issuediscussion —— 我們迭代很快。祝編碼愉快,願你的簡歷始終像素級完美!

最後,感謝 @chenrui333 的最初 PR,讓 YAMLResume 收錄進 Homebrew。

Written by

Xiao Hanyu

At

Fri Nov 21 2025