brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
setup-wsl-dev-environmentSet up a WSL2 development environment on Windows including shell configuration, essential tools, Git, SSH keys, Node.js, Python, and cross-platform path management. Use when setting up a new Windows machine for development, configuring WSL2 for the first time, adding development tools to an existing WSL installation, or setting up cross-platform workflows t…
Independent GitHub snapshot · Automated classification · Original documentation governs
Configure complete WSL2 dev environment for cross-platform work.
In PowerShell (Administrator):
wsl --install
wsl --set-default-version 2
Restart if prompted. Ubuntu installs default.
Got: After reboot, wsl --list --verbose shows distro running WSL version 2. wsl cmd opens Linux shell.
If fail: WSL2 install fail? Enable "Virtual Machine Platform" and "Windows Subsystem for Linux" features manual via optionalfeatures.exe. Old Windows 10 builds? Kernel update from Microsoft needed.
Create ~/.wslconfig in Windows home dir:
[wsl2]
memory=8GB
processors=4
localhostForwarding=true
Got: .wslconfig file exists in Windows user home (e.g., C:\Users\Name\.wslconfig). After wsl --shutdown and restart WSL, limits applied.
If fail: Config no effect? Verify file in correct location (Windows home, not WSL home). Run wsl --shutdown, reopen WSL.
sudo apt update && sudo apt upgrade -y
sudo apt install -y \
build-essential \
curl \
wget \
git \
git-lfs \
vim \
htop \
tree \
jq \
ripgrep \
fd-find \
unzip \
zip
Create useful aliases:
echo 'alias fd="fdfind"' >> ~/.bashrc
Got: All packages install no errors. Cmds git --version, jq --version, rg --version, tree work.
If fail: apt install fail? Run sudo apt update first to refresh pkg lists. Pkg not found? Check Ubuntu version supports it or install alt source (snap, cargo, manual).
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
git config --global init.defaultBranch main
git config --global core.autocrlf input
git config --global color.ui auto
git config --global core.editor vim
Got: git config --list shows correct user name, email, default branch (main), autocrlf (input), editor settings.
If fail: Settings not applied? Verify used --global (not --local which only applies to current repo). Check ~/.gitconfig has expected entries.
ssh-keygen -t ed25519 -C "your.email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
# Add to GitHub: Settings > SSH and GPG keys
Test: ssh -T git@github.com
Got: ssh -T git@github.com returns "Hi username! You've successfully authenticated." SSH key pair exists at ~/.ssh/id_ed25519 and ~/.ssh/id_ed25519.pub.
If fail: Auth fails? Verify public key added to GitHub (Settings > SSH and GPG keys). Check ssh-agent running, key loaded with ssh-add -l. Agent not running? Add eval "$(ssh-agent -s)" to ~/.bashrc.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
source ~/.bashrc
nvm install --lts
nvm use --lts
Got: node --version and npm --version return current LTS versions. nvm ls shows installed version marked default.
If fail: nvm not found after install? Source ~/.bashrc or open new terminal. Install script fails? Download, review, run manual.
# Install build dependencies
sudo apt install -y make libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev libncursesw5-dev xz-utils \
tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
curl https://pyenv.run | bash
# Add to ~/.bashrc
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
source ~/.bashrc
pyenv install 3.12
pyenv global 3.12
Got: python --version returns Python 3.12.x. pyenv versions shows installed version set global.
If fail: pyenv install fail with build errors? Ensure all build deps from apt install cmd installed. Missing libs (especially libssl-dev or zlib1g-dev) most common cause of Python build failure.
Add to ~/.bashrc:
# History
export HISTSIZE=10000
export HISTFILESIZE=20000
export HISTCONTROL=ignoredups:erasedups
shopt -s histappend
# Navigation aliases
alias ll='ls -alF'
alias la='ls -A'
alias ..='cd ..'
alias ...='cd ../..'
# Development paths
export DEV_HOME="/mnt/d/dev/p"
alias dev='cd $DEV_HOME'
# Functions
mkcd() { mkdir -p "$1" && cd "$1"; }
# PATH additions
export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
Got: After source ~/.bashrc, all aliases (ll, la, .., dev) work, mkcd function creates and enters dirs, $DEV_HOME points to dev dir.
If fail: Aliases not available? Verify additions appended to ~/.bashrc (not ~/.bash_profile or ~/.profile). Run source ~/.bashrc to reload without new terminal.
# Add Claude CLI to PATH (after installation)
echo 'export PATH="$HOME/.claude/local/node_modules/.bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Verify
which claude
Got: which claude returns path to Claude Code CLI binary (e.g., ~/.claude/local/node_modules/.bin/claude). Run claude --version prints installed version.
If fail: claude not found? Verify PATH export added to ~/.bashrc and sourced. Check Claude Code installed at ~/.claude/local/. Not installed? Follow Claude Code install instructions first.
| Windows | WSL |
|---|---|
C:\Users\Name | /mnt/c/Users/Name |
D:\dev\projects | /mnt/d/dev/projects |
%APPDATA% | /mnt/c/Users/Name/AppData/Roaming |
Open Windows Explorer from WSL: explorer.exe .
Got: Path conversion table understood and tested: access Windows path from WSL works (e.g., ls /mnt/c/Users/), explorer.exe . opens Windows Explorer to current WSL dir.
If fail: /mnt/c/ not accessible? Verify WSL automount configured. Check /etc/wsl.conf for [automount] settings. Run wsl --shutdown and restart if mount points stale.
/mnt/: Store frequent projects in WSL filesystem (~/) for better speed. Use /mnt/ for projects shared with Windows tools.core.autocrlf=input prevents CRLF issues. Configure editors use LF./mnt/ may show incorrect permissions. Add to /etc/wsl.conf: [automount]\noptions = "metadata,umask=22,fmask=11"configure-git-repository - detailed Git repo setupconfigure-mcp-server - MCP setup needs WSL environmentwrite-claude-md - configure AI assistant for projects