dmmulroy/.dotfiles Documentation

repository·main·Indexed 20 days ago

https://github.com/dmmulroy/.dotfiles

An automated dotfiles management system for macOS development environments using GNU Stow and Homebrew. Features the `dot` CLI tool for environment initialization, health checks, package management via Brewfiles, and Fish shell performance benchmarking. Manages configurations for Fish shell, Neovim, and Herdr.

Tokens
1.4K
Snippets
6
Records
8
Agent score
22%

What's inside dmmulroy/.dotfiles

  1. How the dotfiles architecture works

    main

    The system is built on several core components:

    • Symlink Management: Uses GNU Stow to link files from ~/.dotfiles/home/ to your actual home directory (~).
    • Package Management: Uses Homebrew with two distinct bundles: packages/bundle for base tools and packages/bundle.work for work-specific tools.
    • Shell & Tools: Configures Fish shell (via Fisher), Neovim (via lazy.nvim), and Herdr (for workspaces).
    • Modular Design: Configurations are separated by tool (e.g., home/.config/nvim/) and context (work vs personal).
  2. Install the dotfiles environment

    main

    To set up your development environment using these dotfiles, clone the repository to ~/.dotfiles and run the dot init command. You can customize the installation by skipping specific components like SSH key generation or font installation using flags.

    # Clone the repository
    git clone https://github.com/dmmulroy/.dotfiles.git ~/.dotfiles
    cd ~/.dotfiles
    
    # Full setup (installs everything)
    ./dot init
    
    # Or customize the installation
    ./dot init --skip-ssh --skip-font
  3. Use the `dot` CLI tool for maintenance

    main

    The dot command is the primary interface for managing your environment. After the initial setup, use it for updates, health checks, and package management.

    dot update          # Pull latest changes, update Homebrew, and re-stow
    dot doctor          # Run comprehensive environment diagnostics
    dot check-packages  # Show installed vs missing packages
    dot retry-failed    # Reinstall packages that failed during setup
  4. Troubleshoot common issues

    main

    If you encounter issues, follow these steps:

    • dot command not found: Source your Fish config (source ~/.config/fish/config.fish) or manually add $HOME/.dotfiles to your PATH.
    • Package failures: Run dot check-packages to identify failures and dot retry-failed to attempt reinstallation.
    • Broken symlinks: Run dot doctor to diagnose and dot stow to fix them.
    • pi (AI agent) issues: Ensure Vite+ is installed, then install pi via the tool registry using vp install -g @mariozechner/pi-coding-agent.
  5. Install the `dot` command globally

    main

    To make the dot command available from any directory (adding it to your PATH), use the link command. To remove it, use unlink.

    dot link   # Install globally
    dot unlink # Remove global installation
  6. Benchmark Fish shell performance

    main

    Use dot benchmark-shell to measure Fish shell startup performance. It provides high-precision timing and statistical analysis (average, min, max, range) with color-coded performance assessments.

    # Run 10 benchmarks (default)
    dot benchmark-shell
    
    # Run specific number of benchmarks
    dot benchmark-shell -r 20
    
    # Show verbose output with individual timings
    dot benchmark-shell -v
    
    # Combine options
    dot benchmark-shell -r 15 -v
  7. Update configuration symlinks with `dot stow`

    main
    The system uses GNU Stow to manage symlinks from the home/ directory to your home directory (~). If you manually edit files within the home/ directory, run dot stow to re-create or update the symlinks.
    dot stow
  8. Manage packages with `dot package`

    main

    The system uses two Brewfiles: packages/bundle (base) and packages/bundle.work (work-specific). You can manage these via the dot package command which automatically detects if a package is a formula (brew) or a cask.

    # Listing packages
    dot package list              # List all packages
    dot package list base         # List base packages only
    dot package list work         # List work packages only
    
    # Adding packages
    dot package add git           # Add git formula to base bundle
    dot package add docker cask   # Add docker cask to base bundle
    dot package add kubectl brew work  # Add kubectl to work bundle
    
    # Updating packages
    dot package update            # Update all installed packages
    dot package update git        # Update specific package
    dot package update all base  # Update only base bundle packages
    dot package update all work  # Update only work bundle packages
    
    # Removing packages
    dot package remove git       # Remove git from any bundle
    dot package remove docker base # Remove docker from base bundle only