Skip to content

paulomuggler/dev-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DevEnv - Automated Development Environment Setup

A comprehensive, reproducible development environment setup for macOS, Ubuntu, and Arch Linux. Built with modular shell scripts, GNU Stow for configuration management, and a tmux-based AI-assisted workflow.

๐ŸŽฏ Overview

DevEnv automates the installation and configuration of a complete terminal-based development environment featuring:

  • Modern CLI tools: fzf, ripgrep, bat, eza, zoxide, lazygit, and more
  • Neovim with LazyVim: Full-featured IDE with LSP support and extensive plugins
  • Tmux workspace: Multi-pane layouts optimized for development workflows
  • AI integration: Claude Code, Gemini CLI, OpenAI Codex, and Grok CLI with custom tmux workflows
  • Cross-platform: Single codebase supporting macOS, Ubuntu, and Arch Linux
  • Version-controlled configurations: All dotfiles managed via GNU Stow
  • Modular architecture: Each tool has its own installation script and configuration package

โœจ Key Features

๐Ÿ”ง Modular Installation Scripts

Each tool has a dedicated install script with:

  • Idempotent execution (safe to run multiple times)
  • Platform-agnostic package management
  • Validation and error handling
  • Ansible-inspired state reporting (CHANGED/OK/FAILED/SKIPPED)

๐Ÿ“ฆ Configuration Management

  • GNU Stow: Symlink-based dotfile management
  • XDG compliance: Follows ~/.config standards
  • Modular packages: Separate configuration for each tool
  • Shell.d pattern: Tool-specific shell configs in ~/.shell.d/

๐ŸŽจ Consistent Theming

  • Catppuccin: Unified color scheme across all tools
  • FiraCode Nerd Font: Programming font with icon support
  • iTerm2: Custom preferences with version control

๐Ÿค– AI-Assisted Development

  • lazy-llm: Custom tmux workflow for AI-assisted coding
  • Multiple AI tools: Support for Claude, Gemini, Codex, Grok
  • Prompt buffer: Send code and prompts to AI from nvim
  • Git integration: Track changes during AI sessions

๐Ÿš€ Quick Start

Prerequisites

  • macOS: 12.0+ (Monterey or later)
  • Ubuntu: 20.04+ (or Debian-based distributions)
  • Arch Linux: Current rolling release

Installation

# Clone the repository
git clone https://github.com/yourusername/dev-env.git ~/Projects/dev-env
cd ~/Projects/dev-env

# Run the main setup script
./setup.sh

# Or run in dry-run mode to preview changes
DRY_RUN=true ./setup.sh

The setup script will:

  1. Install foundation tools (Homebrew on macOS, package manager verification)
  2. Install core development tools (Git, Neovim, Tmux, Starship)
  3. Install productivity tools (fzf, ripgrep, bat, eza, zoxide, lazygit)
  4. Set up language environments (Python, Node.js, Ruby, .NET)
  5. Apply dotfile configurations via GNU Stow
  6. Configure shell integration for all tools

Post-Installation

# Restart your terminal or source the shell configuration
source ~/.bash_profile

# Verify installation
nvim --version
tmux -V
starship --version

# Check Neovim health
nvim +checkhealth

๐Ÿ“ Repository Structure

dev-env/
โ”œโ”€โ”€ setup.sh                    # Main orchestrator script
โ”œโ”€โ”€ install-scripts/            # Modular installation scripts
โ”‚   โ”œโ”€โ”€ install-homebrew.sh    # Package manager (macOS)
โ”‚   โ”œโ”€โ”€ install-stow.sh        # Configuration management
โ”‚   โ”œโ”€โ”€ install-nvim.sh        # Neovim + LazyVim
โ”‚   โ”œโ”€โ”€ install-tmux.sh        # Terminal multiplexer
โ”‚   โ”œโ”€โ”€ install-fzf.sh         # Fuzzy finder
โ”‚   โ”œโ”€โ”€ install-starship.sh    # Shell prompt
โ”‚   โ””โ”€โ”€ ...                    # 35+ tool install scripts
โ”œโ”€โ”€ dotfiles/                  # GNU Stow packages
โ”‚   โ”œโ”€โ”€ shell/                 # Bash configurations
โ”‚   โ”‚   โ”œโ”€โ”€ dot-bashrc        # Interactive shell config
โ”‚   โ”‚   โ”œโ”€โ”€ dot-bash_profile  # Login shell config
โ”‚   โ”‚   โ”œโ”€โ”€ dot-bash_path     # PATH management
โ”‚   โ”‚   โ””โ”€โ”€ dot-shell.d/      # Tool config symlinks
โ”‚   โ”œโ”€โ”€ nvim/                  # Default Neovim config
โ”‚   โ”œโ”€โ”€ lazyvim/               # LazyVim configuration
โ”‚   โ”œโ”€โ”€ tmux/                  # Tmux configuration
โ”‚   โ”œโ”€โ”€ git/                   # Git configuration
โ”‚   โ”œโ”€โ”€ starship/              # Prompt configuration
โ”‚   โ”œโ”€โ”€ iterm2/                # iTerm2 preferences (macOS)
โ”‚   โ””โ”€โ”€ [tool]/                # Individual tool configs
โ”œโ”€โ”€ libs/                      # Shared utilities
โ”‚   โ”œโ”€โ”€ linker.sh             # Library loader
โ”‚   โ”œโ”€โ”€ platform.sh           # Platform abstraction
โ”‚   โ”œโ”€โ”€ utils.sh              # Helper functions
โ”‚   โ”œโ”€โ”€ bashlog/              # Logging library
โ”‚   โ”œโ”€โ”€ bash-utility/         # Bash standard library
โ”‚   โ””โ”€โ”€ colr/                 # Terminal colors
โ”œโ”€โ”€ external/                  # Git submodules
โ”‚   โ””โ”€โ”€ lazy-llm/             # AI workflow tool
โ”œโ”€โ”€ bin/                       # Custom scripts
โ”‚   โ””โ”€โ”€ custom utilities
โ”œโ”€โ”€ .env.example              # Environment variables template
โ”œโ”€โ”€ SETUP.md                  # Detailed tool list and phases
โ”œโ”€โ”€ CLAUDE.md                 # AI assistant guidelines
โ”œโ”€โ”€ SHELL_SCRIPTING.md        # Development conventions
โ””โ”€โ”€ README.md                 # This file

๐Ÿ› ๏ธ Core Tools

Foundation

  • Homebrew (macOS) - Package manager
  • GNU Stow - Dotfile symlink manager

Development

  • Neovim - Modern vim-based editor
  • LazyVim - Neovim distribution with sane defaults
  • Tmux - Terminal multiplexer
  • Git - Version control

Productivity

  • fzf - Fuzzy finder for files, history, commands
  • ripgrep - Fast text search (better grep)
  • fd - Fast file finder (better find)
  • bat - Cat with syntax highlighting
  • eza - Modern ls replacement with git integration
  • zoxide - Smart directory navigation (better cd)
  • lazygit - Terminal UI for git
  • Starship - Fast, customizable shell prompt

Languages & Runtimes

  • Python (pyenv) - Python version manager
  • Node.js - JavaScript runtime
  • Ruby (rbenv) - Ruby version manager
  • .NET SDK - C# development platform

System Utilities

  • gdu - Disk usage analyzer
  • bottom - System resource monitor
  • htop - Process viewer
  • jq - JSON processor
  • tree - Directory tree viewer

AI Tools

  • Claude Code - Anthropic's coding assistant
  • Gemini CLI - Google's AI agent
  • OpenAI Codex - OpenAI's coding agent
  • Grok CLI - xAI's terminal agent
  • lazy-llm - Custom tmux AI workflow

See SETUP.md for the complete list of 70+ tools and installation phases.

๐Ÿ“š Documentation

  • SETUP.md - Complete tool list with installation phases and dependencies
  • CLAUDE.md - AI assistant development guidelines and project conventions
  • SHELL_SCRIPTING.md - Bash scripting best practices and library usage
  • PLANNING.md - Implementation roadmap and feature planning
  • Individual READMEs - Each dotfiles/[tool]/ package has its own documentation

๐ŸŽจ Theming

Catppuccin Color Scheme

Consistent theming across all tools:

  • Tmux: Catppuccin status line with custom segments
  • Neovim/LazyVim: Catppuccin Mocha theme
  • bat: Catppuccin syntax highlighting
  • fzf: Catppuccin color scheme

Fonts

  • FiraCode Nerd Font: Primary font with ligatures and icon support
  • Installed via install-scripts/install-nerd-fonts.sh
  • Configure in terminal emulator and Neovim

๐Ÿ”ง Configuration Management

Shell Configuration Architecture

~/.bash_profile        # Login shell (sources .bashrc and .bash_path)
  โ”œโ”€โ”€ ~/.bash_path     # PATH management (Homebrew, language tools)
  โ””โ”€โ”€ ~/.bashrc        # Interactive shell config
      โ”œโ”€โ”€ ~/.bash_env  # Environment variables (optional)
      โ”œโ”€โ”€ ~/.bash_aliases  # General aliases (fallback defaults)
      โ”œโ”€โ”€ ~/.bash_functions  # General functions
      โ””โ”€โ”€ ~/.shell.d/*.sh  # Tool-specific configs (override defaults)

Tool Configuration Pattern

Each tool follows this structure:

dotfiles/[tool]/
โ”œโ”€โ”€ [tool].sh                      # Shell integration
โ”œโ”€โ”€ .config/[tool]/config          # XDG-compliant config
โ”œโ”€โ”€ dot-[file]                     # Home directory dotfile
โ””โ”€โ”€ README.md                      # Tool documentation

Installation scripts:

  1. Install the tool via package manager
  2. Link [tool].sh into dotfiles/shell/dot-shell.d/
  3. Stow the tool's configuration package
  4. Re-stow shell package to activate symlinks

Stow Safety

All scripts use the stow_package() utility function which:

  • Creates backups of existing configurations
  • Detects and handles conflicts
  • Supports adopt mode for importing existing configs
  • Prevents accidental overwrites

๐Ÿš€ Usage

Running Individual Install Scripts

# Install a specific tool
cd ~/Projects/dev-env
./install-scripts/install-fzf.sh

# Dry-run mode (preview without changes)
DRY_RUN=true ./install-scripts/install-nvim.sh

# Check if tool needs installation
./install-scripts/install-git.sh
# Output: [OK] git is already installed (version 2.43.0)

Managing Configurations

# Apply a configuration package
cd ~/Projects/dev-env/dotfiles
stow -t "${HOME}" --dotfiles [package-name]

# Remove a configuration
stow -D -t "${HOME}" --dotfiles [package-name]

# Adopt existing configuration
stow --adopt -t "${HOME}" --dotfiles [package-name]

Shell Integration

Tool-specific configurations are automatically loaded:

# After installing a tool, restart shell or source config
source ~/.bashrc

# Tool configs are in ~/.shell.d/
ls -la ~/.shell.d/
# bat.sh -> ../Projects/dev-env/dotfiles/bat/bat.sh
# fzf.sh -> ../Projects/dev-env/dotfiles/fzf/fzf.sh
# git.sh -> ../Projects/dev-env/dotfiles/git/git.sh

AI-Assisted Development

# Launch AI workflow (default: Claude Code)
lazy-llm

# Use specific AI tool
lazy-llm -t gemini

# Work in specific directory
lazy-llm -d ~/Projects/my-project

# Named session
lazy-llm -s my-feature

# Combined options
lazy-llm -s bugfix -d ~/Projects/app -t claude

Inside the workflow:

  • Left pane: AI assistant (Claude, Gemini, etc.)
  • Right pane: Neovim editor
  • Bottom pane: Prompt buffer for composing AI requests
  • Press configured keybinding to send prompt to AI
  • Use @filename for file reference autocomplete

๐ŸŒ Platform Support

macOS (Primary Target)

  • Full support for all features
  • Homebrew package installation
  • iTerm2 configuration management
  • Tested on macOS 12.0+ (Monterey and later)

Ubuntu/Debian

  • Complete tool support
  • apt package manager integration
  • Handles package naming differences (batโ†’batcat, fdโ†’fdfind)
  • Python venv dependencies auto-installed
  • Some packages unavailable in apt (documented in SETUP.md)

Arch Linux

  • pacman integration
  • Full tool support planned
  • Currently under development

Platform Abstraction

The libs/platform.sh library provides:

  • Platform detection: get_platform() returns macos/ubuntu/arch
  • Package management: pkg_install(), pkg_update(), pkg_installed()
  • Package name mapping: Cross-platform package name resolution
  • Validation: validate_platform() checks platform support

๐Ÿงช Testing

# Test on current system
./setup.sh

# Dry-run mode (no changes)
DRY_RUN=true ./setup.sh

# Test individual script
DRY_RUN=true ./install-scripts/install-bat.sh

# Verify idempotency (run twice, second should report OK)
./install-scripts/install-fzf.sh
./install-scripts/install-fzf.sh
# Second run: [OK] fzf is already installed

๐Ÿ” Troubleshooting

Installation Issues

# Check if Homebrew is working (macOS)
brew doctor

# Verify package manager (Ubuntu)
sudo apt update
sudo apt-cache search [package-name]

# Check install script logs
./install-scripts/install-[tool].sh
# Scripts provide detailed output with [INFO], [WARN], [ERROR] prefixes

Configuration Issues

# Check stow conflicts
cd ~/Projects/dev-env/dotfiles
stow -n -v -t "${HOME}" --dotfiles [package]

# View existing symlinks
ls -la ~/.config/[tool]/

# Check shell.d integration
ls -la ~/.shell.d/
source ~/.bashrc

Neovim Issues

# Run health checks
nvim +checkhealth

# Check specific provider
nvim +checkhealth provider

# Verify Python provider
python3 -m pip list | grep pynvim

# Check LSP servers
nvim +Mason

PATH Issues

# Verify PATH includes all tools
echo $PATH

# Check bash_path
cat ~/.bash_path

# Re-source configuration
source ~/.bash_profile

๐Ÿค Contributing

Adding New Tools

Follow the complete workflow in CLAUDE.md:

  1. Research & Selection: Evaluate tool and dependencies
  2. Create Install Script: Follow existing patterns in install-scripts/
  3. Create Configuration Package: Set up dotfiles/[tool]/ structure
  4. Shell Integration: Use link_shell_config() utility
  5. Documentation: Add README and update SETUP.md
  6. Testing: Verify installation and idempotency

Development Guidelines

See SHELL_SCRIPTING.md for:

  • Bash scripting best practices
  • Library usage (bashlog, bash-utility, platform abstraction)
  • Error handling patterns
  • State-based execution (Ansible-inspired)
  • Testing approaches

Code Style

  • Use set -euo pipefail in all scripts
  • Prefer library functions over custom implementations
  • Follow existing naming conventions
  • Document all functions and complex logic
  • Include validation at each step
  • Return proper exit codes

๐Ÿ“œ License

This project is open source and available under the MIT License.

๐Ÿ™ Acknowledgments

Libraries & Tools

  • bashlog - Lightweight logging with levels
  • bash-utility - Comprehensive bash standard library
  • colr.sh - Terminal color support
  • GNU Stow - Symlink farm manager

Inspiration

  • LazyVim - Neovim distribution
  • Catppuccin - Soothing color scheme
  • Nerd Fonts - Icon-enhanced fonts
  • Modern Unix - Collection of modern CLI alternatives

๐Ÿ“ฎ Support

  • Issues: Report bugs and request features on GitHub Issues
  • Discussions: Join GitHub Discussions for questions and ideas
  • Documentation: Check the docs in this repo first

๐Ÿ—บ๏ธ Roadmap

See PLANNING.md for detailed roadmap. Upcoming features:

  • Phase 1: โœ… MVP setup infrastructure (complete)
  • Phase 2: โœ… Multiplatform support (complete)
  • Phase 3: ๐Ÿšง Enhanced LLM integration
    • Git-based conversation branching
    • Context reset capabilities
    • Working tree state tracking
  • Phase 4: ๐Ÿ”œ Windows WSL support
  • Phase 5: ๐Ÿ”œ Docker containerized environments

Built with โค๏ธ for developers who live in the terminal

About

Modern macOS development environment with modular dotfiles and automated setup scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •