命令行和开发环境配置
· 阅读需 3 分钟
基础
- 包管理器
- Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)" - apt
- yum/dnf
- pacman
- zypper
- nix
- Homebrew
- Shell
~/.alias~/.env- Starship
eval "$(starship init zsh)" - Bash
~/{.profile,.bash_profile,.bashrc} - Zsh
~/{.zshenv,.zprofile,.zshrc}- OhMyZsh
- Fish
~/.config/fish/config.fish - Xonsh
- Nushell
工具
- 命令
- 替代
- zoxide
eval "$(zoxide init zsh)" - lsd/eza
- bat
- fd
- fzf
source <(fzf --zsh) - ripgrep
- duf
- dust
- btop
- procs
- mcfly
eval "$(mcfly init zsh)" - tealdeer
- trash
- zoxide
- GNU 系列
export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"- coreutils
- binutils
- inetutils
- findutils
- grep
- gawk
- gnu-sed
- gnu-tar
- gnu-which
- wget
- 补充
- rename
- rsync
- jq
- httpie
- glow
- pandoc
- moreutils
- sysstat
- macOS
- mas
- blueutil
- smartmontools
- sleepwatcher
- watchman
- duti
- bclm
- lporg
- 替代
- 终端
- tmux
~/.tmux.conf - Zellij
~/.config/zellij - Kitty
~/.config/kitty/kitty.conf - Ghostty
~/.config/ghostty/config - Alacritty
~/.config/alacritty/alacritty.yml - iTerm
~/Library/Preferences/com.googlecode.iterm2.plist, ~/Library/Application Support/iTerm2/DynamicProfiles/Profiles.json
自带的主题不好看, Iterm Themes - Color Schemes and Themes for Iterm2 - Warp
- tmux
- 编辑器
- Helix
~/.config/helix/ - Vim
~/.vimrc%% macOS 自带的 vim 不支持 python3 %% - Neovim
~/.config/nvim/ - Emacs
~/.emacs.d/ - VSCode
~/Library/Application Support/Code/User/, ~/.vscode/ - Zed
~/.config/zed/
- Helix
- 文件管理器
- Yazi
~/.config/yazi/ - Superfile
- Yazi
- dotfiles 管理
- VCS
- Git
~/.gitconfig - Lazygit
- Jujutsu
- gh
- GitHub Desktop
- Git
开发
- 通用
- asdf
- mise
- tree-sitter-cli
- C/C++
- Python
- pip
~/.config/pip/pip.conf
pypi | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror - conda/mamba/micromamba
~/.condarc - pixi
- uv
- ruff
- pyright/basedpyright
- jupyterlab/notebook
- pip
- JavaScript
- node
- deno
- bun
- nvm
- npm/yarn/pnpm
~/.npmrc
- Java
- JDK
{shell} sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk; echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc; export CPPFLAGS="-I/opt/homebrew/opt/openjdk/include" - maven
- gradle
- JDK
- Rust
- rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - cargo
~/.cargo/config.toml - rust-analyzer
- rustup
- Go
- Elixir
- Haskell
- Scala
- coursier
- sbt
~/.sbt/
- Clojure
- Leiningen
- Lisp
- sbcl
- guile
- racket
- Lua
- luarocks
运维
- android-platform-tools
- scrcpy
- mitmproxy
- Whistle
- Ansible
- Docker
- OrbStack
~/.orbstack/config/docker.json - redis
- postgresql
其他
- Firefox
~/Library/Application Support/Firefox/Profiles/ - Sogou
~/Library/Application Support/Sogou/InputMethod/SogouPY/symbolSubsitute.plist - Rime
~/Library/Rime/ - Fcitx5
~/.config/fcitx5/, ~/.local/share/fcitx5/ - Espanso
- Input Source Pro
- Hammerspoon
~/.hammerspoon/ - Raycast
~/.config/raycast/ - Karabiner
~/.config/karabiner/ - mac-mouse-fix
~/Library/Application Support/com.nuebling.mac-mouse-fix/config.plist - BetterAndBetter
- xGestures
~/Library/Preferences/what.xGestures.plist - Stats