direnv
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "direnv" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-31b2e6ad09c0a29f9e158dd93ce468d43385c9df7f38515e45c9f6c1d243e114. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Use direnv for automatic environment variable loading: help users manage environment variables per directory and enable automatic configuration switching, suitable for scenarios that require automatic loading or isolation of environment variables across projects and avoiding manual .env file loading.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: direnv
description: >-
Auto-load environment variables per directory with direnv. Use when a user asks to manage env vars per project, auto-switch configs between projects, or avoid manual .env loading.
license: Apache-2.0
compatibility: 'Linux, macOS, WSL'
metadata:
author: terminal-skills
version: 1.0.0
category: development
tags:
- direnv
- environment
- dotenv
- shell
- configdirenv
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.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决开发者按目录自动加载环境变量的实际需求,避免手动 source .env 文件
- 适用于多项目间自动切换配置,实用性强,受众明确
Highlights
- description 明确描述使用场景,覆盖合理,边界清晰
Highlights
- 结构清晰,分步骤说明,含端到端示例,frontmatter 完整
Highlights
- 工具来源明确,参数正确,覆盖主要异常,不可逆操作有确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 28 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 37
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.