这个文档的目的是每次拿到新的 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/
brew install --cask visual-studio-code
安装 code 命令:
Cmd + Shift + P
shell command
Shell Command: Install 'code' command in PATH
brew 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 youdaodict
brew install --cask snipaste
brew install fnm
配置 FNM:
code ~/.zshrc
# fnm 配置
eval "$(fnm env --use-on-cd)"
source ~/.zshrc
fnm default <版本号>
CleanMyMac X:下载地址: https://www.macwk.com/soft/cleanmymac-x
腾讯柠檬清理(tencent-lemon):brew install --cask tencent-lemon
brew install --cask neteasemusic
下载地址: https://macked.app/irightmouse-crack.html
⚠️ 将 Cursor 添加到右键菜单
下载地址: https://github.com/objective-see/LuLu/releases
特点:开源、安全防控
Navicat lite: 免费正版:https://www.navicat.com/en/download/navicat-premium-lite
Navicat Pro:自行寻找
软件本体:https://github.com/lyswhut/lx-music-desktop
音乐源(进 dc 查找):https://antfe.com/dc
https://github.com/alsyundawy/Microsoft-Office-For-MacOS?tab=readme-ov-file
# 安装 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 --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
brew install zsh-autosuggestions
在 ~/.zshrc
的 plugins
数组中添加 zsh-autosuggestions
,然后执行 source ~/.zshrc
。
如果出现 “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
> 待补充
## 6. 🔑 Git 配置
### 1. 生成 SSH 密钥
```bash
# 生成新的 SSH 密钥对
ssh-keygen -t ed25519 -C "your-email@example.com"
# 查看公钥内容
cat ~/.ssh/id_ed25519.pub
# 配置 Git 身份信息(全局)
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
# 仅为当前仓库配置
git config user.email "you@example.com"
git config user.name "Your Name"
https://github.com/clash-verge-rev/clash-verge-rev
https://github.com/golang/go/tags
brew install goenv
# .zshrc
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
export PATH="$GOENV_ROOT/shims:$PATH"
goenv install 1.25.0
goenv global 1.25.0
# 为单独项目设置
goenv local 1.25.0
# 切换源吧
go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct
brew search postgresql
brew install postgresql@17
brew services start postgresql@17
# 废弃了
# echo 'export PATH="/usr/local/opt/postgresql@16/bin:$PATH"' >> ~/.zshrc
# 新的目录
echo 'export PATH="/opt/homebrew/opt/postgresql@17/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
psql postgres
# 创建用户
CREATE USER vadxq WITH PASSWORD '123456';
ALTER USER vadxq WITH SUPERUSER;
brew install redis
brew services start redis
brew services info redis