Skip to content

Repository files navigation

dotfiles

macOS 开发环境配置仓库,集中管理终端、编辑器、包管理与网络规则。

仓库内容

  • Shell: .zshrc.p10k.zsh.oh-my-zsh/(插件与命令)
  • Editor: .vimrc.spacemacssettings.jsonlaunch.json
  • Package: Brewfile
  • Network: mihomo/rules/*.yaml
  • Script: brew_backup_restore.sh
  • Terminal: iTerm2 可迁移配置(偏好导出与恢复脚本)
  • Tool Chain: Mac / Linux Tool Chain

快速恢复

brew bundle --file ./Brewfile
ln -sf "$(pwd)/.zshrc" ~/.zshrc
ln -sf "$(pwd)/.p10k.zsh" ~/.p10k.zsh
ln -sf "$(pwd)/.vimrc" ~/.vimrc
ln -sf "$(pwd)/.tmux.conf" ~/.tmux.conf
source ~/.zshrc

Brewfile 同时安装 iTerm2 与 MesloLGS Nerd Font;完成安装后再导入偏好。

iTerm2 偏好恢复(先退出 iTerm2):

./iterm2/install.sh

Shell 配置(~/.zshrc)

  • 框架:Oh My Zsh + Powerlevel10k(含即时提示)
  • 插件:gitjjuvpnpmdocker-composezyou-should-usetmuxjjmap10k-jj-statuszsh-autosuggestionszsh-syntax-highlighting
  • JJ 提示:zsh-jj 提供 vcs_info 的 JJ 后端(仅加载其 functions/,不 source 会重设 PROMPT 的完整插件);p10k-jj-status 提供异步 JJ working-copy 段,需在 .p10k.zshPOWERLEVEL9K_LEFT_PROMPT_ELEMENTSRIGHT_PROMPT_ELEMENTS 中加入 jj_status
  • PATH:~/.local/bin~/.opencode/bin、pnpm、Maven、Go(GOPROXY 腾讯镜像)、Rust(rsproxy.cn)、fnm(Node)
  • 别名 / 函数:
    • eza 列表:lsllllalldllfltlt3lt4
    • uv:uruausuvp
    • 工具:c(clear)、y(yazi)、t(history)、wattagemyipnvup(Neovim 插件/Mason 更新)、flushdnsipv6onipv6offmkcdextractffport
    • 时区:tz jp|sg|la|system(默认系统时区,需要时用 tz 临时切换)
    • 代理:proxyon / proxyoff(127.0.0.1:7890)
  • AI CLI(详见下节):codex 包装函数、ai upgrade

AI Agent Coding 工具

版本以各工具 --version 实测为准(下表为 2026-08-20 数据)。

工具 定位 安装 维护 / 升级
OpenAI Codex 本地代码 agent `curl -fsSL https://chatgpt.com/codex/install.sh sh(非交互:CODEX_NON_INTERACTIVE=1 sh;装在 /.codex/packages/standalone,入口 /.local/bin/codex`)
Antigravity agy agent CLI / workflow `curl -fsSL https://antigravity.google/cli/install.sh bash~/.local/bin/agy`)
herdr 多 agent 编排 CLI / runtime `curl -fsSL https://herdr.dev/install.sh sh(或 brew install herdr`)
Otty 终端 / agent 辅助入口 Otty 应用内 Shell Integration 安装(~/.local/bin/otty 应用内更新
opencode 本地 agent `curl -fsSL https://opencode.ai/install bash~/.opencode/bin/opencode`)

常用入口(来自 ~/.zshrc):

  • Codex:cx(默认 --yolo + high reasoning)、cx-safecx-nevercx-requestcx-untrusted
  • agy:agag-editag-plan
  • 升级:ai upgrade(无参数时升级整套 AI toolchain:codex / agy / herdr / opencode;也可单升如 ai upgrade codex;实现在 ~/.config/zsh/ai-upgrade.zsh

注:上述版本为 2026-08-20 实测(codex-cli 0.148.0、agy 1.1.15、opencode 1.18.18、herdr 0.8.2、otty 1.4.1)。版本以各自 --version 为准,可用 ai upgrade 单独或整套刷新。

插件文档

说明

  • 默认面向 macOS + zsh + Homebrew
  • 配置包含个人化 alias、代理和路径设置,使用前建议先审阅并按需裁剪。

About

emacs zsh vimrc vscode homebrew

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages