Skip to content

yoaquim/.dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

567 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏑 Dotfiles - Complete Development Environment Setup

A comprehensive, automated macOS development environment with modern tools and configurations

πŸ“‹ Table of Contents


πŸš€ Quick Start

Prerequisites

  • macOS (this setup is designed for macOS only)
  • Command Line Tools for Xcode
  • Internet connection for downloading tools

Three-Step Installation

Step 1: Core Installation

# Clone and install core components (use bash explicitly for color support)
cd ~ && git clone https://github.com/yoaquim/.dotfiles.git && cd .dotfiles && bash ./install.sh

Step 2: Language Environments

# Setup Node.js and Python environments (use bash explicitly)
bash ./post-setup.sh

Step 3: AstroNvim Setup (requires SSH keys)

# Setup AstroNvim for Neovim (requires SSH keys configured for GitHub)
bash ./setup-astronvim.sh

Note: Step 3 requires SSH keys (~/.ssh/git and ~/.ssh/git.pub) to be configured and added to your GitHub account. The script will check for these before proceeding.

Manual Installation

# 1. Clone the repository
cd ~/
git clone https://github.com/yoaquim/.dotfiles.git

# 2. Run core installation script (use bash explicitly for colors)
cd ~/.dotfiles
bash ./install.sh

# 3. Setup language environments (use bash explicitly)
bash ./post-setup.sh

# 4. Setup AstroNvim (requires SSH keys for GitHub)
bash ./setup-astronvim.sh

⚑ What's Included

🐚 Shell Environment

  • Modern Bash with vim-style editing
  • 50+ custom aliases for productivity
  • Advanced functions (directory bookmarking, git workflows)
  • Eternal history with timestamps
  • Base16 color schemes integration

πŸ–₯️ Terminal Setup

  • Kitty Terminal - GPU-accelerated with ligatures
  • Tmux - Terminal multiplexer with custom key bindings
  • Tmux Powerline - Beautiful two-line status bar
  • JetBrains Mono Nerd Font - Programming font with icons

πŸ”§ Development Tools

  • AstroNvim - Modern Neovim distribution
  • Git - Enhanced with git-delta and custom aliases
  • Node.js - Latest LTS via nvm
  • Python - Latest stable via pyenv
  • Claude Code - AI-powered coding assistant with custom workflow

πŸ“¦ Package Management

  • Homebrew - Package manager with curated app list
  • TPM - Tmux plugin manager
  • Language Managers - nvm, pyenv, pipx

🎨 Applications

  • Productivity: Alfred, Todoist, Rectangle, Hammerspoon
  • Development: Docker, Postman, VS Code alternatives
  • Communication: Slack, WhatsApp
  • Creative: Adobe Creative Cloud, Spotify

πŸ”§ Installation

πŸ“‹ Installation Options

The install.sh script provides several installation modes:

Command Description
./install.sh Full installation (default)
./install.sh --reinstall Reinstall configurations only
./install.sh --force Force reinstall without prompts
./install.sh --uninstall Remove all configurations
./install.sh --help Show all options

πŸ”„ Installation Process

1. Environment Validation

  • Checks for macOS compatibility
  • Verifies required directories and files
  • Validates system dependencies

2. Homebrew Setup

  • Installs Homebrew if not present
  • Updates package lists
  • Configures PATH for current session

3. Package Installation

  • Formulas: Development tools and utilities
  • Casks: Desktop applications
  • Fonts: Programming fonts with icon support

4. Configuration Linking

  • Creates symbolic links to configuration files
  • Backs up existing configurations
  • Sets up directory structure

5. Plugin Installation

  • Installs tmux plugin manager (TPM)
  • Clones Base16 color schemes

6. Language Setup

  • Installs latest Node.js LTS via nvm
  • Installs latest Python via pyenv
  • Configures default versions

7. Final Configuration

  • Links custom configurations
  • Installs Claude Code CLI
  • Completes environment setup

8. Claude Code Setup (separate script)

  • Run cd ~/.dotfiles/claude && ./setup.sh after Claude Code is installed
  • Symlinks skills, agents, practices, and settings into ~/.claude/

9. AstroNvim Setup (separate script)

  • Run bash ./setup-astronvim.sh after SSH keys are configured
  • Checks for SSH keys (~/.ssh/git and ~/.ssh/git.pub)
  • Clones AstroNvim template
  • Links custom polish.lua and user.lua configurations

πŸ“ Configuration Structure

πŸ—‚οΈ Directory Layout

~/.dotfiles/
β”œβ”€β”€ πŸ“„ README.md                    # This comprehensive guide
β”œβ”€β”€ πŸš€ install.sh                   # Automated installation script
β”œβ”€β”€ πŸš€ post-setup.sh                # Language environment setup script
β”œβ”€β”€ πŸš€ setup-astronvim.sh           # AstroNvim setup script (requires SSH)
β”œβ”€β”€ πŸ”§ change-shell.sh              # Shell change helper script
β”œβ”€β”€ πŸ™ˆ .gitignore                   # Git ignore rules
└── πŸ“ config/                      # Configuration files
    β”œβ”€β”€ 🐚 bash/                    # Bash shell configuration
    β”‚   β”œβ”€β”€ πŸ“„ bash_profile         # Main bash profile
    β”‚   β”œβ”€β”€ πŸ“„ bash_profile_aliases # Command aliases
    β”‚   β”œβ”€β”€ πŸ“„ bash_profile_functions # Custom functions
    β”‚   β”œβ”€β”€ πŸ“„ bash_profile_git     # Git-specific configurations
    β”‚   β”œβ”€β”€ πŸ“„ bash_profile_tools   # Tool integrations
    β”‚   β”œβ”€β”€ πŸ“„ bash_profile_ssh    # SSH agent configuration
    β”‚   β”œβ”€β”€ πŸ“„ bash_profile_local  # Local machine settings (not in git)
    β”‚   └── πŸ“„ README.md            # Bash configuration guide
    β”œβ”€β”€ 🐱 kitty/                   # Kitty terminal configuration
    β”‚   β”œβ”€β”€ πŸ“„ kitty.conf           # Terminal settings
    β”‚   β”œβ”€β”€ πŸ“„ sample.conf          # Sample configuration
    β”‚   └── πŸ“„ README.md            # Kitty user guide
    β”œβ”€β”€ πŸ–₯️ tmux/                    # Tmux configuration
    β”‚   β”œβ”€β”€ πŸ“„ tmux.conf            # Tmux settings
    β”‚   β”œβ”€β”€ πŸ“ plugins/             # Tmux plugins
    β”‚   └── πŸ“„ README.md            # Tmux user guide
    β”œβ”€β”€ πŸ”‹ tmux-powerline/          # Tmux powerline theme
    β”‚   β”œβ”€β”€ πŸ“„ config.sh            # Powerline configuration
    β”‚   β”œβ”€β”€ πŸ“ themes/              # Visual themes
    β”‚   └── πŸ“„ README.md            # Powerline guide
    β”œβ”€β”€ πŸš€ nvim/                    # Neovim configuration
    β”‚   β”œβ”€β”€ πŸ“„ polish.lua           # AstroNvim customizations
    β”‚   β”œβ”€β”€ πŸ“„ user.lua             # Plugin configurations
    β”‚   └── πŸ“„ README.md            # AstroNvim user guide
    β”œβ”€β”€ πŸ”¨ hammerspoon/             # Hammerspoon automation
    β”‚   β”œβ”€β”€ πŸ“„ init.lua             # Hotkey and automation config
    β”‚   └── πŸ“„ README.md            # Hammerspoon user guide
    β”œβ”€β”€ 🌐 rclone/                  # rclone cloud storage configuration
    β”‚   β”œβ”€β”€ πŸ“„ rclone.conf          # Remote config (no secrets)
    β”‚   β”œβ”€β”€ πŸ“„ mount-cave.sh        # Mount script
    β”‚   β”œβ”€β”€ πŸ“„ com.rclone.cave.plist # LaunchAgent for auto-mount
    β”‚   └── πŸ“„ README.md            # rclone setup guide
    β”œβ”€β”€ πŸ” ssh/                     # SSH configuration
    β”‚   └── πŸ“„ config               # SSH config file
    β”œβ”€β”€ πŸ“ git/                      # Git local configuration
    β”‚   └── πŸ“„ config.local         # Machine-specific git settings (not in git)
    └── πŸ“„ gitconfig                # Git configuration
└── πŸ“ claude/                      # Claude Code global configuration
    β”œβ”€β”€ πŸ“„ setup.sh                 # Claude setup script (symlinks into ~/.claude/)
    β”œβ”€β”€ πŸ“„ settings.json            # Claude Code settings + hooks
    β”œβ”€β”€ πŸ“ agents/                  # Autonomous agent definitions
    β”‚   └── πŸ“„ runner.md            # Unified implementation runner
    β”œβ”€β”€ πŸ“ scripts/                 # Reusable scripts for skills + hooks
    β”‚   β”œβ”€β”€ πŸ“„ resolve-project.sh   # Git repo β†’ Linear team/project
    β”‚   β”œβ”€β”€ πŸ“„ resolve-label.sh     # Subject text β†’ issue label
    β”‚   β”œβ”€β”€ πŸ“„ validate-title.sh    # Title style validation
    β”‚   β”œβ”€β”€ πŸ“„ check-pr-reviews.sh  # Machine review status (Codex/CodeRabbit)
    β”‚   └── πŸ“„ repo-projects.json   # Repo β†’ Linear project mapping
    β”œβ”€β”€ πŸ“ hooks/                   # Event-driven automation
    β”‚   β”œβ”€β”€ πŸ“„ inject-practices.sh  # Auto-inject practices at runner startup
    β”‚   β”œβ”€β”€ πŸ“„ lint-spec.sh         # Scope check on sketch/spec writes
    β”‚   β”œβ”€β”€ πŸ“„ validate-issue.sh    # Style check after Linear issue creation
    β”‚   β”œβ”€β”€ πŸ“„ validate-commit.sh   # Commit message style check
    β”‚   β”œβ”€β”€ πŸ“„ validate-pr.sh       # PR title style check
    β”‚   └── πŸ“„ notify-done.sh       # macOS notification when runner finishes
    β”œβ”€β”€ πŸ“ practices/               # Development practice guides
    β”‚   β”œβ”€β”€ πŸ“„ INDEX.md             # Practice index with detect rules
    β”‚   β”œβ”€β”€ πŸ“„ tdd.md               # TDD (always active)
    β”‚   β”œβ”€β”€ πŸ“„ django.md            # Django
    β”‚   β”œβ”€β”€ πŸ“„ docker.md            # Docker
    β”‚   β”œβ”€β”€ πŸ“„ react.md             # React
    β”‚   └── πŸ“„ tailwind.md          # Tailwind
    └── πŸ“ skills/                  # Custom Claude Code skills
        β”œβ”€β”€ πŸ“ setup/               # /setup β€” init project
        β”œβ”€β”€ πŸ“ sketch/              # /sketch β€” lightweight local spec
        β”œβ”€β”€ πŸ“ spec/                # /spec β€” Linear feature spec (ZeeSpec)
        β”œβ”€β”€ πŸ“ issue/               # /issue β€” single Linear issue
        β”œβ”€β”€ πŸ“ dispatch/            # /dispatch β€” spawn runner (tickets or sketches)
        β”œβ”€β”€ πŸ“ pr/                  # /pr β€” review, fix, create PR
        └── πŸ“ gh-stack/            # /gh-stack β€” stacked branches/PRs

πŸ”— Symlink Structure

After installation, configurations are linked to standard locations:

Source Target Purpose
config/bash/bash_profile ~/.bash_profile Main bash configuration
config/bash/bash_profile ~/.bashrc Bash initialization
config/bash/ ~/.config/bash/ Bash configuration directory
config/tmux/ ~/.config/tmux/ Tmux configuration
config/kitty/ ~/.config/kitty/ Kitty terminal configuration
config/gitconfig ~/.gitconfig Git configuration
config/nvim/polish.lua ~/.config/nvim/lua/polish.lua Neovim customizations
config/nvim/user.lua ~/.config/nvim/lua/plugins/user.lua Neovim plugins
config/hammerspoon/ ~/.hammerspoon/ Hammerspoon automation
config/rclone/ ~/.config/rclone/ rclone cloud storage
config/ssh/config ~/.ssh/config SSH configuration
claude/skills/ ~/.claude/skills/ Claude Code skills (via claude/setup.sh)
claude/agents/ ~/.claude/agents/ Claude Code agents (via claude/setup.sh)
claude/practices/ ~/.claude/practices/ Claude Code practices (via claude/setup.sh)
claude/settings.json ~/.claude/settings.json Claude Code settings (via claude/setup.sh)

πŸ› οΈ Tools & Applications

πŸ”§ Development Tools

Tool Purpose Configuration
Bash Modern shell with enhancements config/bash/
Git Version control with aliases config/gitconfig
Tmux Terminal multiplexer config/tmux/
Neovim Modern text editor config/nvim/
Kitty GPU-accelerated terminal config/kitty/
Hammerspoon macOS automation and hotkeys config/hammerspoon/
Claude Code AI coding assistant with workflow claude/

πŸ“¦ Package Managers

Tool Purpose Auto-Setup
Homebrew macOS package manager βœ…
NVM Node.js version manager βœ…
Pyenv Python version manager βœ…
TPM Tmux plugin manager βœ…

🎨 Applications Installed

Productivity

  • Alfred - Productivity app and launcher
  • Todoist - Task management
  • Rectangle - Window management

Development

  • Postman - API testing tool
  • Claude - AI coding assistant
  • 1Password - Password manager

Note: Docker is currently disabled in the installation due to package conflicts. Install manually with brew install --cask docker if needed.

Communication

  • Slack - Team communication
  • WhatsApp - Messaging

Creative & Media

  • Adobe Creative Cloud - Design tools
  • Spotify - Music streaming
  • Notion - Note-taking and productivity

Utilities

  • Google Chrome - Web browser
  • TlDr - Simplified man pages
  • Bottom - System monitor
  • Lazygit - Git TUI
  • Ripgrep - Fast text search
  • fd - Fast file finder
  • Tree-sitter - Parser generator
  • Go - Programming language
  • gdu - Disk usage analyzer
  • Calibre - E-book management
  • Quarto - Scientific publishing
  • Folx - Download manager
  • Hidden Bar - Menu bar management

🎨 Customization

🎨 Color Schemes

The setup uses Base16 color schemes for consistent theming:

  • Location: ~/.config/base16-shell/
  • Usage: base16_<theme-name> in terminal
  • Integration: Works with tmux, vim, and shell

πŸ”§ Personal Customizations

Create machine-specific settings:

# Edit local bash settings
nvim ~/.config/bash/bash_profile_local

# Add personal aliases, functions, exports
export MY_CUSTOM_VAR="value"
alias my_alias="command"

🎨 Theme Customization

Tmux Powerline

# Edit powerline configuration
nvim ~/.config/tmux-powerline/config.sh

# Customize segments, colors, and layout

Kitty Terminal

# Edit kitty configuration
nvim ~/.config/kitty/kitty.conf

# Customize fonts, colors, and behavior

πŸ”Œ Plugin Management

Tmux Plugins

# Inside tmux session
` I    # Install plugins
` U    # Update plugins
` alt + u    # Uninstall plugins

Neovim Plugins

# Inside neovim
:Lazy    # Open plugin manager

πŸ€– Claude Code Workflow

Custom Claude Code configuration with skills, agents, hooks, and practices.

Setup

cd ~/.dotfiles/claude && ./setup.sh

Symlinks skills, agents, hooks, scripts, practices, and settings into ~/.claude/.

Skills

Skill Purpose
/setup Init project: CLAUDE.md, git, hooks, deps
/sketch <name> Lightweight local spec (ZeeSpec-lite)
/spec Linear feature spec with sub-issues (ZeeSpec)
/issue Single well-formed Linear issue
/dispatch <id|name> Spawn runner from Linear ticket or sketch
/pr Review, fix, create PR
/gh-stack Stacked branches and PRs

Workflows

Local (no Linear):

/sketch jwt-auth β†’ /dispatch jwt-auth β†’ runner β†’ /pr

Linear:

/spec β†’ /dispatch ENG-142 β†’ runner β†’ /pr

Hooks

Hook Trigger Purpose
inject-practices.sh Runner SessionStart Auto-detect and inject practices
lint-spec.sh Write/Edit on sketches Scope check (>8 steps, >10 files)
validate-issue.sh Linear save_issue Issue title/description style
validate-commit.sh git commit Commit message style
validate-pr.sh gh pr create PR title style
notify-done.sh Stop macOS notification when session ends

Agent

One unified runner agent handles all dispatched work. On completion: pushes, creates PR via /pr, iterates on Codex/CodeRabbit comments until machine reviews are green.

Practices

Auto-detected at runner startup via inject-practices.sh. TDD is always active; Django, Docker, React, Tailwind activate based on project files.

Customization

Edit in ~/.dotfiles/claude/ β€” changes apply globally via symlinks.


πŸ”„ Management

πŸ”„ Updating Configurations

# Navigate to dotfiles directory
cd ~/.dotfiles

# Pull latest changes
git pull

# Reinstall configurations
./install.sh --reinstall

πŸ”„ Backup & Restore

The installation script automatically creates backups:

  • Format: filename.backup.YYYYMMDD_HHMMSS
  • Location: Same directory as original file
  • Restore: Manually copy backup over current file

πŸ”„ Selective Updates

# Update only specific configurations
./install.sh --reinstall

# Force update without prompts
./install.sh --force

# Update specific tools
brew update && brew upgrade

πŸ’‘ Pro Tips

πŸš€ Productivity Shortcuts

Quick Navigation

# Use directory bookmarking
mark project          # Bookmark current directory
j project            # Jump to bookmarked directory
marks                # List all bookmarks

Git Workflow

# Quick commit and push
gup "commit message"  # Commit and push in one command

# Branch management
gcg feature          # Checkout first branch matching "feature"
gbcp                 # Copy current branch name to clipboard

Tmux Workflow

# Create development session
tmux new-session -s dev -d
tmux send-keys -t dev 'cd ~/project && nvim' Enter
tmux split-window -t dev -h
tmux send-keys -t dev 'npm run dev' Enter
tmux attach -t dev

πŸ”§ Advanced Usage

Multi-Machine Setup

# Clone on different machines
git clone https://github.com/yoaquim/.dotfiles.git

# Customize per machine
echo "export HOST_SPECIFIC_VAR='value'" >> ~/.config/bash/bash_profile_local

# Machine-specific git settings (e.g., CodeRabbit machineId)
nvim ~/.config/git/config.local

Custom Tool Integration

# Add new tools to bash_profile_tools
echo 'eval "$(tool init bash)"' >> ~/.config/bash/bash_profile_tools

# Reload configuration
sb  # Source bash profile

🎯 Development Workflow

Project Setup

  1. Create tmux session for project
  2. Use directory bookmarking for quick access
  3. Leverage git aliases for efficient version control
  4. Use kitty tabs for different contexts

Multi-Environment Development

  • Local: Full development environment
  • Remote: Use kitty's SSH integration
  • Containers: Docker development workflow

πŸ” Troubleshooting

Common Issues

Homebrew Installation Fails

# Check system compatibility
uname -a

# Install command line tools
xcode-select --install

# Try manual installation
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Bash Not Default Shell

# Add homebrew bash to allowed shells
sudo sh -c 'echo /opt/homebrew/bin/bash >> /etc/shells'

# Change default shell
chsh -s /opt/homebrew/bin/bash

# Verify change
echo $SHELL

Tmux Plugins Not Loading

# Check tpm installation
ls -la ~/.config/tmux/plugins/tpm

# Reinstall tpm
rm -rf ~/.config/tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm

# Install plugins in tmux
` I

Neovim/AstroNvim Configuration Issues

# Check AstroNvim installation
ls -la ~/.config/nvim

# Verify symlinks
ls -la ~/.config/nvim/lua/polish.lua
ls -la ~/.config/nvim/lua/plugins/user.lua

# Reinstall AstroNvim (requires SSH keys)
bash ./setup-astronvim.sh --force

AstroNvim Clone Fails (SSH Issues)

# Check SSH keys exist
ls -la ~/.ssh/git*

# Test GitHub SSH connection
ssh -T git@github.com

# If SSH is not configured, generate keys
ssh-keygen -t ed25519 -f ~/.ssh/git -C "your_email@example.com"

# Add key to ssh-agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/git

# Add public key to GitHub: https://github.com/settings/keys
cat ~/.ssh/git.pub

# Then retry AstroNvim setup
bash ./setup-astronvim.sh

Font Issues

# List installed fonts
brew list --cask | grep font

# Install missing fonts
brew install --cask font-jetbrains-mono-nerd-font

# Check font in terminal
echo "Testing font: πŸ”₯ β†’  ←  ↑  ↓"

πŸ”§ Maintenance

Regular Updates

# Update system
brew update && brew upgrade

# Update configurations
cd ~/.dotfiles && git pull && ./install.sh --reinstall

# Update language versions
nvm install --lts
pyenv install --list | grep -E '^\s*3\.[0-9]+\.[0-9]+$' | tail -1

Cleanup

# Clean homebrew
brew cleanup

# Clean old backups
find ~ -name "*.backup.*" -type f -mtime +30 -delete

# Clean tmux sessions
tmux list-sessions | grep -v attached | cut -d: -f1 | xargs -t -n1 tmux kill-session -t

🀝 Contributing

πŸ”§ Adding New Tools

  1. Update install.sh with new package
  2. Add configuration to appropriate config/ directory
  3. Update README with new tool documentation
  4. Test installation on clean system

🎨 Customizing Configurations

  1. Fork repository for personal modifications
  2. Create feature branch for changes
  3. Test thoroughly before merging
  4. Document changes in README

πŸ“š Additional Resources

πŸ“– Configuration Guides

πŸ”— External Resources


πŸ’‘ Tip: After installation, run source ~/.bash_profile or start a new terminal session to activate all configurations. Use the individual README files in each config directory for detailed usage instructions!


Last updated: March 2026

About

Machine setup and dotfiles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors