Skip to main content
Alison Aquinas logoAlison's LLM Skills Marketplace

direnv

Included in skill bundleci-cdView on GitHub ↗

Files

SKILL.mdagentsreferences

Install

Install only this skill with npx skills
npx skills add alisonaquinas/llm-ci-dev --skill 'direnv' -g -y
Install the containing skill bundle
/plugin install ci-cd@llm-skills
Download direnv-skill.zip
This skill is bundled inside ci-cd. Use npx skills when you only want this skill, or install the bundle once to make every included skill available through the plugin marketplace flow. Browse the full skill bundle repository at github.com/alisonaquinas/llm-ci-dev.

Invoke

Invoke this skill after installation
/ci-cd:direnv

SKILL.md


name: direnv description: Manage per-directory environment variables with direnv. Use when tasks mention direnv, .envrc, per-directory environment variables, or automatic environment switching.

direnv

Intent Router

RequestReferenceLoad When
apt/brew/nix install, shell hook, .envrc security modelreferences/install-and-setup.mddirenv needs to be installed or the shell hook is missing
allow/deny/reload/edit/status/prune commandsreferences/command-cookbook.mdSpecific direnv commands are needed
export, PATH_add, source_env, layout, use commandsreferences/envrc-patterns.mdWriting or debugging .envrc content is the topic
pyenv layout, nvm, rbenv, asdf use, dotenv, editorreferences/integrations.mdIntegrating direnv with other tools or editors is the topic

Quick Start

# Allow a directory's .envrc
direnv allow

# Check current status
direnv status

# Edit .envrc and reload automatically on save
direnv edit .

# Reload after manual edits
direnv reload

Core Command Tracks

  • Allow .envrc: direnv allow (required after creating or modifying .envrc)
  • Deny .envrc: direnv deny
  • Reload env: direnv reload
  • Edit safely: direnv edit . (allows after saving)
  • Status: direnv status
  • Prune stale: direnv prune (clean up allowed list for missing directories)

Safety Guardrails

  • Never run direnv allow on an .envrc from an untrusted source without reviewing its contents first.
  • Do not commit secrets directly in .envrc — load them from a .env file excluded by .gitignore.
  • Add .envrc to .gitignore if it contains machine-specific paths or credentials; share a .envrc.example instead.
  • Re-run direnv allow whenever .envrc is modified — direnv blocks the changed file until re-approved.

Workflow

  1. Install direnv and add the shell hook to the profile (see references/install-and-setup.md).
  2. Create .envrc in the project directory with the required exports or layout.
  3. Run direnv allow to approve the file.
  4. Verify environment variables are set with direnv status or echo $VAR.
  5. When .envrc changes, run direnv allow again.
# Troubleshoot: check if .envrc is blocked, then re-approve after review
direnv status
cat .envrc          # review contents before trusting
direnv allow
direnv reload

Related Skills

  • nvm — Node.js version manager, integrates with direnv via layout node
  • pyenv — Python version manager, integrates via layout pyenv
  • rbenv — Ruby version manager, integrates via layout ruby
  • asdf — universal version manager, integrates via use asdf

References

← Back to marketplace