Skills direnv
install
source · Clone the upstream repo
git clone https://github.com/TerminalSkills/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/TerminalSkills/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/direnv" ~/.claude/skills/terminalskills-skills-direnv && rm -rf "$T"
manifest:
skills/direnv/SKILL.mdsafety · automated scan (low risk)
This is a pattern-based risk scan, not a security review. Our crawler flagged:
- references .env files
- references API keys
Always read a skill's source content before installing. Patterns alone don't mean the skill is malicious — but they warrant attention.
source content
direnv
Overview
direnv automatically loads/unloads environment variables when you cd into a directory. No more source .env — enter the project folder and variables are set.
Instructions
Step 1: Install
brew install direnv # Add to .bashrc or .zshrc: eval "$(direnv hook bash)"
Step 2: Configure
# .envrc — Auto-loaded when entering directory export DATABASE_URL="postgresql://localhost:5432/myapp" export API_KEY="sk-dev-key-123" export NODE_ENV="development" dotenv .env PATH_add bin PATH_add node_modules/.bin
direnv allow # required first time and after changes
Step 3: Per-Project Layouts
# .envrc — Use specific versions use nvm 20 layout python3
Guidelines
- Always add .envrc to .gitignore — it contains secrets.
- Use .envrc.example (committed) as template.
- direnv unloads vars when you leave the directory — no env pollution.