macOS
brew install direnvlocal Homebrew formula metadata
sudo port install direnvMacPorts ports tree · devel/direnv/Portfile · 来源: api.github.com
安装
brew install direnvlocal Homebrew formula metadata
sudo port install direnvMacPorts ports tree · devel/direnv/Portfile · 来源: api.github.com
sudo apk add direnvAlpine Linux edge package indexes · direnv · 来源: dl-cdn.alpinelinux.org
sudo apt install direnvDebian stable package indexes · direnv · 来源: deb.debian.org
sudo dnf install direnvFedora Rawhide package metadata · direnv · 来源: dl.fedoraproject.org
nix profile install nixpkgs#direnvnixpkgs package indexes · pkgs/by-name/di/direnv/package.nix · 来源: api.github.com
sudo pacman -S direnvArch Linux sync databases · direnv · 来源: geo.mirror.pkgbuild.com
sudo zypper install direnvopenSUSE Tumbleweed package metadata · direnv · 来源: download.opensuse.org
scoop install main/direnvScoop official bucket manifest trees · bucket/direnv.json · 来源: api.github.com
winget install --id direnv.direnv -eWindows Package Manager source index · direnv.direnv · 来源: cdn.winget.microsoft.com
概览
Load/unload environment variables based on $PWD
历史
direnv is a shell extension for loading and unloading project-specific environment variables as the current working directory changes.
The project frames itself as a way to unclutter shell startup files: instead of putting every export in a global profile, a project can keep an authorized .envrc near its source tree. Its README and man page describe a small, language-agnostic executable that hooks into interactive shells and evaluates environment changes in a subprocess.
Official installation documentation lists packages or install paths for Fedora, Arch Linux, Debian, Gentoo Guru, NetBSD pkgsrc-wip, NixOS, Homebrew, openSUSE, MacPorts, Ubuntu, GNU Guix, and Windows winget. That packaging spread matches direnv's role as cross-language glue for local development environments.
The common workflow is to install direnv, hook it into the user's shell, create a project .envrc, and explicitly allow that file before it is evaluated. The README highlights 12-factor environment variables, isolated development environments, deployment secrets, and integrations with tools such as Nix and language version managers.
Package nerds care about direnv because it solves a small boundary problem cleanly: it lets shells, package managers, language managers, and project repositories cooperate without turning into a full environment manager.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
$XDG_CONFIG_HOME/direnv/direnv.toml~/.config/direnv/direnv.toml~/.config/direnv/direnvrc.envrc可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
direnv | 可执行文件 | 已索引可执行文件 | 从本地可执行文件索引发现。 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:direnv |
|---|---|
| 版本 | 2.37.1 |
| 软件包管理器 | Homebrew |
| 主页 | https://direnv.net/ |
| 仓库 | https://github.com/direnv/direnv |
| 最后更新 | 2026-07-21T09:31:34-04:00 |
| Pulse | updated |
| Bottle | 未记录 |
| 服务 | 未声明 |
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
direnv 2.32.1-2+b16
Utility to set directory specific environment variables
sudo apt install direnvdirenv
nix profile install nixpkgs#direnvdirenv 2.32.1-2build1
Utility to set directory specific environment variables
sudo apt install direnvdirenv 2.37.1-r8
Environment variable switcher for the shell
sudo apk add direnvdirenv-doc 2.37.1-r8
Environment variable switcher for the shell (documentation)
sudo apk add direnv-docdirenv-fish 2.37.1-r8
configuration hooks for fish
sudo apk add direnv-fishdirenv 2.37.1-7.fc45
Per-directory shell configuration tool
https://github.com/direnv/direnv
sudo dnf install direnvdirenv 2.37.1-1
A shell extension that manages your environment
sudo pacman -S direnvdirenv 2.37.1-1.7
Environment switcher for shells
sudo zypper install direnvdirenv-bash-completion 2.37.1-1.7
Bash Completion for direnv
sudo zypper install direnv-bash-completiondirenv-fish-completion 2.37.1-1.7
Fish Completion for direnv
sudo zypper install direnv-fish-completiondirenv-zsh-completion 2.37.1-1.7
Zsh Completion for direnv
sudo zypper install direnv-zsh-completiondirenv
sudo port install direnvmain/direnv
scoop install main/direnvdirenv.direnv
winget install --id direnv.direnv -e来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.