Tutorials
Setting the Stage
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
- Install ZSH
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)"
- Install Homebrew by running this script in your terminal
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)"
- Install Homebrew by running this script in your terminal
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:
- Stow: Symlink management for dotfiles
- Tmux: Terminal multiplexer for multiple sessions
- Neovim: Modern, enhanced Vim text editor
- Prettierd: Daemon for the Prettier code formatter
- Stylua: Lua code formatter
- YT-DLP: Media downloader
- FFmpeg: Media processing library
- LibYAML: YAML parser and emitter
- Silver Searcher (ag): Fast code search tool
- Ripgrep: Fast file content searcher
- Wget: File downloader
- JQ: JSON processor
- Git-Delta: Syntax-highlighting pager for git
- Mise: Modern runtime version manager
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
- Install VS Code using Homebrew
GitKraken: A powerful Git GUI client for version control.
- Install GitKraken using Homebrew
brew install --cask gitkraken
- Install GitKraken using Homebrew
Ghostty: A highly customizable terminal emulator.
- Install Ghostty using Homebrew
brew install --cask ghostty
- Install Ghostty using Homebrew
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
- Install Firefox using Homebrew
Chrome: A clean testing environment with minimal extensions.
- Install Chrome using Homebrew
brew install --cask google-chrome
- Install Chrome using Homebrew
Development Tools
Specialized tools for container and cloud development:
Rancher Desktop: Container management platform.
- Install Rancher Desktop using Homebrew
brew install --cask rancher
- Install Rancher Desktop using Homebrew
Kubectx: Tool for switching Kubernetes contexts.
- Install kubectx using Homebrew
brew install kubectx
- Install kubectx using Homebrew
Kube-ps1: Kubernetes prompt for bash and zsh.
- Install kube-ps1 using Homebrew
brew install kube-ps1
- Install kube-ps1 using Homebrew
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
- Install Obsidian using Homebrew
MeetingBar: A handy tool for tracking meetings in your menu bar.
- Install MeetingBar using Homebrew
brew install --cask meetingbar
- Install MeetingBar using Homebrew
Utility Applications
Additional utilities to enhance your workflow:
Swish: Window management through gestures.
- Install Swish using Homebrew
brew install --cask swish
- Install Swish using Homebrew
Discord: Communication platform for communities.
- Install Discord using Homebrew
brew install --cask discord
- Install Discord using Homebrew
Raycast: Productivity launcher and replacement for Spotlight.
- Install Raycast using Homebrew
brew install --cask raycast
- Install Raycast using Homebrew
AnyDesk: Remote desktop software.
- Install AnyDesk using Homebrew
brew install --cask anydesk
- Install AnyDesk using Homebrew
HiddenBar: Cleanup your menu bar icons.
- Install HiddenBar using Homebrew
brew install --cask hiddenbar
- Install HiddenBar using Homebrew
1Password: Password manager and secure information storage.
- Install 1Password using Homebrew
brew install --cask 1password
- Install 1Password using Homebrew
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)"
- Activate mise in your current shell
Set up Node.js:
- Install the latest LTS version of Node.js
mise use --global node@22.15.1
- Install the latest LTS version of Node.js
Set up Python:
- Install Python 3.12
mise use --global python@3.12
- Install 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
- Set the Ruby configuration options for YAML support:
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 colorls using Ruby's gem package manager
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 aider using Python's pip package manager
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 Oh My Zsh framework for managing ZSH configuration
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
- Install zsh-syntax-highlighting
Setup tmux plugin manager for extending your terminal multiplexer:
- Install Tmux Plugin Manager
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
- Install Tmux Plugin Manager
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
- Download and install the Nerd Font with this command:
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 your Git username (replace "Your Name" with your actual name)
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 'main' as the default branch name
Configure git to use global gitignore:
- Set up a global gitignore file
git config --global core.excludesfile ~/.gitignore
- Set up a global gitignore file
Generate SSH key for GitHub:
- Generate a new SSH key for GitHub authentication
ssh-keygen -t ed25519 -C "your.email@example.com"
- Generate a new SSH key for GitHub authentication
Start SSH agent:
- Start the SSH agent in the background
eval "$(ssh-agent -s)"
- Start the SSH agent in the background
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
- Create the SSH directory if it doesn't exist
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:
- Go to GitHub SSH Keys settings
- Click "New SSH key", paste your key, and save
- 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
- Display your public SSH key to copy:
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
- Clone the dotfiles repository with this terminal command
Change to the dotfiles directory:
- Navigate to the dotfiles directory with this terminal command
cd ~/.dotfiles
- Navigate to the dotfiles directory with this terminal command
Use stow to create symlinks:
- Create symlinks while preserving existing files with this terminal command
stow . --adopt
- Create symlinks while preserving existing files with this terminal command
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'
- Commit your existing configuration files with this terminal command
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
- Revert any local changes to use the repository versions
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"
- Create symlink for global gitignore
Final Configuration Steps
After installing all components, you need to complete a few final steps to get everything working properly:
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) orCtrl+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
- Launch VS Code from the command line
Install Tmux Plugins
- Start tmux and install plugins:
- Launch tmux in your terminal
tmux
- Install the plugins by pressing
Ctrl+A
and thenShift+I
- You'll see a message at the bottom of the screen confirming the plugins are installed
- Launch tmux in your terminal
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
- Start Neovim from your terminal
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
- Install Go with this terminal command
Rust:
- Install Rust with this terminal command
mise use --global rust@stable
- Install Rust with this terminal command
Java:
- Install Java with this terminal command
mise use --global java@temurin-17
- Install Java with this terminal command
PHP:
- Install PHP with this terminal command
mise use --global php@8.1
- Install PHP with this terminal command
Cloud Development Tools
Essential tools for working with cloud providers:
AWS CLI:
- Install AWS CLI with this terminal command
brew install awscli
- Install AWS CLI with this terminal command
Azure CLI:
- Install Azure CLI with this terminal command
brew install azure-cli
- Install Azure CLI with this terminal command
Google Cloud SDK:
- Install Google Cloud SDK with this terminal command
brew install --cask google-cloud-sdk
- Install Google Cloud SDK with this terminal command