Skip to content

builtbylane/.dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛠️ macOS Dev Environment

A collection of dotfiles designed for a modern macOS development workflow. Features fast shell startup, intelligent command-line tools, and streamlined Git operations.

Terminal Preview Terminal: iTerm2 with MesloLGS NF font

🚀 Features

Modern CLI Tools

  • eza: A modern replacement for ls with Git integration
  • bat: A cat clone with syntax highlighting
  • ripgrep: Fast search tool (replacement for grep)
  • fd: User-friendly alternative to find
  • fzf: Fuzzy finder for files and history
  • zoxide: Smarter directory navigation that learns from your habits
  • delta: Better Git diff viewing

Development Tools

  • Automatic Node version switching with fnm
  • System monitoring with btop
  • HTTP requests with httpie
  • Directory visualization with tree
  • Simplified man pages with tldr

Shell Features

  • Fast shell startup with Powerlevel10k instant prompt
  • Syntax highlighting
  • Command auto-suggestions
  • Fuzzy completion
  • Rich command history
  • Directory jumping with zoxide

📦 Installation

# Clone the repository
git clone https://github.com/builtbylane/dotfiles.git ~/.dotfiles

# Run the installation script
cd ~/.dotfiles
./install.sh

The installation script will:

  1. Create necessary symbolic links
  2. Install Homebrew if not present
  3. Install required packages
  4. Set up Zinit (Zsh plugin manager)
  5. Configure private settings (see below)

🔒 Private Configuration

Two private configuration files are created during installation:

  1. ~/.private_env.zsh:

    • Store sensitive environment variables
    • Add personal aliases
    • Configure API keys
    • Add any machine-specific settings
  2. ~/.gitconfig.private:

    • Store Git credentials
    • Configure work-specific Git settings
    • Add private Git aliases

🔧 Handy Git Functions

Quick Repository Navigation

# Open current GitHub repository in browser
gopen

# Open current branch's PR page
gpr

# Clone and CD in one command
gclonecd https://github.com/user/repo

Branch Management

# Cleanup merged branches (protects important branches) *
gclean

# Copy last commit message to clipboard
cl

# List local branches sorted by last commit date
git lb

# List all branches (including remote) sorted by last commit date
git lba

** Protected branches that won't be deleted: main, master, develop, staging, prod, production*

Modern Git Workflow

# Rebase current branch with latest main/master
git update

# Rebase current branch with any remote changes on current branch
git update-branch

# Squash commits for clean history
git squash

# Push with force-with-lease safety
git pub

Protected branches that won't be deleted: main, master, develop, staging, prod, production

⚡️ Shell Aliases

Navigation

.. # cd ..
... # cd ../..
zi # Interactive zoxide navigation
cdf # cd to current Finder folder

Modern Tool Replacements

ls → eza
cat → bat
find → fd
grep → rg

Package Manager Shortcuts

r → npm run
yr → yarn run
br → bun run
pr → pnpm run

Development

c → code .
dot → code ~/.dotfiles

🏗 Project Structure

.dotfiles/
├── install.sh          # Installation script
├── Brewfile            # Homebrew dependencies
├── .zshrc              # Main shell configuration
├── zsh/
│   ├── aliases.zsh     # Command aliases
│   ├── options.zsh     # Shell options
│   ├── paths.zsh       # PATH configuration
│   └── functions/
│       ├── git.zsh     # Git utilities
│       └── navigation.zsh # Navigation helpers
├── git/
│   ├── .gitconfig      # Git configuration
│   └── .gitignore      # Global gitignore
└── templates/
    ├── private_env.template
    └── gitconfig.private.template

🔄 Updating

# Pull latest changes
cd ~/.dotfiles
git pull

# Re-run installation script
./install.sh

The installation script is idempotent and can be run multiple times safely.

🛠 Customization

Adding New Aliases

Add to ~/.private_env.zsh for machine-specific aliases or aliases.zsh for shared ones.

Adding New Functions

Place new function files in zsh/functions/ - they'll be automatically loaded.

Modifying Git Configuration

  • Shared settings: Edit .gitconfig
  • Private settings: Edit .gitconfig.private

📝 Notes

  • Shell startup time is optimized through async loading
  • Git configuration uses modern safety defaults
  • All tools are configured for a dark terminal theme
  • The shell history is configured for 100,000 entries

About

Modern macOS development environment

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published