阿里妹導讀
本文主要介紹後端開發同學常用的工具以及開發環境搭建。
線上工具
IT Tools:https://it-tools.tech
輸入法
程式設計師可定製的輸入法 – RIME 輸入法 https://rime.im/
可以透過 yaml 檔案定製自己的訴求,上手成本稍微高一些。

一般同學推薦用Mac自帶輸入法 或者 搜狗之類的,除非你喜歡折騰。
截圖軟體
https://www.xnipapp.com

免費版本的功能已經很強大了,如果喜歡也可以選擇付費升級。
滑鼠控制軟體
MOS 一個用於在 macOS 上平滑你的滑鼠滾動效果或單獨設定滾動方向的小工具, 讓你的滾輪爽如觸控板。使用這個軟體後,普通的滑鼠也可以像 Apple滑鼠那樣平滑滾動。當然,如果你平時不用滑鼠,只用觸控板,這個軟體就用不上啦。
下載地址:https://github.com/Caldis/Mos

AI / GPT
阿里內部有非常多的 AI 工具,但鑑於這個是推送給外網的同學的,這裡列舉一些外網可用的工具。
-
ollama 本地跑大模型:https://ollama.com
-
Bolt.New 透過描述需求就能建立並部署web應用:https://github.com/stackblitz/bolt.new
-
DeepL翻譯工具:https://www.deepl.com
-
OpenAI ChatGPT:https://chat.openai.com/chat
-
Google Gemini:https://gemini.google.com/app
-
通義千問:https://tongyi.aliyun.com
-
奈米搜尋:https://n.cn
-
位元組豆包:https://www.doubao.com
提示:部分工具使用可能需要魔法,使用請遵守法律法規。
Google Chrome
外掛推薦:
沉浸工翻譯外掛:https://immersivetranslate.com
SiderAI 助手:https://sider.ai/apps/lp-chatgpt
JSON-Handle:方便展示和檢視介面 json 響應
Microsoft Edge
https://www.bing.com/search?q=Bing+AI&cc=us&mkt=us&showconv=1
Mac Brew
Mac 上的軟體安裝包管理工具,類似於 centos 的 yum 或者 ubuntu 上的 apt 工具。

官網地址:https://brew.sh
可以透過下面的命令快速安裝:
export HOMEBREW_API_DOMAIN="https://mirrors.aliyun.com/homebrew-bottles/api"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.aliyun.com/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.aliyun.com/homebrew/homebrew-core.git"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.aliyun.com/homebrew/homebrew-bottles"
/bin/bash -c "$(curl -fsSL https://mirrors.ustc.edu.cn/misc/brew-install.sh)"
# brew
export PATH="/opt/homebrew/bin:$PATH"
export HOMEBREW_NO_ENV_HINTS=true
export HOMEBREW_NO_AUTO_UPDATE="true"
export HOMEBREW_INSTALL_FROM_API=1
export HOMEBREW_API_DOMAIN="https://mirrors.aliyun.com/homebrew-bottles/api"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.aliyun.com/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.aliyun.com/homebrew/homebrew-core.git"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.aliyun.com/homebrew/homebrew-bottles"
安裝一些常用軟體特別方便(不是MacOS跳過)
brew install git wget tree mysql-client@8.4 python redis golangci-lint httpie protobuf
ln -s /opt/homebrew/opt/mysql-client@8.4 /opt/homebrew/opt/mysql-client
# mysql 環境變數配置見後面的 zsh 部分
安裝一些常用軟體
brew install--cask raycast visual-studio-code google-chrome postman
brew 常用命令(尤其是橙色和加粗的,建議熟練掌握)
brew doctor 檢查系統是否存在問題
iTerm2 + zsh

iterm2 更好用的終端,支援分屏(cmd + D 或 cmd + shift + D)
brew install iterm2
oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
DISABLE_AUTO_UPDATE=true
ZSH_THEME="gentoo"
DISABLE_MAGIC_FUNCTIONS="true"
plugins=(git z)
source$ZSH/oh-my-zsh.sh
# odpscmd
export PATH="$PATH:/opt/odpscmd/bin"
# go env
export GOPATH="$HOME/go"
export PATH="$HOME/go/bin:$PATH"
export GOPROXY="http://goproxy.alibaba-inc.com"
# brew
export PATH="/opt/homebrew/bin:$PATH"
export HOMEBREW_NO_ENV_HINTS=true
export HOMEBREW_NO_AUTO_UPDATE="true"
export HOMEBREW_INSTALL_FROM_API=1
export HOMEBREW_API_DOMAIN="https://mirrors.aliyun.com/homebrew-bottles/api"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.aliyun.com/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.aliyun.com/homebrew/homebrew-core.git"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.aliyun.com/homebrew/homebrew-bottles"
# java
export JAVA_HOME="/Library/Java/JavaVirtualMachines/openjdk-21/Contents/Home"
export PATH="$JAVA_HOME/bin:$PATH"
export CLASS_PATH="$JAVA_HOME/lib"
# python
export PATH="$HOME/.pyenv/bin:$PATH"
# mysql
export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/mysql-client/lib"
export CPPFLAGS="-I/opt/homebrew/opt/mysql-client/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/mysql-client/lib/pkgconfig"
zsh git 外掛(推薦!建議背下來)
實現了非常多的簡寫,平時用起來比較方便,比如 :
簡寫
|
原命令
|
gst
|
git status
|
gp
|
git push
|
gl
|
git pull
|
gco
|
git checkout
|
grb
|
git rebase
|
-
https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/git/git.plugin.zsh
-
https://kapeli.com/cheat_sheets/Oh-My-Zsh_Git.docset/Contents/Resources/Documents/index
Warp: 21 世紀的終端
AI時代的終端,自帶AI能力 https://www.warp.dev/

Python 環境
平時寫一些簡單指令碼什麼的,很方便,這裡用的是 Python 3.12(3.13 太新,有的包還不支援)。
brew install python@3.12
# 建立一個虛擬環境,方便安裝包
python3.12 -m venv ~/.pyenv
source ~/.pyenv/bin/activate
# 建議放到 ~/.zshrc 或 ~/.bashrc 中,省得每次 source
exportPATH="$HOME/.pyenv/bin:$PATH"
# 安裝 ipython,簡化成命令 py 方便日常使用
pip3 install ipython
ln -s ~/.pyenv/bin/ipython3 ~/.pyenv/bin/py
使用阿里雲 pip 映象
mkdir -p ~/.pip/
~/.pip/pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
Go開發環境
配置GOPROXY
go env -w GOPROXY="https://goproxy.cn,https://proxy.golang.com.cn,direct"
go env -w GOPRIVATE="*.alibaba-inc.com"
Git相關配置
git config --global url."[email protected]:".insteadOf "https://gitlab.alibaba-inc.com/"
git config --global url."[email protected]:".insteadOf "https://gitlab.com/"
git config --global url."[email protected]:".insteadOf "https://github.com/"
git config --global url."[email protected]:".insteadOf "https://bitbucket.org/"
配置SSH KEY
如果之前配置過 SSH KEY,可以跳過,注意不要配置有密碼的 key ,會比較麻煩。這裡用 github 平臺作為演示,一般程式碼管理平臺類似,都有增加 SSH Key 功能。

配置好後,你執行下面的命令不需要輸入密碼(注意使用 SSH 進行測試)

git clone [email protected]:apache/rocketmq-client-go.git
如果你克隆的時候,需要輸入密碼,請按上面的地址,重新生成一個不需要密碼的金鑰。
golangci-lint
brew install golangci-lint
https://golangci-lint.run/welcome/install/#local-installation
goimports
go install golang.org/x/tools/cmd/goimports@latest
JetBrains / VsCode 等IDE
根據自己喜好下載對應的 IDE
Goland/PyCharm/Idea:https://www.jetbrains.com/pycharm/download/
Visual Studio Code:https://code.visualstudio.com/
Postman
自動計算簽名,除錯介面等。
brew install postman

自動計算部分引數(比如簽名引數等),程式碼示例:
var CryptoJS = require('crypto-js');
function gen_sign(sign_obj){
var channel = pm.environment.get("channel");
var key = pm.environment.get("key");
var raw_info = channel;
for (var x in sign_obj){
raw_info = raw_info + sign_obj[x];
}
var sign = CryptoJS.MD5(raw_info+key).toString().toUpperCase();
return sign;
}
var ts = 1692904788;
pm.variables.set("ts", ts);
pm.variables.set("uid", uid);
var sign_obj = {ts: ts, uid: uid};
var sign = gen_sign(sign_obj);
pm.variables.set("sign", sign);
-
RapidAPI:Mac API 測試工具 https://paw.cloud/
-
httpie:https://httpie.io/download
OSS Browser
下載 1.17.0 以上的版本,或者命令安裝。
brew install oss-browser

WireShark網路抓包
https://www.wireshark.org
學習各種中介軟體原理,本地除錯,查詢網路問題必備。

另外,也可以試試 Proxyman 抓包工具:https://proxyman.io/
RayCast/Alfred
推薦免費的 RayCast:https://www.raycast.com

brew install --cask raycast
剪下板歷史,比如我設定的快捷鍵 cmd + v + option/alt 快速調出歷史複製的內容,還可以搜尋。

視窗管理,我設定的是 Ctrl + Alt + 上下左右,分別將螢幕分成一半。

OrbStack / Docker / Podman / Colima
Docker 工具,快速環境搭建,不擔心把mac電腦上安裝的亂七八槽。
本地除錯 mysql 各種版本,redis,使用 linux 環境(推薦 alpine)等。
MacOS 可以使用 OrbStack,更輕量級,比 Docker Desktop 更好用。
有一些同學喜歡 colima,根據自己的喜好選擇即可。
brew install orbstack
{
"registry-mirrors" : [
"http://yum.tbsite.net/mirrors/"
],
"insecure-registries" : [
"yum.tbsite.net"
]
}

另外,OrbStack 還支援 Machines 可以當成虛擬機器來使用,很方便。

下面是 Docker 一些使用示例:
docker run -p 3306:3306 --name mysql8 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:8
docker run -p 6379:6379 --name redis7 -d redis:7
# 再比如本地測試 nacos
docker run --name nacos -e MODE=standalone -p 8848:8848 -d nacos/nacos-server:latest
Docker入門資料:
https://www.ruanyifeng.com/blog/2018/02/docker-tutorial.html
Sublime Text

輕量級的文字編輯器,可以看成是 notepad 的替代品。
可以搞個軟連結,放到了 /usr/local/bin/ ,這樣在命令列上,直接使用 subl 就可以了。
ln -sf /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
操作後在終端上,使用 subl project-name 或 subl file-name,就開啟目錄或檔案了。
odpscmd
https://help.aliyun.com/document_detail/27971.html
內網 http://odps.alibaba-inc.com/official_downloads/odpscmd/
安全要求:需要下載 0.46 以上版本,可以用上面的連結下載最新的。
集團內部使用,配置參考(注意 end_point 和預設的不一樣!):
project_name=amap_aos_gaea
access_id=x
access_key=x
end_point=http://service-corp.odps.aliyun-inc.com/api
資料庫工具
Redis
https://iredis.xbin.io
brew install iredis

MySQL
除了 mysql 命令列,本地推薦 mycli。
brew install mycli
https://www.mycli.net/

Mongo Client Compass
如果使用的是 MongoDB 3.4.6 Community ,客戶端可以使用 v1.25.0 版本。
https://github.com/mongodb-js/compass/releases/tag/v1.25.0
MacOS Rosetta
(可選,不需要的話不安裝)
ARM 電腦支援原來 Intel 軟體,安裝 rosetta:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
一鍵訓練大模型及部署GPU共享推理服務
透過建立ACK叢集Pro版,使用雲原生AI套件提交模型微調訓練任務與部署GPU共享推理服務。
點選閱讀原文檢視詳情。