Homebrew で管理する dotfiles
- Homebrew: クロスプラットフォームのパッケージ管理
- シンボリックリンク: dotfiles の配置
- Linux / macOS 両対応
~/.dotfiles/
├── Brewfile # パッケージ一覧
├── Makefile # インストールコマンド群
├── install.sh # インストールスクリプト
├── scripts/
│ ├── install-brew.sh # Homebrew インストール
│ └── deploy.sh # シンボリックリンク作成
├── config/ # ~/.config にリンクされる設定
│ ├── zsh/
│ │ ├── init/ # 基本設定 (env, aliases, functions, visual)
│ │ └── plugins/ # ツール別設定 (fzf, eza, enhancd, gwq)
│ ├── nvim/ # Neovim 設定
│ ├── vim/ # Vim 設定
│ └── gwq/ # gwq 設定
└── bin/ # カスタムスクリプト
git clone https://github.com/s4kr4/dotfiles ~/.dotfiles
cd ~/.dotfiles
./install.shmake install # Homebrew + dotfiles
make brew # Homebrew のみ
make deploy # シンボリックリンクのみcd ~/.dotfiles
make update| ツール | 説明 |
|---|---|
| bat | cat の代替(シンタックスハイライト) |
| eza | ls の代替(モダンな表示) |
| fd | find の代替(高速) |
| fzf | ファジーファインダー |
| ripgrep | grep の代替(高速) |
| ghq | Git リポジトリ管理 |
| gwq | Git worktree 管理 |
| gh | GitHub CLI |
| tig | Git TUI |
| jq | JSON 処理 |
| mise | ランタイムバージョン管理 |
| プラグイン | 説明 |
|---|---|
| zsh-autosuggestions | コマンド補完候補の表示 |
| zsh-syntax-highlighting | シンタックスハイライト |
| enhancd | cd 拡張(履歴 + fzf) |
- Neovim(lazy.nvim でプラグイン管理)
Brewfile を編集:
brew "package-name"適用:
brew bundle --file=~/.dotfiles/Brewfileconfig/zsh/init/30_aliases.zsh を編集
config/zsh/plugins/ に tool-name.zsh を作成:
if ! command -v tool-name &> /dev/null; then
return
fi
# 設定
export TOOL_OPTION="value"
alias t="tool-name"MIT