𝔩𝔢𝔩𝕠𝔭𝔢𝔷
Theme
Connect With Me on LinkedIn Buy Me a Coffee

Dev Environment

Setting the Stage

Empty Canvas

Lienzo - Just as a painter relies on clean brushes and a well-prepared canvas, a software developer's artistry is deeply influenced by their chosen tools and materials. The right environment, frameworks, and applications provide the backdrop upon which code, like paint strokes, transforms into software masterpieces.

Automated Setup

The easiest way to set up this development environment is to use the automated setup script. For detailed instructions, please refer to the dotfiles repository README.

The automated script will guide you through an interactive setup process, allowing you to choose which tools to install. It handles all the steps described below in the correct order, making it the recommended approach for most users.


Foundational Dependencies

MacOS

Xcode Command Line Tools: Enables UNIX-style development via your terminal.
xcode-select --install
Tip:Macs comes with ZSH as the default shell. Git and other build essentials come bundled in the command line tools installed above

Linux (Debian/Ubuntu)

Build Essentials: A package of packages used for building software

sudo apt-get install build-essential

Git: A version control system.

sudo apt-get install git

ZSH: A shell we'll be extending to make our terminal more helpful

Install ZSH
sudo apt-get install zsh
Set ZSH as your default shell
sudo chsh -s $(which zsh) $USER

Core Setup

MacOS

Homebrew: A package manager for macOS that simplifies the installation of software.Install Homebrew by running this script in your terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Add Homebrew to your PATH and other environment variables for the current session
eval "$(/usr/local/bin/brew shellenv)"

Linux (Debian/Ubuntu)

Homebrew: A package manager for Linux that simplifies the installation of software.Install Homebrew by running this script in your terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Add Homebrew to your PATH and other environment variables for the current session
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

Configure Your Tools

Before installing software, you need to decide which tools you'd like to use. The following categories of tools are available:

Essential Tools

These core command-line utilities form the foundation of your development environment:

If installing manually, you can install essential tools with Homebrew:

Install all essential tools at once with Homebrew

brew install stow tmux neovim prettierd stylua yt-dlp ffmpeg libyaml the_silver_searcher ripgrep wget jq git-delta mise

Or install them individually:

  • Install Stow for managing symlinks
brew install stow
  • Install Tmux for terminal multiplexing
brew install tmux
  • Install Neovim text editor
brew install neovim
  • Install code formatters (Prettierd, Stylua)
brew install prettierd stylua
  • Install media tools (yt-dlp, ffmpeg)
brew install yt-dlp ffmpeg
  • Install search and utility tools
brew install libyaml the_silver_searcher ripgrep wget jq git-delta
  • Install Mise runtime version manager
brew install mise

Development Editors & Environments

These are the programs where you'll spend most of your development time:

Visual Studio Code: A versatile code editor.

Install VS Code using Homebrew
brew install --cask visual-studio-code

GitKraken: A powerful Git GUI client for version control.

Install GitKraken using Homebrew
brew install --cask gitkraken

Ghostty: A highly customizable terminal emulator.

Install Ghostty using Homebrew
brew install --cask ghostty

Browsers

Essential browsers for development and testing:

Firefox: The main browser for research with ad-blockers and extensions.

Install Firefox using Homebrew
brew install --cask firefox

Chrome: A clean testing environment with minimal extensions.

Install Chrome using Homebrew
brew install --cask google-chrome

Development Tools

Specialized tools for container and cloud development:

Rancher Desktop: Container management platform.

Install Rancher Desktop using Homebrew
brew install --cask rancher

Kubectx: Tool for switching Kubernetes contexts.

Install kubectx using Homebrew
brew install kubectx

Kube-ps1: Kubernetes prompt for bash and zsh.

Install kube-ps1 using Homebrew
brew install kube-ps1

Productivity Applications

Tools to help organize your work:

Obsidian: A powerful note-taking app for thoughts, ideas, and code snippets.

Install Obsidian using Homebrew
brew install --cask obsidian

MeetingBar: A handy tool for tracking meetings in your menu bar.

Install MeetingBar using Homebrew
brew install --cask meetingbar

Utility Applications

Additional utilities to enhance your workflow:

Swish: Window management through gestures.

Install Swish using Homebrew
brew install --cask swish

Discord: Communication platform for communities.

Install Discord using Homebrew
brew install --cask discord

Raycast: Productivity launcher and replacement for Spotlight.

Install Raycast using Homebrew
brew install --cask raycast

AnyDesk: Remote desktop software.

Install AnyDesk using Homebrew
brew install --cask anydesk

HiddenBar: Cleanup your menu bar icons.

Install HiddenBar using Homebrew
brew install --cask hiddenbar

1Password: Password manager and secure information storage.

Install 1Password using Homebrew
brew install --cask 1password

Setting Up Language Environments

With mise (the modern runtime version manager), you can easily manage multiple programming language versions:

Activate mise:

Activate mise in your current shell
eval "$(mise activate bash)"

Set up Node.js:

Install the latest LTS version of Node.js
mise use --global node@22.15.1

Set up Python:

Install Python 3.12
mise use --global python@3.12

Set up Ruby:

Set the Ruby configuration options for YAML support:
export RUBY_CONFIGURE_OPTS="--with-libyaml-dir=$(brew --prefix libyaml)"
Install the latest Ruby version:
mise use --global ruby@3.4.4

Shell Configuration

Terminal Enhancements

We'll set up several tools to make your terminal more powerful and user-friendly:

Install colorls for enhanced directory listings:

Install colorls using Ruby's gem package manager
mise exec ruby -- gem install colorls

Install aider for AI-assisted coding:

Install aider using Python's pip package manager
mise exec python -- python -m pip install -U aider-chat

Install oh-my-zsh framework for managing zsh configuration:

Install Oh My Zsh framework for managing ZSH configuration
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended

Install spaceship prompt for an enhanced terminal experience:

Clone the spaceship prompt repository

git clone https://github.com/spaceship-prompt/spaceship-prompt.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/spaceship-prompt" --depth=1

Link the theme file

ln -sf "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/spaceship-prompt/spaceship.zsh-theme" "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/spaceship.zsh-theme"

Install zsh plugins for syntax highlighting and autosuggestions:

Install zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Install zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Setup tmux plugin manager for extending your terminal multiplexer:

Install Tmux Plugin Manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Nerd Fonts: Fonts with glyphs for shell and editors.

For macOS:

Download and install the Nerd Font with this command:
curl -fLo "$HOME/Library/Fonts/AnonymiceProNerdFontMono-Regular.ttf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/AnonymousPro/Regular/AnonymiceProNerdFontMono-Regular.ttf
  • The font will be automatically available after installation
  • Configure your terminal to use "AnonymicePro Nerd Font Mono" in the terminal preferences
  • For Linux:

    Create the fonts directory:
    mkdir -p "$HOME/.local/share/fonts"
    Download the font file:
    curl -fLo "$HOME/.local/share/fonts/AnonymiceProNerdFontMono-Regular.ttf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/AnonymousPro/Regular/AnonymiceProNerdFontMono-Regular.ttf
    Refresh the font cache:
    fc-cache -f -v
  • Configure your terminal to use "AnonymicePro Nerd Font Mono" in the terminal preferences
  • Git Configuration

    Setting up Git

    Git is essential for version control. Let's configure it for use with GitHub:

    Configure git user details if not already set:

    Set your Git username (replace "Your Name" with your actual name)
    git config --global user.name "Your Name"
    Set your Git email (replace with your actual email)
    git config --global user.email "your.email@example.com"

    Set default branch to main:

    Configure Git to use 'main' as the default branch name
    git config --global init.defaultBranch main

    Configure git to use global gitignore:

    Set up a global gitignore file
    git config --global core.excludesfile ~/.gitignore

    Generate SSH key for GitHub:

    Generate a new SSH key for GitHub authentication
    ssh-keygen -t ed25519 -C "your.email@example.com"

    Start SSH agent:

    Start the SSH agent in the background
    eval "$(ssh-agent -s)"

    Create SSH config:

    Create the SSH directory if it doesn't exist
    mkdir -p ~/.ssh
    Create a config file for GitHub SSH settings
    echo "Host github.com" > ~/.ssh/config
    Configure the SSH key to be automatically added to the agent
    echo "    AddKeysToAgent yes" >> ~/.ssh/config
    Enable keychain integration for macOS
    echo "    UseKeychain yes" >> ~/.ssh/config
    Specify which SSH key to use for GitHub
    echo "    IdentityFile ~/.ssh/id_ed25519" >> ~/.ssh/config

    Add key to keychain (platform-specific):

    For macOS, add SSH key to the keychain with this terminal command

    ssh-add --apple-use-keychain ~/.ssh/id_ed25519

    For Linux, add SSH key to the agent with this terminal command

    ssh-add ~/.ssh/id_ed25519

    Add SSH key to GitHub:

    Display your public SSH key to copy:
    cat ~/.ssh/id_ed25519.pub
  • Copy the output and add it to your GitHub account:
  • Test your SSH connection to GitHub:
    ssh -T git@github.com
  • You should see a message like: "Hi username! You've successfully authenticated, but GitHub does not provide shell access."
  • For troubleshooting, refer to GitHub's official documentation
  • Dotfiles Setup

    Managing Configuration Files

    Dotfiles help maintain consistent configurations across different machines:

    Dotfiles: My preferred starting point for configuration files.

    Clone the repository if you haven't already:

    Clone the dotfiles repository with this terminal command
    git clone https://github.com/lelopez-io/.dotfiles.git ~/.dotfiles

    Change to the dotfiles directory:

    Navigate to the dotfiles directory with this terminal command
    cd ~/.dotfiles

    Use stow to create symlinks:

    Create symlinks while preserving existing files with this terminal command
    stow . --adopt

    At this point, you can either:

    Option 1: Keep changes from your existing configs:

    Commit your existing configuration files with this terminal command
    git add . && git commit -m 'feat: adopt existing configs'

    Option 2: Discard changes and use repo versions:

    Revert any local changes to use the repository versions
    git restore .
    Recreate all symlinks from the repository files
    stow . --restow

    Set up additional symlinks:

    Create symlink for global gitignore
    ln -sf "$HOME/.dotfiles/.gitignore" "$HOME/.gitignore"
    Create symlink for aider configuration
    ln -sf "$HOME/.dotfiles/.env.aider" "$HOME/.env.aider"

    Final Configuration Steps

    After installing all components, you need to complete a few final steps to get everything working properly:

    Install Tmux Plugins

    Start tmux and install plugins:Launch tmux in your terminal
    tmux
  • Install the plugins by pressing Ctrl+A and then Shift+I
  • You'll see a message at the bottom of the screen confirming the plugins are installed
  • Initialize Neovim Plugins

    Launch Neovim to set up plugins:Start Neovim from your terminal
    nvim
  • The lazy.nvim plugin manager will automatically detect and install all configured plugins
  • Wait for the installation to complete before using Neovim
  • Configure Visual Studio Code

    Launch VS Code and configure settings:

    Launch VS Code from the command line
    code

    Option 1: Sign in to sync settings (recommended if you have existing settings):

    • Click on the account icon in the bottom-left corner
    • Select "Sign in to Sync Settings"
    • Follow the prompts to sign in with your Microsoft or GitHub account
    • Your previously saved settings, extensions, and preferences will be automatically restored

    Option 2: Apply settings manually (for first-time setup):

    • Open the settings JSON by pressing Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux)
    • Type "Preferences: Open Settings (JSON)" and select it
    • Copy the contents from the repository's settings file
    • Paste these settings into your settings JSON file and save

    Remap Caps Lock to Control

    1. Reconfigure the Caps Lock key to function as Control:

      For macOS:

      • Open System Settings (or System Preferences)
      • Navigate to Keyboard → Keyboard Shortcuts → Modifier Keys
      • Change Caps Lock to Control
      • Click OK to apply the changes

      For Linux (Ubuntu/Debian):

      • Open Settings
      • Navigate to Keyboard → Additional Layout Options
      • Find "Caps Lock behavior" and select "Make Caps Lock an additional Ctrl"
      • Close the settings window

      Benefits of remapping Caps Lock:

      • Ergonomics: Reduces finger stretching by placing Control in the home row
      • Efficiency: Repurposes a rarely used key for frequent terminal and editor commands
      • Consistency: Follows Unix/Linux tradition of Control in the Caps Lock position
      • Vim/Terminal usage: Makes Control commands more accessible

    Configure Raycast

    1. Disable Spotlight's keyboard shortcut:

      • Open System Settings (or System Preferences)
      • Navigate to Keyboard → Keyboard Shortcuts → Spotlight
      • Uncheck "Show Spotlight search" or change its shortcut
      • Click OK to apply the changes
    2. Set up Raycast as your productivity launcher:

      • Launch Raycast from your Applications folder
      • Follow the initial setup wizard
      • Configure hotkey (recommended: Cmd+Space to replace Spotlight)
      • Enable features during setup:
        • File search
        • Application launcher
      • Import your settings (if you have existing ones):
        • Open Raycast preferences
        • Go to Advanced
        • Click "Import Settings"
        • Select your settings backup file

    That's it! Your development environment should now be set up and ready to go. If you encounter any issues, please refer to the specific tool's documentation or check for errors in the console output.

    Tip:If you're using the automated script (./install.sh), it handles all of these steps for you in the correct order. If you prefer to understand what's happening or want more control, following this manual guide gives you the same end result.

    Additional Specialized Tools

    For more specialized development needs, you can extend your setup with additional tools and languages. Here are some examples:

    Additional Programming Languages

    Extend your development capabilities with these programming languages:

    Go:

    Install Go with this terminal command
    mise use --global go@latest

    Rust:

    Install Rust with this terminal command
    mise use --global rust@stable

    Java:

    Install Java with this terminal command
    mise use --global java@temurin-17

    PHP:

    Install PHP with this terminal command
    mise use --global php@8.1

    Cloud Development Tools

    Essential tools for working with cloud providers:

    AWS CLI:

    Install AWS CLI with this terminal command
    brew install awscli

    Azure CLI:

    Install Azure CLI with this terminal command
    brew install azure-cli

    Google Cloud SDK:

    Install Google Cloud SDK with this terminal command
    brew install --cask google-cloud-sdk