这个文档的目的是每次拿到新的 MacBook 时,方便快速初始化笔记本,安装必备工具并记录必要的配置。也是想收集大家平时好用的软件,及时体验上新的好工具
- GitHub 仓库: https://github.com/Chiaki-xps/init-my-macbook
- 在线文档: https://chiaki-xps.github.io/init-my-macbook/
- 提供您认为好用的软件: GitHub Issues
建议通过 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
- 这里提供一下导入vscode插件失败的方案(谨慎使用,因为Cursor最新版本和VS Code部分插件存在兼容问题)
-
# 找到 cursor 程序下 product.json code /Applications/Cursor.app/Contents/Resources/app/product.json -
找到
extensionsGallery,将其中https://marketplace.cursorapi.com改成https://marketplace.visualstudio.com -
重启,重新导入就可以了,记得还原文件
- Typora:下载地址: https://xclient.info/s/typora.html
- 页面简洁,个人感觉展示效果更好,但是收费。低版本免费。
- Obsidian:下载方式:
brew install --cask obsidian- 功能强大,基础功能免费
brew install --cask wechat qq tencent-meeting
⚠️ 记得修改存储路径
brew install --cask mosbrew install --cask youdaodictbrew install --cask snipastebrew 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-licensebrew install --cask iterm2设置为默认终端:
- 打开 iTerm2
- 菜单栏:iTerm2 → Make iTerm2 Default Term
# 安装 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:
- Apple 芯片(Homebrew 默认前缀
/opt/homebrew)echo 'source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc source ~/.zshrc
- Intel 芯片(Homebrew 默认前缀
/usr/local)echo 'source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc source ~/.zshrc
验证是否生效:打开新终端,输入部分命令应出现灰色联想;或执行
grep -n "zsh-autosuggestions.zsh" ~/.zshrcbrew 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"
- 复制公钥内容
- 登录 GitHub → Settings → SSH and GPG keys
- 点击 "New SSH key"
- 粘贴公钥并保存
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/,directbrew 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