一键导入
shell-direnv
Configure environment per directory. TIL note about shell. Use when working with shell and the user mentions direnv or related topics.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Configure environment per directory. TIL note about shell. Use when working with shell and the user mentions direnv or related topics.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Back up a data directory to a remote host automatically whenever it changes, using inotify + rsync as a systemd user service. TIL note about linux. Use when working with linux and the user mentions event-driven backup, inotify rsync, watch-and-sync, or scheduled/continuous backups.
Show CPU temperature in the tmux status bar via the Dracula theme, with dynamic color based on the value, on Linux (desktops, servers, SBCs). Update-safe — uses /sys/class/thermal/ sysfs and does not patch the dracula plugin. Use when working with tmux on any Linux box and the user mentions adding a CPU temp segment to the tmux status line.
Show CPU temperature in the tmux status bar via the Dracula theme, with dynamic color based on the value (cold/normal/warm/hot), in an update-safe way. macOS (Apple Silicon) version using smctemp. Use when working with tmux, dracula/tmux, or the user mentions adding a CPU temp segment to the tmux status line on a Mac.
Install the Pi coding agent. TIL note about ai. Use when working with ai and the user mentions pi coding agent or related topics.
Use FFMPEG to cut and concatenate MP4 files. TIL note about ffmpeg. Use when working with ffmpeg and the user mentions cut cat mp4 or related topics.
Resize video file using ffmpeg. TIL note about ffmpeg. Use when working with ffmpeg and the user mentions resize video or related topics.
| name | shell-direnv |
| description | Configure environment per directory. TIL note about shell. Use when working with shell and the user mentions direnv or related topics. |
direnv is a self-contained binary tool, which allows setting-up shell environemnt per directory. It hooks into the shell prompt evaluation.
When you enter a directory it loads an .env or .envrc file, if present, and unloads it as you exit the directory. Supports also plugins for other actions per-directory, like activate/deactivate a Python pyenv.
Here's how to use direnv:
Add environment to .env or .envrc in a directory
echo "export TEST=foo" > .envrc
Allow direnv to use it
direnv allow
Try it out
cd ..
echo $TEST
cd -
echo $TEST