MacOS 系统计算机专业好用工具安装

做一个 macOS 程序员一键安装脚本 ,用 Homebrew 自动安装常用工具,并附带终端环境配置,这样换电脑/重装系统时直接一行命令恢复开发环境。


1. 准备 Homebrew

如果你还没安装 Homebrew,先运行:

bash 复制代码
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. 创建一键安装脚本

新建一个脚本文件,比如 dev_setup.sh

bash 复制代码
nano dev_setup.sh

粘贴以下内容:

bash 复制代码
#!/bin/bash

echo "🚀 开始安装 macOS 开发者常用工具..."

# 确保 Homebrew 已更新
brew update

# --- 基础工具 ---
brew install git
brew install wget
brew install tree
brew install htop
brew install zsh
brew install starship # 终端美化

# --- 开发环境 ---
brew install --cask iterm2
brew install --cask warp
brew install --cask visual-studio-code
brew install --cask intellij-idea-ce
brew install --cask cursor
brew install --cask docker

# --- 终端增强 ---
brew install zsh-autosuggestions
brew install zsh-syntax-highlighting
brew install fzf
brew install thefuck

# --- API & 抓包 ---
brew install --cask postman
brew install --cask insomnia
brew install --cask proxyman

# --- 数据库 ---
brew install --cask tableplus
brew install --cask dbeaver-community
brew install --cask sequel-ace

# --- 效率工具 ---
brew install --cask raycast
brew install --cask rectangle
brew install --cask notion
brew install --cask obsidian

# --- 系统工具 ---
brew install --cask stats
brew install --cask appcleaner

# --- 设计相关 ---
brew install --cask figma
brew install --cask cleanshot

echo "✅ 所有工具安装完成!"

# --- 配置 Starship 终端美化 ---
if ! grep -q "eval \"\$(starship init zsh)\"" ~/.zshrc; then
    echo 'eval "$(starship init zsh)"' >> ~/.zshrc
fi

echo "🎨 已启用 Starship 终端美化,重新打开终端即可生效。"

3. 运行脚本

bash 复制代码
chmod +x dev_setup.sh ./dev_setup.sh

4. 脚本特点

  • 一行命令安装全部工具

  • 自动配置 Starship 美化终端

  • 包含 常用 IDE、抓包、数据库客户端、效率工具

  • 换电脑时只需:

bash 复制代码
curl -fsSL https://your-github-repo/dev_setup.sh | bash
相关推荐
清水白石0084 小时前
Python 编程实战全景:从基础语法到插件架构、异步性能与工程最佳实践
开发语言·python·架构
Halo_tjn7 小时前
Java 基于字符串相关知识点
java·开发语言·算法
梦想的颜色7 小时前
java 利用redis来限制用户频繁点击
java·开发语言
报错小能手7 小时前
Swift 并发 Combine响应式框架
开发语言·ios·swift
万法若空7 小时前
C++ <memory> 库全方位详解
开发语言·c++
代码中介商7 小时前
C++ 类型转换深度解析:static_cast、dynamic_cast、const_cast、reinterpret_cast
开发语言·c++
青小莫7 小时前
C++之string(OJ练习)
开发语言·c++·stl
freshman_y7 小时前
一篇介绍C语言中二级指针和二维数组的文章
c语言·开发语言
-Marks-8 小时前
【C++编程】STL简介 --- (是什么 | 版本发展历程 | 六大组件 | 重要性缺陷以及如何学习)
开发语言·c++·学习·stl·stl版本