Skip to content

Feature: bootstrap modular system, modules, tests, and configs - #15

Merged
long-910 merged 1 commit into
mainfrom
feature/bootstrap-modular-system
Mar 1, 2026
Merged

long-910 merged 1 commit into
mainfrom
feature/bootstrap-modular-system

Conversation

@long-910

@long-910 long-910 commented Mar 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • bootstrap.sh — インタラクティブメニューで機能ブロックを選択してインストールする新モジュラーインストーラー
  • uninstall.sh — 一コマンドでアンインストール
  • modules/ — lib/core/shell/dev/node/docker の6モジュール
  • dotfiles/.zshrc.d/ — ツールごとの zsh 設定(各ファイルに command -v ガード)
  • config/ — starship.toml, atuin/config.toml
  • templates/ — Node.js / Python プロジェクトスターター
  • tests/ — bootstrap と各モジュールのテストスイート

New Files

bootstrap.sh

インタラクティブメニューで Core/Shell/Dev/Node/Docker を ON/OFF して実行。
--all, --module <name>, --non-interactive, --list フラグ対応。

uninstall.sh

~/.zshrc.d/ のファイル削除、バックアップ復元、starship/atuin config 削除、git commit.template 削除。

modules/

ファイル 担当
lib.sh 共通ヘルパー(色、OS 検出、pkg_install、backup_file、deploy_config)
core.sh zsh/tmux/lsd/emacs/htop/neofetch/yazi
shell.sh starship, fzf, zoxide, atuin
dev.sh gh, ripgrep, direnv, bat, delta, fd, jq, lazygit + git config
node.sh fnm + Node LTS + commitizen
docker.sh Docker CE + docker compose

dotfiles/.zshrc.d/

starship.zsh, fzf.zsh, zoxide.zsh, atuin.zsh, direnv.zsh, node.zsh, docker.zsh, commit.zsh
各ファイルは command -v <tool> ガードで、ツール未インストールでも安全にスキップ。

config/

  • starship.toml — 2行プロンプト(git/node/python 情報表示)
  • atuin/config.toml — fuzzy 検索、emacs キーバインド、auto-sync 無効

templates/

  • node/ — package.json, .gitignore スタブ
  • python/ — pyproject.toml, .gitignore スタブ

tests/

run_tests.sh + test_bootstrap.sh, test_lib.sh, test_configs.sh, test_zshrc_d.sh

Updated Files

ファイル 変更内容
dotfiles/.zshrc モジュール読み込みブロック追記(# === dotfiles modular config ===
.gitignore .zshrc.local, *.local, .env, .envrc, __pycache__/, node_modules/ 追加
.github/workflows/shellcheck.yml コメント整理、checkout@v3@v4、ジョブ名修正
dotfiles/.gitmessage conventional commit テンプレート追加

Test plan

  • bash bootstrap.sh --non-interactive が Linux/macOS で正常実行されること(CI で確認)
  • bash tests/run_tests.sh が全テスト green であること
  • shellcheck bootstrap.sh uninstall.sh modules/*.sh が pass すること
  • bash uninstall.sh でクリーンにアンインストールできること

🤖 Generated with Claude Code

## New: bootstrap.sh (modular installer)
- Interactive feature selection menu (Core/Shell/Dev/Node/Docker)
- --all, --module, --non-interactive, --list flags
- Calls install_<module>() functions from modules/*.sh
- Appends .zshrc.d sourcing block to ~/.zshrc (idempotent)

## New: uninstall.sh
- Removes deployed ~/.zshrc.d/ files
- Restores .zshrc/.tmux.conf/.emacs.el backups
- Removes ~/.config/starship.toml and atuin/config.toml
- Removes git commit.template setting

## New: modules/
- lib.sh    — shared helpers: colors, OS detect, pkg_install, backup_file, deploy_config
- core.sh   — zsh/tmux/lsd/emacs/htop/neofetch/yazi install + deploy
- shell.sh  — starship, fzf, zoxide, atuin
- dev.sh    — gh, ripgrep, direnv, bat, delta, fd, jq, lazygit + git config
- node.sh   — fnm + Node LTS + commitizen
- docker.sh — Docker CE + docker compose

## New: dotfiles/.zshrc.d/
- starship.zsh, fzf.zsh, zoxide.zsh, atuin.zsh — Shell block
- direnv.zsh, node.zsh, docker.zsh, commit.zsh  — Dev/Node/Docker blocks
- Each file guards eval with command -v <tool>

## New: config/
- starship.toml          — two-line prompt with git/node/python info
- atuin/config.toml     — fuzzy search, emacs keybindings, no auto-sync

## New: templates/
- node/package.json, node/.gitignore
- python/pyproject.toml, python/.gitignore

## New: tests/
- run_tests.sh, test_bootstrap.sh, test_lib.sh
- test_configs.sh, test_zshrc_d.sh

## Updated: dotfiles/.zshrc
- Append modular sourcing block (# === dotfiles modular config ===)
- Sources ~/.zshrc.d/*.zsh and ~/.zshrc.local

## Updated: .gitignore
- Add: .zshrc.local, *.local, .env, .envrc, __pycache__/, node_modules/

## Updated: .github/workflows/shellcheck.yml
- Cleanup comments, checkout@v3 → @v4, fix job name casing

## New: dotfiles/.gitmessage
- Conventional commit template

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@long-910
long-910 merged commit 0e30d1e into main Mar 1, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant