这个文档的目的是每次拿到新的 MacBook 时,方便快速初始化笔记本,安装必备工具并记录必要的配置。也是想收集大家平时好用的软件,及时体验上新的好工具
建议通过 Issue 或 Pull Request 提交修改。合并前我会逐一验证每个软件的安装与使用。对于功能重叠或类型相近的软件,我会在文档中合并对比,并给出推荐项。建议在 PR 中附上变更说明、测试环境与必要截图。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew --version
官网地址: https://brew.sh/zh-cn/
# 1. 生成新的 SSH 密钥对
ssh-keygen -t ed25519 -C "your-email@example.com"
# 2. 查看公钥内容
cat ~/.ssh/id_ed25519.pub
# 3. 配置 github
# 1. 复制公钥内容
# 2. 登录 GitHub → Settings → SSH and GPG keys
# 3. 点击 "New SSH key"
# 4. 粘贴公钥并保存
# 4. 配置 Git 身份信息(全局)
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
# 5. 仅为当前仓库配置
git config user.email "you@example.com"
git config user.name "Your Name"
brew install --cask iterm2
设置为默认终端:
# 安装 Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# 下载主题仓库
git clone https://github.com/dracula/iterm.git
安装步骤: https://draculatheme.com/iterm
Dracula.itermcolors file;brew install zsh-autosuggestions
~/.zshrc 的 plugins 数组中添加 zsh-autosuggestions,然后执行 source ~/.zshrc。plugins=(git zsh-autosuggestions)
~/.zshrc:/opt/homebrew)echo 'source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc
source ~/.zshrc
/usr/local)echo 'source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc
source ~/.zshrc
验证是否生效:打开新终端,输入部分命令应出现灰色联想;或执行
grep -n "zsh-autosuggestions.zsh" ~/.zshrc
brew install zsh-syntax-highlighting
echo 'source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' >> ~/.zshrc
source ~/.zshrc
brew install --cask visual-studio-code
安装 code 命令:
Cmd + Shift + Pshell commandShell Command: Install 'code' command in PATHbrew install --cask cursor
导入 VS Code 配置:首选项 → Cursor Setting → Import Settings from VS Code
# 找到 cursor 程序下 product.json
code /Applications/Cursor.app/Contents/Resources/app/product.json
找到 extensionsGallery,将其中 https://marketplace.cursorapi.com 改成 https://marketplace.visualstudio.com
brew install --cask obsidian
brew install --cask wechat qq tencent-meeting
⚠️ 记得修改存储路径
brew install --cask mos
brew install --cask google-chrome
brew install --cask youdaodict
brew install --cask snipaste
CleanMyMac X:下载地址: https://www.macwk.com/soft/cleanmymac-x
腾讯柠檬清理(tencent-lemon):brew install --cask tencent-lemon
brew install --cask neteasemusic
下载地址: https://macked.app/irightmouse-pro-crack.html
⚠️ 将 Cursor 添加到右键菜单
# 安装社区版
brew install --cask dbeaver-community
allowPublicKeyRetrieval设置为true
caching_sha2_password 认证插件true 后,允许客户端向服务器请求公钥完成认证# 安装 nrm(npm 源管理)
npm install nrm -g
# 安装 pnpm(快速包管理器)
npm install pnpm -g
# ARM Mac 需要安装 Rosetta 以支持低版本 Node
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
brew install fnm
配置 FNM:
编辑配置文件:code ~/.zshrc
添加以下配置:
# fnm 配置
eval "$(fnm env --use-on-cd)"
重新加载配置:source ~/.zshrc
设置默认版本:fnm default <版本号>
处理 arm 版本 mac 低版本 node
# 安装 Rosetta 2
softwareupdate --install-rosetta
# 同意许可协议
softwareupdate --install-rosetta --agree-to-license
高版本启动yarn pnpm
corepack enable