codex-chezmoi

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

用 chezmoi 同步 Codex 設定

使用 chezmoi 同步 Codex 配置

安裝 chezmoi

安装 chezmoi

Windows:
winget install twpayne.chezmoi
其他:https://chezmoi.io/install/
Windows:
winget install twpayne.chezmoi
其他:https://chezmoi.io/install/

納管安全設定

纳管安全配置

bash
chezmoi add ~/.codex/AGENTS.md
chezmoi add ~/.codex/skills/xxx
⚠️ 不要同步 entire
~/.codex/
(auth.json、logs、state 會洩漏)
bash
chezmoi add ~/.codex/AGENTS.md
chezmoi add ~/.codex/skills/xxx
⚠️ 不要同步整个
~/.codex/
(auth.json、logs、state 会泄露)

推送

推送

bash
chezmoi cd
git status --short
git add dot_codex/AGENTS.md dot_codex/skills/<本次修改的skill>
git commit -m "..."
git push
bash
chezmoi cd
git status --short
git add dot_codex/AGENTS.md dot_codex/skills/<本次修改的skill>
git commit -m "..."
git push

另一台電腦同步

在另一台电脑同步

bash
chezmoi init <repo-url>
chezmoi apply
bash
chezmoi init <repo-url>
chezmoi apply

之後:chezmoi update

之後:chezmoi update


另一台仍需手動:Codex 登入、Obsidian 路徑、GitHub 登入。

另一台电脑仍需手动完成:Codex 登录、Obsidian 路径、GitHub 登录。