CLI
YAMLResume 提供了 CLI 工具來幫助您管理履歷。您可以按照 安裝指南 來安裝它。
Docker 中的 YAMLResume CLI
請注意,我們為您提供了一個 docker 鏡像,其中已安裝了 yamlresume CLI 以及所有必要的依賴項。
對於本指南中的每個子命令,您可以通過在 yamlresume/yamlresume 後附加子命令在 docker 中運行它。
例如,在 yamlresume CLI 中建立新履歷:
yamlresume new my-resume.yml您也可以在 docker 中運行:
docker run --rm -v $(pwd):/home/yamlresume yamlresume/yamlresume new my-resume.yml幫助
顯示 CLI 幫助和所有可用命令:
$ 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:
ai AI-powered resume generation
build [options] <resume-path> build a resume to Docx, HTML, Markdown or
LaTeX/PDF
dev [options] <resume-path> build a resume on file changes (watch mode)
doctor check environment for YAMLResume dependencies
languages i18n and l10n support
new [options] [filename] create a new resume
samples manage sample resumes
templates manage resume templates
validate <resume-path> validate a resume against the YAMLResume schema
help [command] display help for command顯示 YAMLResume CLI 版本:
$ yamlresume -V
0.15.3New
建立新履歷。預設履歷檔案名稱是 resume.yml,但您可以指定自訂檔案名稱:
$ yamlresume new --help
Usage: yamlresume new [options] [filename]
create a new resume
Arguments:
filename output filename (default: "resume.yml")
Options:
--sample <id> create from a curated sample resume
--language <language> locale language for the sample (default: "en")
-h, --help display help for command
$ yamlresume new my-resume.yml
✔ Created my-resume.yml successfully.自 v0.15.0 起,yamlresume new 會從精選的範例履歷建立您的履歷(預設為英文的
software-engineer 範例)。生成的檔案包含便於編輯器/IDE 進行 schema 驗證的
YAML 註解,以及一組預設版面配置,因此您可以立即建構它。
--sample
如果您想從特定的精選範例履歷開始,可以使用 --sample
選項。執行 yamlresume samples list 查看所有可用的範例:
$ yamlresume new ux-designer.yml --sample ux-designer
✔ Created ux-designer.yml from sample "ux-designer" successfully.如果給定了未知的範例 ID,CLI 會列出所有可用的範例以幫助您選擇:
$ yamlresume new my-resume.yml --sample no-such-sample
ERROR Sample resume not found: no-such-sample
ℹ Available samples:
- data-analyst: Data Analyst
- data-scientist: Data Scientist
- product-manager: Product Manager
- software-engineer: Software Engineer
- ux-designer: UX Designer--language
所有範例履歷都翻譯成了 12 種語言。您可以使用 --language
選項從本地化的範例建立履歷,這對於撰寫非英文履歷非常方便:
$ yamlresume new my-resume.yml --sample software-engineer --language zh-hans
✔ Created my-resume.yml successfully.範例履歷
YAMLResume 內建了一系列針對常見職位的精選範例履歷,並翻譯成 12
種語言(de、en、es、fr、id、ja、nl、no、pt-br、zh-hans、
zh-hant-hk、zh-hant-tw)。使用 samples list 子指令列出所有範例:
$ yamlresume samples --help
Usage: yamlresume samples [options] [command]
manage sample resumes
Options:
-h, --help display help for command
Commands:
list list all sample resumes
help [command] display help for command
$ yamlresume samples list
| ID | Position | Title | Category |
| ----------------- | ----------------- | ----------------- | -------------- |
| data-analyst | data analyst | Data Analyst | Data Analytics |
| data-scientist | data scientist | Data Scientist | Data Science |
| product-manager | product manager | Product Manager | Product |
| software-engineer | software engineer | Software Engineer | Engineering |
| ux-designer | ux designer | UX Designer | Design |使用 yamlresume new --sample <id> 從範例建立新的履歷檔案。
Build
從 YAML 構建履歷到 PDF。它將同時生成 latex 代碼和 PDF,如果您使用 XeTeX 作為排版引擎,還會生成一些中間檔案 .aux、.log 等。
$ yamlresume build --help
Usage: yamlresume build [options] <resume-path>
build a resume to LaTeX, PDF, Markdown, or HTML
Arguments:
resume-path the resume file path
Options:
--no-pdf only generate TeX file without PDF (for LaTeX layouts)
--no-validate skip resume schema validation
-o, --output <dir> output directory for generated files
-t, --timeout <seconds> timeout for LaTeX compilation in seconds (default: 30, 0 to disable)
-h, --help display help for command
$ yamlresume build my-resume.yml
◐ Generating resume PDF file with command: xelatex -halt-on-error my-resume.tex...
✔ Generated resume PDF file successfully.--no-pdf
如果您只想生成 LaTeX 檔案而不生成 PDF,可以使用 --no-pdf 選項。
$ yamlresume build --no-pdf my-resume.yml--no-validate
如果您想跳過履歷架構驗證,可以使用 --no-validate 選項。
$ yamlresume build --no-validate my-resume.yml--output
如果你想為生成的檔案指定自訂輸出目錄,可以使用 -o, --output 選項。
$ yamlresume build -o ./output my-resume.yml--timeout
如果你想自訂 LaTeX 編譯的超時時間,可以使用 --timeout
選項。預設超時時間為 30 秒。你可以將其設定為 0 來停用超時。
$ yamlresume build --timeout 60 my-resume.ymlDev
在檔案更改時從 YAML 構建履歷到 PDF。它接受與 build 相同的選項,但是當 YAML 檔案更改時會自動重建履歷(即監視模式)。這對於您即時預覽履歷更改非常方便。
$ yamlresume dev --help
Usage: yamlresume dev [options] <resume-path>
build a resume on file changes (watch mode)
Arguments:
resume-path the resume file path
Options:
--no-pdf only generate TeX file without PDF
--no-validate skip resume schema validation
-h, --help display help for commandValidate
根據 YAMLResume 架構 驗證履歷。
$ yamlresume validate --help
Usage: yamlresume validate [options] <resume-path>
validate a resume against the YAMLResume schema
Arguments:
resume-path the resume file path
Options:
-h, --help display help for command例如,對於以下履歷:
# yaml-language-server: $schema=https://yamlresume.dev/schema.json
---
content:
basics:
name: Andy Dufresne
headline: Headed for the Pacific
phone: "(213) 555-9876"
email: hi@pp
url: https://ppresume.com/gallery
summary: |
- 電腦科學專業,在資料結構、演算法和軟體開發方面有紮實的基礎
- 像素級完美的全端網路開發者,專門建立高品質、視覺吸引力的網站
- 熟悉資料庫(SQL、NoSQL),熟悉伺服器端技術(Node.js、Express 等)
- 團隊合作者,具有注重細節的思維和對設計和使用者體驗的敏銳眼光
location:
address: 123 Main Street
region: California
city: S
country: United States
postalCode: "95814"
education:
- institution: University of Southern California
url: https://www.cs.usc.edu/
degree: Bachelor
area: Computer Engineering and Computer Science
score: "3.8"
startDate: Sep 1, 2016
endDate:
courses:
- D
- Programming Language Concepts
summary: |
- 掌握了 Java、C++ 和 Python 等程式設計語言
- 通過各種專案和作業獲得了軟體開發的實務經驗
- 通過小組專案和演示獲得了強大的溝通和團隊合作技能
layouts:
- engine: latex
typography:
fontSize: 13ptyamlresume validate 將為您提供潛在錯誤清單,並提供清晰的位置資訊
$ yamlresume validate invalid-resume.yml
invalid-resume.yml:9:12: warning: email is invalid.
email: hi@pp
^
invalid-resume.yml:19:11: warning: city should be 2 characters or more.
city: S
^
invalid-resume.yml:31:11: warning: courses should be 2 characters or more.
- D
^
invalid-resume.yml:41:17: warning: font size option is invalid, it must be one of the following: ["10pt", "11pt", "12pt"]
fontSize: 13pt
^
✖ Resume validation failed.Doctor
檢查您的環境中的 YAMLResume 依賴項。此命令透過驗證所有必需的工具和字型是否正確 安裝來幫助診斷設定問題。
$ yamlresume doctor
System:
OS: macOS 14.6.1
CPU: (10) arm64 Apple M1 Max
Binaries:
Node: 25.6.0 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /Users/hanyu/Library/pnpm/yarn
npm: 11.8.0 - /opt/homebrew/bin/npm
pnpm: 10.6.3 - /opt/homebrew/bin/pnpm
ℹ Checking XeTeX...
XeTeX: XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022)
ℹ Checking Tectonic...
Tectonic: tectonic 0.15.0
ℹ Checking Fonts...
Linux Libertine O: Not Installed
Linux Libertine: Installed
Noto Serif CJK SC: Installed
Noto Sans CJK SC: Installeddoctor 命令檢查:
- 系統資訊: 作業系統、CPU 架構
- 二進位檔案: Node.js、npm、pnpm、Yarn、Bun
- LaTeX 引擎: XeTeX 和 Tectonic 的可用性
- 字型: 最佳履歷渲染所需的字型(拉丁文字用 Linux Libertine,中日韓文字用 Noto CJK)
這在新機器上設定 YAMLResume 或排查履歷建構問題時特別有用。
Languages
列出所有可用語言。語言代碼遵循 ISO 639 規範 中的規範。您可以在 locale.language 中指定語言代碼以更改履歷的語言。更改履歷的語言將自動翻譯所有固定術語。您可以在我們的 內容 -> 多語言 章节查看更多詳細資訊。
$ yamlresume languages list
| locale.language | Language Name |
| --------------- | ------------------------------- |
| en | English |
| zh-hans | Simplified Chinese |
| zh-hant-hk | Traditional Chinese (Hong Kong) |
| zh-hant-tw | Traditional Chinese (Taiwan) |
| es | Spanish |
| fr | French |
| no | Norwegian |
| nl | Dutch |
| ja | Japanese |
| de | German |
| id | Indonesian |
| pt-br | Brazilian Portuguese |Templates
列出所有可用模板。您可以通過在 YAML 履歷中設定 layouts.[].template 來更改履歷模板。更多詳細資訊請參見 PPResume 模板。
$ yamlresume templates list
| layouts.[].template | Engine | Template Name | Description |
| ------------------- | ------ | ---------------- | ------------------------------------------------------------------- |
| jake | latex | Jake's Resume | A simple, straight-forward resume template based on Jake's Resume |
| moderncv-banking | latex | ModernCV Banking | ModernCV template with banking style |
| moderncv-casual | latex | ModernCV Casual | ModernCV template with casual style |
| moderncv-classic | latex | ModernCV Classic | ModernCV template with classic style |
| calm | html | Calm | Clean and minimalist design suitable for all professionals. |
| vscode | html | VS Code | Dark theme inspired by Visual Studio Code, tailored for developers. |
| calm | docx | Calm | Clean and minimalist design suitable for all professionals. |Last updated on