Personal machine setup for quickly getting a familiar terminal/development environment on Linux and macOS.
This repository keeps the old one-command setup goal, but separates it into safer layers:
bootstrap.shprepares the machine and applies the core config.install.shsafely links config files and manages shell/Git include blocks.config/core/contains the default cross-platform environment.config/optional/preserves heavier or more opinionated tools from the old repo.
git clone git@github.com:InitialMoon/dev-env-bootstrap.git
cd dev-env-bootstrap
./bootstrap.sh doctor
./bootstrap.sh corebootstrap.sh core checks/installs basic tools when a package manager is available, then runs ./install.sh link.
For a fuller one-command setup inspired by the old run_config.sh, but with safer defaults:
./bootstrap.sh allall runs core setup, then optional fish, nvim, and oh-my-posh modules. Use ASSUME_YES=1 to skip package and optional installer prompts, including the Oh My Posh upstream installer, or DRY_RUN=1 to preview package/link actions.
If you only want to link configuration and avoid package installation:
./install.sh dry-run
./install.sh linkThe default core setup manages:
- cross-platform shell snippets for Bash/Zsh under
~/.config/my-linux-config/shell/, plus Fish snippets under~/.config/fish/conf.d/and~/.config/my-linux-config/fish/ tmuxconfig:config/core/tmux/tmux.conf->~/.tmux.conf- Git defaults under
~/.config/my-linux-config/git/and shared ignore rules under~/.config/git/ - Yazi config under
~/.config/yazi/ - Claude Code shared settings, status line template, and local examples under
~/.claude/ - Codex shared profiles and local examples under
~/.codex/ ssh-socks-proxyunder~/.local/bin/
The installer is conservative:
- no overwrite of existing user files
- safe symlink checks
- managed begin/end blocks for shell and Git config
unlinkonly removes links/blocks owned by this repository
The shared core works on Linux and macOS. macOS-specific toolchain setup is opt-in:
./bootstrap.sh macos
./bootstrap.sh interactiveThe macOS menu can install or configure groups such as Homebrew basics, shells, editors, Java, LLVM/OpenMP, Ruby, dotnet, conda/mamba, and AI-tool notes. You can select none of them and still keep the shared core configuration.
Optional modules preserved from the old repo:
config/optional/fish/— fish and Oh My Fish configconfig/optional/zsh/— legacy zsh/oh-my-zsh installer path kept for manual reviewconfig/optional/nvim/— LazyVim-based Neovim configconfig/optional/vim/— Vim configconfig/optional/oh-my-posh/— old Oh My Posh themes; installer may use upstream script after confirmationconfig/optional/ranger/— package install/check plus old vendored ranger source noteconfig/optional/legacy/— original full config files andrun_config.sh
These are not installed by default by core. Configure or inspect selected modules explicitly:
./bootstrap.sh optional nvim
./bootstrap.sh optional fish nvim oh-my-posh
./bootstrap.sh optional zsh
./bootstrap.sh optional rangerLinking optional modules uses safe links and skips existing unmanaged paths instead of overwriting user config. zsh only prints the preserved legacy installer note and manual review path; ranger installs/checks the package and notes the vendored source; oh-my-posh may run the upstream installer after confirmation before linking themes.
./bootstrap.sh doctor # check platform, package manager, and tools
./bootstrap.sh core # install/check core tools and link config
./bootstrap.sh ai # link Claude Code and Codex shared config only
./bootstrap.sh macos # link macOS config and run macOS setup menu
./bootstrap.sh interactive # choose optional setup groups interactively
./bootstrap.sh all # core + fish + nvim + oh-my-posh
./bootstrap.sh optional # show optional modules
./bootstrap.sh optional nvim fish # install/configure selected optional modules
./install.sh dry-run # preview core + AI links and managed blocks
./install.sh link # apply core + AI config safely
./install.sh ai # link Claude Code and Codex shared config only
./install.sh macos # link opt-in macOS config only
./install.sh dry-run-ai # preview AI-tool shared config links
./install.sh dry-run-macos # preview opt-in macOS config links
./install.sh status # inspect managed config state
./install.sh unlink # remove managed links and blocks
./install.sh doctor # check tool availabilityDo not commit secrets, tokens, private paths, SSH key material, or machine-specific identity.
Use local files instead:
~/.config/my-linux-config/shell/local.sh~/.gitconfigoutside the managed block~/.claude/settings.local.json~/.codex/config.local.tomlif your Codex setup supports it
The core config is intended to work on macOS and Linux.
If you want to use this tmux config on macOS with iTerm2, configure the Option key to send Esc+/Meta. The tmux bindings use Meta/Alt-style keys, and iTerm2 uses Option for special characters by default.
Steps:
- Open iTerm2 Preferences.
- Go to Profiles.
- Select your profile.
- Open the Keys tab.
- Set Left Option Key and Right Option Key to Esc+.
The original run_config.sh has been moved to config/optional/legacy/run_config.sh for reference. It is no longer the default entrypoint because it mixed package installation, config overwrites, plugin downloads, and optional tools in one script.