Recipe: Git Workflows
yaku works well with git output via stdin pipes. Here are common workflows for multilingual teams.
Translate commit messages
Section titled “Translate commit messages”# Last 10 commitsgit log --oneline -10 | yaku --to en
# With full messagesgit log --format="%h %s" -10 | yaku --to enTranslate a diff
Section titled “Translate a diff”Translate the human-readable parts of a diff while preserving diff markers:
git diff HEAD~1 | yaku --to enyaku translates the changed content. Diff markers (+, -, @@) and file paths are preserved by the LLM’s built-in rules.
Translate a commit message before committing
Section titled “Translate a commit message before committing”Write your commit message in your native language, then translate or polish it to English:
# Write in your language, translate to Englishecho "修正了登入頁面的驗證錯誤" | yaku --to en# Fixed the validation error on the login page
# Or use polish mode for rough English draftsecho "fix the bug where user cant login when password has special chars" | \ yaku --mode polish --to en# Fix the bug where users cannot log in when their password contains special charactersTranslate PR descriptions
Section titled “Translate PR descriptions”Use the GitHub CLI to fetch and translate PR descriptions:
# Translate a PR bodygh pr view 42 --json body -q .body | yaku --to en
# Translate PR commentsgh api repos/owner/repo/pulls/42/comments \ --jq '.[].body' | yaku --to enTranslate release notes
Section titled “Translate release notes”# Translate the latest release notesgh release view --json body -q .body | yaku --to en- Use
--contextfor git output. Adding--context "git commit messages"helps the LLM understand the format. - Pipe through
headfor large diffs. Avoid sending enormous diffs:git diff | head -200 | yaku --to en. - Review before committing. Always review translated commit messages before using them in your git history.