No description
Find a file
Syed Hasibur Rahman ac6c9380b7 Merge branch 'master' into 'main'
Initial commit: env-kit portable dev environment

See merge request ananno/env-kit!2
2026-04-26 07:29:40 +09:00
config/.config Initial commit: env-kit portable dev environment 2026-01-09 04:53:22 +09:00
home Added worktree script and make a single entry point 2026-01-27 18:45:45 +09:00
scripts Added worktree script and make a single entry point 2026-01-27 18:45:45 +09:00
.env.example Initial commit: env-kit portable dev environment 2026-01-09 04:53:22 +09:00
.gitignore Initial commit: env-kit portable dev environment 2026-01-09 04:53:22 +09:00
.gitlab-ci.yml Configure Secret Detection in .gitlab-ci.yml, creating this file if it does not already exist 2026-01-09 04:50:04 +09:00
install.sh Added worktree script and make a single entry point 2026-01-27 18:45:45 +09:00
README.md Added worktree script and make a single entry point 2026-01-27 18:45:45 +09:00

🧰 env-kit

Your dev environment, packaged and ready to go.

A portable development environment configuration that lets you replicate your exact shell, editor, and tooling setup across any macOS or Linux machine with a single command.

✨ Features

  • Cross-platform: Supports macOS, Debian/Ubuntu, and RedHat/Fedora/CentOS
  • Modern tooling: bat, eza, fd, ripgrep, fzf, zoxide, git-delta, and more
  • Zsh with superpowers: oh-my-zsh + Powerlevel10k + carefully tuned plugins
  • Version managers: pyenv, goenv for Python and Go development
  • Safe application: Backs up existing dotfiles before creating symlinks
  • Work-friendly: Separates personal and work-specific configurations
  • No secrets in VCS: API keys and credentials use placeholders

🚀 Quick Start

One-Command Installation

git clone <your-repo-url> ~/env-kit
cd ~/env-kit
./install.sh

That's it! The installer will:

  • Auto-detect your OS (macOS, Debian/Ubuntu, or RedHat/Fedora)
  • Install all packages and modern CLI tools
  • Apply dotfile symlinks
  • Optionally install fonts

Advanced Usage

# Non-interactive installation (use defaults)
./install.sh --yes

# Skip font installation (useful for servers)
./install.sh --skip-fonts

# Only apply dotfiles (skip package installation)
./install.sh --skip-bootstrap

# Dry run to see what would happen
./install.sh --dry-run

# Show all options
./install.sh --help

Manual Installation (Advanced)

If you prefer to run individual steps:

1. Bootstrap (macOS):

./scripts/bootstrap_macos.sh

2. Bootstrap (Debian/Ubuntu):

./scripts/bootstrap_debian.sh

3. Bootstrap (RedHat/Fedora/CentOS):

./scripts/bootstrap_redhat.sh

4. Apply dotfiles:

./scripts/symlink_apply.sh

5. Install fonts:

# macOS
./scripts/install_fonts_macos.sh

# Linux
./scripts/install_fonts_linux.sh

📦 What Gets Installed

Shell & Environment

  • zsh - Modern shell
  • oh-my-zsh - Zsh framework
  • Powerlevel10k - Beautiful prompt theme
  • zsh plugins - autosuggestions, syntax-highlighting, bat, eza integrations

Modern CLI Tools

  • bat - Better cat with syntax highlighting
  • eza - Better ls with colors and icons
  • fd - Better find
  • ripgrep (rg) - Better grep
  • fzf - Fuzzy finder (Ctrl+R for history search!)
  • zoxide - Smarter cd that learns your habits
  • tldr - Simplified man pages
  • git-delta - Better git diff viewer
  • gh - GitHub CLI

Development Tools

  • pyenv - Python version manager
  • goenv - Go version manager
  • direnv - Per-directory environment variables
  • neovim - Modern vim
  • jq/yq - JSON/YAML processors
  • httpie - Friendly HTTP client

System Monitoring

  • btop - Resource monitor
  • htop - Process viewer

Git Utilities

  • worktree - Git worktree helper with automatic symlink setup for dev environment files

Fonts

  • Hack Nerd Font - Powerline-compatible font with icons
  • Source Code Pro - Clean, readable monospace font

📁 Repository Structure

env-kit/
├── install.sh              # 🚀 Single entry point installer
├── home/                    # Dotfiles for $HOME
│   ├── .zshrc              # Main zsh config
│   ├── .zprofile           # Login shell config
│   ├── .zshenv             # Environment variables
│   ├── .p10k.zsh           # Powerlevel10k theme config
│   ├── .gitconfig          # Git configuration
│   ├── .vimrc              # Vim configuration
│   ├── .ideavimrc          # IdeaVim configuration
│   └── .work.zsh.example   # Work-specific settings template
├── config/
│   └── .config/            # XDG config files
│       ├── gh/             # GitHub CLI config
│       ├── btop/           # btop config
│       └── htop/           # htop config
├── scripts/
│   ├── bootstrap_macos.sh
│   ├── bootstrap_debian.sh
│   ├── bootstrap_redhat.sh
│   ├── install_fonts_macos.sh
│   ├── install_fonts_linux.sh
│   ├── symlink_apply.sh
│   └── worktree             # Git worktree helper script
└── README.md

🔐 Work-Specific & Private Settings

To keep work-specific aliases, custom paths, and API keys out of version control:

  1. Copy the example file:

    cp home/.work.zsh.example ~/.work.zsh
    
  2. Edit ~/.work.zsh with your private settings:

    • Company-specific aliases
    • Custom tool paths
    • API keys (use placeholders like {ANTHROPIC_API_KEY})
    • VPN/authentication scripts
  3. Never commit ~/.work.zsh to the repository!

The main .zshrc will automatically source ~/.work.zsh if it exists.

API Key Management

Option 1: Environment file

# In ~/.work.zsh
[[ -f "$HOME/.env" ]] && source "$HOME/.env"

Option 2: macOS Keychain

# In ~/.work.zsh
ANTHROPIC_API_KEY="$(security find-generic-password -s ANTHROPIC_API_KEY -a "$USER" -w 2>/dev/null)"
export ANTHROPIC_API_KEY

Option 3: Direct export (remember to use placeholders in the example file)

# In ~/.work.zsh (replace {PLACEHOLDER} with actual value)
export ANTHROPIC_API_KEY="{ANTHROPIC_API_KEY}"

✅ Verification

After installation, verify everything works:

# Check shell
zsh --version

# Check modern CLI tools
bat --version
eza --version
fd --version
rg --version
fzf --version
zoxide --version
delta --version

# Check version managers
pyenv --version
goenv --version
direnv --version

# Check GitHub CLI
gh --version

# Test fuzzy history search
# Press Ctrl+R and start typing

🌳 Git Worktree Helper

The worktree command simplifies creating git worktrees with automatic environment setup:

worktree <branch_name>

This will:

  1. Create a new branch if it doesn't exist
  2. Create a worktree in the parent directory of the repo
  3. Symlink environment files to the new worktree:
    • Standard dev files: .envrc, .python-version, .venv, .vscode, .idea
    • Claude Code config: Auto-detects .claude directory in repo root, repo parent, or home directory
    • Custom files: Any paths specified in WORKTREE_EXTRA_SYMLINKS environment variable
  4. Enable direnv if available

Customization

To add additional symlinks, set the WORKTREE_EXTRA_SYMLINKS environment variable:

# In ~/.zshrc or ~/.work.zsh
export WORKTREE_EXTRA_SYMLINKS="$HOME/.config/myapp:/path/to/other"

🔄 Updating

To update your dotfiles on a machine:

cd ~/env-kit
git pull
./scripts/symlink_apply.sh
exec zsh

🎨 Customization

Modifying the Prompt

To reconfigure Powerlevel10k:

p10k configure

Adding More Tools

Edit the appropriate bootstrap script (bootstrap_macos.sh, etc.) and add packages to the PACKAGES array.

Customizing Shell Behavior

Edit home/.zshrc for universal changes, or ~/.work.zsh for machine-specific overrides.

🐛 Troubleshooting

"command not found" after installation

Restart your shell:

exec zsh

Plugins not loading

Make sure oh-my-zsh installed correctly:

ls -la ~/.oh-my-zsh

Re-run the bootstrap script if needed.

Powerlevel10k not showing or icons missing

Install the fonts:

# macOS
./scripts/install_fonts_macos.sh

# Linux
./scripts/install_fonts_linux.sh

Then set your terminal font to "Hack Nerd Font" or "Source Code Pro".

Check if files were backed up:

ls -la ~/.envkit_backup_*

Manually verify symlinks:

ls -la ~/ | grep '^l'

📝 License

This is a personal dotfiles repository. Feel free to fork and adapt for your own use!

🙏 Acknowledgments

Built with these amazing open-source projects: