Installation Guide
WARNING
This dotfiles is designed for macOS only.
One-liner Install (Recommended)
The easiest way to install is using the install script:
bash
curl -fsSL https://dotfiles.peinan.cc/install.sh | bash
# or via GitHub
curl -fsSL https://raw.githubusercontent.com/peinan/dotfiles/HEAD/scripts/install.sh | bashThe script will:
- Install Homebrew (if not installed)
- Install essential tools (git, ghq, stow)
- Clone the repository using ghq
- Initialize submodules
- Install all packages from Brewfile
- Create symbolic links using stow
Manual Installation
If you prefer to install manually, follow these steps:
Step 1: Install Homebrew and Stow
bash
# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install stow
brew install stowStep 2: Clone Repository
bash
# Clone with submodules
git clone --recursive https://github.com/peinan/dotfiles.git
cd dotfilesTIP
You can clone to any location. The install script uses ghq and clones to ~/ghq/github.com/peinan/dotfiles.
Step 3: Install Packages
bash
# Install all packages from Brewfile
brew bundle installINFO
This installs many packages and may take some time. Edit the Brewfile to install only specific packages.
Step 4: Create Symbolic Links
bash
# Create all symlinks using stow
stow -v -t ~ srcWARNING
If existing configuration files exist, stow will fail. Backup and remove them first:
bash
# Example: backup existing .zshrc
mv ~/.zshrc ~/.zshrc.backupStep 5: Restart Shell
bash
# Reload shell configuration
source ~/.zshrc
# Or open a new terminal windowVerification
Verify that the configuration is loaded correctly:
bash
# Check symlinks
ls -la ~ | grep "dotfiles/src"
# Check if Starship prompt is working
starship --version
# Check if Neovim starts
nvim --versionTroubleshooting
Stow fails with "existing target" error
Stow won't overwrite existing files. Backup and remove them:
bash
mv ~/.zshrc ~/.zshrc.backup
mv ~/.gitconfig ~/.gitconfig.backup
stow -v -t ~ srcSubmodules are empty
Initialize submodules:
bash
git submodule update --init --recursivePackage installation fails
Update Homebrew and try again:
bash
brew update
brew bundle installNeovim plugins not installed
Launch Neovim and plugins will be installed automatically:
bash
nvim