整理记录这台 MacBook Pro 的软件环境与配置,方便日后重装恢复或迁移参考。

提示:本文由 AI 整理,仅供参考

# 硬件概况

项目 信息
型号 MacBook Pro (MacBookPro18,3)
芯片 Apple M1 Pro
CPU 核心 8 核(6 性能 + 2 能效)
内存 16 GB
硬盘 494 GB SSD
系统 macOS 12.7.6 Monterey

# 已安装的 APP

# 开发工具

  • Visual Studio Code
  • Cursor
  • Codex (CLI)
  • Docker
  • FileZilla
  • Postman
  • MongoDB Compass
  • Visual Studio

# 浏览器 & 网络

  • Google Chrome
  • Safari(系统自带)
  • ClashX

# 效率工具

  • Alfred 5
  • Karabiner-Elements
  • Typora

# 办公 & 创作

  • WPS Office
  • Keynote / Numbers / Pages(系统自带)
  • Adobe Premiere Pro 2022
  • MATLAB R2023b

# 社交 & 通讯

  • 微信 (WeChat)
  • QQ
  • 钉钉 (DingTalk)
  • 飞书 (Lark)
  • 腾讯会议 (TencentMeeting)
  • Zoom

# 媒体 & 工具

  • IINA(视频播放器)
  • iMovie(系统自带)
  • Steam
  • 迅雷 (Thunder)
  • 百度网盘
  • 夸克网盘
  • Oka Unarchiver 2
  • Parallels Desktop(通过「PD 启动」)

# Homebrew

# Formula(brew leaves

按用途分类:

开发语言 & 运行时

fnm          # Node.js 版本管理
go           # Go 语言
rust         # Rust 语言
php          # PHP
uv           # Python 包管理器
ruff         # Python linter
ty           # Python 类型检查
meson        # 构建系统
cmake        # 构建系统
make         # GNU Make
automake     # 自动化构建

Git 相关

git          # 版本控制
gh           # GitHub CLI
git-lfs      # Git 大文件存储
git-sizer    # 仓库体积分析

C/C++ 库 & 工具

cryptopp     # 加密库
nlohmann-json # JSON 库
cxxopts      # 命令行参数解析
ada-url      # URL 解析库
c-ares       # 异步 DNS 解析
llhttp       # HTTP 解析器
simdjson     # SIMD JSON 解析
uvwasi       # WASI 实现
hdrhistogram_c # 高精度直方图

服务器 & 网络

nginx        # Web 服务器
httpd        # Apache HTTP 服务器
sshpass      # SSH 密码认证工具

文档 & 生成

asciidoc     # 文档标记语言
asciidoctor  # AsciiDoc 处理器
doxygen      # 文档生成器
sphinx-doc   # Python 文档生成
docbook-xsl  # DocBook XSL 样式表

系统 & 工具

htop         # 进程监视器
tree         # 目录树显示
tmux         # 终端复用器
gnu-sed      # GNU sed
sevenzip     # 7-Zip 压缩
smartmontools # 硬盘健康监控
lzip         # 数据压缩
nasm         # 汇编器
bison        # 语法分析器生成
swig         # 多语言接口生成器
imlib2       # 图像处理库

X11 相关

xcb-proto    # X11 协议描述
xtrans       # X11 传输库
util-macros  # X11 构建宏

# Cask

claude-code  # Claude Code CLI
codex        # OpenAI Codex CLI

# ~/.zshrc

# export
export TLDR_AUTO_UPDATE_DISABLED=true
export OPENSSL_ROOT_DIR=/opt/homebrew/opt/openssl@3
export MANPATH="/opt/local/share/man:$MANPATH"

# path
export PATH="/opt/X11/bin:$PATH"
export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(fnm env --use-on-cd --shell zsh)"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$HOME/mybin:$PATH"

# alias
alias proxyon='export http_proxy=http://127.0.0.1:7890;export https_proxy=http://127.0.0.1:7890;export ALL_PROXY=socks5://127.0.0.1:7890'
alias proxyoff='unset http_proxy;unset https_proxy;unset ALL_PROXY'
alias mpvs="mpv -start=0"
alias archactivate="arch -x86_64 /bin/zsh --login"
alias gitlog--pretty="git log --pretty=oneline --graph --abbrev-commit"
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias cc="claude"
alias ccd="claude --dangerously-skip-permissions"
alias ccp="claude --dangerously-skip-permissions -p"

# other
ssh-add --apple-use-keychain ~/.ssh/id_rsa

要点说明:

  • proxyon / proxyoff:快速开关终端代理(配合 ClashX 使用,默认端口 7890)
  • archactivate:切换到 Rosetta 2 x86_64 环境,用于运行不兼容 ARM 的旧工具
  • fnm env --use-on-cd:进入含 .node-version 的目录时自动切换 Node.js 版本
  • cc / ccd / ccp:Claude Code 的快捷别名
  • ssh-add --apple-use-keychain:将 SSH 私钥加入 macOS 钥匙串,避免每次输入密码

# 其它配置

# Git 全局配置

[filter "lfs"]
    clean = git-lfs clean -- %f
    smudge = git-lfs smudge -- %f
    process = git-lfs filter-process
    required = true
[init]
    defaultBranch = main
[pull]
    rebase = false

# SSH Config 结构

配置了多个远程主机的 SSH 快捷连接,均开启了 ForwardAgent yes(按需),结构示例:

Host <alias>
  HostName <ip-or-domain>
  Port <port>
  User <username>
  ForwardAgent yes

# Karabiner-Elements 自定义规则

规则 说明
CAPS_LOCK → HYPER / ESCAPE 单击 Caps Lock 触发 Escape,按住则作为 Hyper 键(Shift+Cmd+Opt+Ctrl)
Right Command + H/J/K/L → 方向键 Vim 风格的方向键映射,右 Command 作为修饰键

# VS Code 扩展

aaron-bond.better-comments        # 高亮注释
astral-sh.ty                      # Python 类型检查
charliermarsh.ruff                # Python linter
christian-kohler.path-intellisense # 路径自动补全
eamodio.gitlens                   # Git 增强
github.copilot-chat               # GitHub Copilot
github.vscode-pull-request-github # PR 管理
mechatroner.rainbow-csv           # CSV 彩色显示
ms-azuretools.vscode-containers   # 容器管理
ms-python.debugpy                 # Python 调试
ms-python.python                  # Python 支持
ms-python.vscode-pylance          # Python 语言服务
ms-python.vscode-python-envs      # Python 环境管理
ms-vscode-remote.remote-containers # Dev Containers
ms-vscode-remote.remote-ssh       # SSH 远程开发
ms-vscode-remote.remote-ssh-edit  # SSH 配置编辑
ms-vscode.remote-explorer         # 远程资源管理器
sukumo28.wav-preview              # WAV 音频预览
tamasfe.even-better-toml          # TOML 支持
vscode-icons-team.vscode-icons    # 文件图标主题

# 语言版本管理策略

语言 管理方式 已安装版本
Node.js fnm v24.13.1 (LTS)
Python uv + Homebrew 3.14, 3.13, 3.12, 3.11
Go Homebrew 1.26.0
Rust Homebrew 1.93.1