Advertisement · 728 × 90
#
Hashtag
#direnv
Advertisement · 728 × 90
Preview
Migrating from asdf and direnv to mise For managing versions of development tools like Ruby and Node.js, I had gone through *env tools like rbenv and nodenv , then switched to asdf in 2019. For environment variable management, I had been using direnv since even earlier—2014. Recently, a tool called mise has been gaining attention. I wasn’t particularly having issues, but out of curiosity and the motivation to reduce the number of tools—since I heard mise also has direnv-like functionality—I decided to make the switch. My environment is macOS.

New blog post > Migrating from asdf and direnv to mise | Masutaka's ChangeLog Memo https://masutaka.net/en/2026-03-29-1/ #mise #asdf #direnv #emacs

0 0 0 0
Preview
GitHub - michix/seekret-service: Secure daemon for desktop use to access secrets in KeePass files Secure daemon for desktop use to access secrets in KeePass files - michix/seekret-service

Released version 1.3.0 of #SeekretService, a simple service written in #Rust for securely accessing #KeePass databases, e. g. from the #cli like #envrc or #direnv.

👉 Get it on GitHub: https://github.com/michix/seekret-service

0 0 0 0
Original post on hachyderm.io

The more I learn about #Direnv, the happier I become. It **already** works with #Pixi. It **already** helps you with secrets (ignore `.envrc` in your `.gitignore` or equivalent). I grabbed a `layout_uv` from the direnv wiki (made some small modifications), and it works basically everywhere I […]

0 0 0 0
Original post on hachyderm.io

Here’s your regular #CommandLine #PSA: #Starship helps you every time you hit return, in every shell. #Atuin makes history 10x more useful. #Direnv is becoming my friend but I need to understand better how to use it, and it needs additions to work in more situations.(e.g., #uv layout, #pixi […]

0 0 0 0

I’ve made progress with #Direnv in #GitBashForWindows. It’s automatically setting environment variables and activating virtual environments in #uv projects. Not yet working with #Pixi. Not yet getting my `$PYTHONPATH` right in these uv projects.

0 0 0 0
Original post on hachyderm.io

#Direnv is such a disappointment to me. I want it to work in #GitBashForWindows. I want it to automatically activate my chosen #Pixi virtual environment (and set up PYTHONPATH). I’ve put over two hours into it and it still isn’t functioning. I assume this all works fine everywhere that is […]

0 0 0 0

Use Trusted Publishing instead of long-lived PyPI tokens. For other things, here's how to use 1Password with direnv to set secrets in env vars.
hugovk.dev/blog/2025/se...
#security #1Password #direnv #cli #PyPI

9 2 1 0
Original post on mastodon.social

Ok, #direnv to the rescue. Add this to your .envrc to fix the #conda environment on your terminal and on #vscode.

```
conda activate whatever-environment

mkdir -p .vscode
cat > .vscode/settings.json << EOF
{
"python.defaultInterpreterPath": "$(which python)",
"python.terminal […]

0 0 0 0
Stop putting nix setup in your checked-in .envrc files Nix-using developers who use direnv, please stop checking in your .envrc files; they break your project for other contributors.

If you use #direnv, please don't check in your .envrc files. offby1.website/posts/stop-p...

0 0 0 0
Original post on mastodon.social

Released version 1.2.2 of #SeekretService, a simple service written in #Rust for securely accessing #KeePass databases, e. g. from the #cli like #envrc or #direnv.

👉 Get it on GitHub: https://github.com/michix/seekret-service

*Changes:*

- Switches from `simple_crypt` to `RustCrypto` (kudos to […]

0 3 0 0

Grand merci à l'équipe de @devlille.fr pour 2 super journées de conférence ❤️ On sent l'équipe qui a su garder un événement authentique et qui est super bien organisé.

J'ai parlé de #direnv, mais vu que je préchais #Bazel dans le désert, je pense qu'un talk à ce sujet l'année prochaine s'impose 😛

1 0 0 0
Original post on mastodon.social

Released version 1.2.1 of #SeekretService, a simple service written in #Rust for securely accessing #KeePass databases, e. g. from the #cli like #envrc or #direnv.

👉 Get it on GitHub: https://github.com/michix/seekret-service

*Changes:*

- Fixed in-memory encryption (my fault, this got lost […]

0 2 0 0
direnv – unclutter your .profile unclutter your .profile

@devlille.fr démarre demain ! Mon exposé sur direnv.net a lieu vendredi à 15h45 en salle Louis Pasteur.

Je vais expliquer comment #direnv offre une opportunité aux leaders d'introduire reproducibilité et bonnes pratiques, avec zéro friction ! 💪 #devex

drive.google.com/file/d/1xGFz...

1 1 0 0
Preview
Setting up a Nix Development Environment with Flakes and direnv When I setup my most recent primary development machine I chose NixOS. I figured, why not. If it doesn't work out I'll only be out maybe a day and I'll have learned I don't want to do that. However, it ended up working out. With my new found familiarity after a few months using it I decided to take the plunge and spread my Nix chops elsewhere. This meant my MacOS machine. One place I believe Nix can be incredibly powerful is setting up a reproducible Nix development environment. Replacing traditional tools like `nvm`, `pyenv`, and others with a single, powerful solution. I'll show you how to build a practical setup that automatically activates when you enter your project directory. With this pattern a new developer can onboard installing TWO, yes only TWO, tools and Nix takes care of the rest. ## What We'll Build By the end of this guide, you'll have a development environment that: 1. **Automatically activates** when you `cd` into your project. 2. **Includes all dependencies** - Python, Node.js, databases, tools. 3. **Is fully reproducible** - works identically on any machine. 4. **Requires zero manual setup** - just clone and start coding. All defined in a single `flake.nix` file that lives with your code! ## Why Nix? Understanding the Paradigm Shift Before diving into the setup, let's understand why Nix represents a fundamental improvement over traditional development environment management tools. ## The Problems with Traditional Tools Most developers are familiar with version managers like `nvm` (Node Version Manager), `pyenv` (Python), `rbenv` or `rvm` (Ruby), or `rustup` (Rust). While these tools work, they suffer from several fundamental limitations: 1. **Language Silos:** Each language requires its own version manager, leading to a proliferation of tools (nvm, pyenv, rbenv, jenv, etc.). 2. **Global State Pollution:** These tools modify global shell state, often conflicting with each other. 3. **Incomplete Isolation:** They only manage language runtimes, not system dependencies, libraries, or tools. 4. **Reproducibility Issues:** "Works on my machine" remains a problem because system-level dependencies aren't captured. 5. **Manual Synchronization:** Team members must manually ensure they're using the same versions. ## The Nix Advantage A Nix development environment solves these problems through a fundamentally different approach: 1. **Declarative Configuration:** Describe what you want, not how to get it. 2. **Complete Isolation:** Each project gets its own isolated environment with all dependencies. 3. **Reproducibility:** The same configuration produces identical environments across machines. 4. **Unified Tool:** Manage any language, tool, or system dependency with one system. 5. **Atomic Operations:** Changes either succeed completely or fail without side effects. 6. **Rollback Capability:** Easily revert to previous configurations. # Installing Nix with the Determinate Systems Installer The Determinate Systems installer is the recommended way to install Nix. It provides a more reliable and user-friendly installation experience compared to the official installer. ## Installation Steps 1. **Download and run the installer:** curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \ sh -s -- install 1. **Restart your shell** or source the Nix profile: . /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh 1. **Verify the installation:** nix --version The Determinate Systems installer automatically: * Enables flakes (experimental feature). * Sets up the nix-command experimental feature. * Configures better defaults for a smoother experience. * Provides uninstall capability. **Note:** All instructions in this guide have been verified to work with Nix 25.05, the latest release. # Understanding Nix Flakes Flakes are the modern way to manage Nix projects. They provide: * **Lock files** for reproducible dependencies. * **Standard structure** for Nix projects. * **Composability** between projects. * **Better evaluation caching**. ## Basic Flake Structure A flake consists of: `flake.nix`: The main configuration file. `flake.lock`: Automatically generated lock file (like `package-lock.json`). # Setting Up direnv for Automatic Environment Loading `direnv` automatically loads and unloads environment variables and development shells when you enter or leave a directory. ## Installing direnv Install `direnv` using your system package manager: # macOS (with Homebrew) brew install direnv # Ubuntu/Debian sudo apt install direnv # NixOS (add to configuration.nix) environment.systemPackages = with pkgs; [ direnv ]; # Or using Nix on any system nix-env -iA nixpkgs.direnv ## Shell Integration Add the following to your shell configuration: **Bash** (`~/.bashrc`): eval "$(direnv hook bash)" **Zsh** (`~/.zshrc`): eval "$(direnv hook zsh)" **Fish** (`~/.config/fish/config.fish`): direnv hook fish | source ## Enhanced Nix Integration For better Nix flake support, add to `~/.config/direnv/direnvrc`: # Better support for Nix flakes use_flake() { watch_file flake.nix watch_file flake.lock eval "$(nix print-dev-env)" } That's it! `direnv` is now ready to use with Nix flakes. # Creating Your First Flake-Based Nix Development Environment Let's create a comprehensive example that demonstrates common use cases. ## Project Structure my-project/ ├── flake.nix ├── flake.lock ├── .envrc ├── .gitignore └── src/ ## The Complete Nix Development Environment Flake Example Create `flake.nix`: # flake.nix - Nix Flake configuration file # This file defines a reproducible development environment using Nix flakes # Documentation: https://nixos.wiki/wiki/Flakes { description = "Development environment with Python and Node.js"; # Inputs are external dependencies for our flake inputs = { # nixpkgs is the main package repository for Nix # Using "nixos-unstable" gives us the latest packages # See available packages at: https://search.nixos.org/packages nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # flake-utils helps us write flakes that work on multiple systems (Linux, macOS) # Documentation: https://github.com/numtide/flake-utils flake-utils.url = "github:numtide/flake-utils"; }; # Outputs define what our flake produces outputs = { self, nixpkgs, flake-utils }: # This function creates outputs for each system (x86_64-linux, aarch64-darwin, etc.) flake-utils.lib.eachDefaultSystem (system: let # Import nixpkgs for our specific system pkgs = nixpkgs.legacyPackages.${system}; # Define Python packages we want # The 'ps' parameter is the Python package set pythonPackages = ps: with ps; [ requests # HTTP library pytest # Testing framework black # Code formatter ]; # Create a Python environment with our packages pythonEnv = pkgs.python311.withPackages pythonPackages; in { # devShells.default is the development environment # It's activated with 'nix develop' or automatically via direnv # Documentation: https://nixos.wiki/wiki/Development_environment_with_nix-shell devShells.default = pkgs.mkShell { # Packages to include in the shell environment buildInputs = with pkgs; [ # Python with our selected packages pythonEnv # Node.js (version 24) nodejs_24 # Basic development tools git # Version control ripgrep # Fast file search jq # JSON processor ]; # Shell hook runs when entering the shell # Use this for environment setup, variables, and welcome messages shellHook = '' echo "🚀 Development environment loaded!" echo "📦 Python $(python --version)" echo "📦 Node.js $(node --version)" echo "" echo "Run 'python' or 'node' to start coding!" ''; # Environment variables # These are set when the shell is active PROJECT_NAME = "my-awesome-project"; NODE_ENV = "development"; }; }); } ## Setting Up direnv Create `.envrc`: # This file tells direnv to load our Nix flake environment # Documentation: https://direnv.net/ # 'use flake' is a direnv command that activates the Nix flake in this directory # It's equivalent to running 'nix develop' but automatic use flake # Optional: Add project-specific environment variables # These are only set when you're in this directory export API_KEY="development-key" # Optional: Load secrets from a .env file (don't commit this file!) # Create a .env file with KEY=value pairs for sensitive data if [ -f .env ]; then dotenv .env fi ## Git Configuration Create `.gitignore`: # Nix build outputs result result-* # direnv cache .direnv/ # Environment secrets (never commit these!) .env .env.local # Python __pycache__/ *.pyc .pytest_cache/ # Node.js node_modules/ npm-debug.log* # Using Your Nix Development Environment 1. **Create a new project directory** : mkdir my-project && cd my-project 1. **Create the files** shown above: * `flake.nix` - Your environment definition * `.envrc` - direnv configuration * `.gitignore` - Git ignore rules 2. **Allow direnv to load** (you'll be prompted automatically): direnv allow That's it! The environment will automatically: * ✅ Activate when you enter the directory * ✅ Install all specified packages * ✅ Set environment variables * ✅ Deactivate when you leave the directory Try it out: python --version # Python 3.11.x node --version # v20.x.x # Common Patterns and Next Steps ## Adding More Languages To add more programming languages to your environment, simply include them in buildInputs: buildInputs = with pkgs; [ pythonEnv nodejs_24 rustc # Rust compiler go # Go language ruby_3_2 # Ruby openjdk17 # Java ]; ## Adding Databases Need a database for local development? buildInputs = with pkgs; [ # ... other packages ... postgresql_15 # PostgreSQL database redis # Redis key-value store sqlite # SQLite database ]; shellHook = '' # ... existing shell hook ... # Initialize PostgreSQL if needed if [ ! -d ".postgres" ]; then initdb -D .postgres echo "PostgreSQL initialized. Start with: pg_ctl -D .postgres start" fi ''; ## Finding Packages To find available packages: 1. Search online: https://search.nixos.org/packages 2. Use command line: nix search nixpkgs package-name ## Learning More * Nix Pills (beginner tutorial series): https://nixos.org/guides/nix-pills/ * Official Nix Manual: https://nixos.org/manual/nix/stable/ * Flakes Documentation: https://wiki.nixos.org/wiki/Flakes * Nixpkgs Manual: https://nixos.org/manual/nixpkgs/stable/ * Community Forum: https://discourse.nixos.org/ # Troubleshooting ## "direnv: error .envrc is blocked" This is a security feature. Run: direnv allow ## Flake Changes Not Taking Effect After modifying flake.nix, reload the environment: direnv reload # or exit and re-enter the directory ## Package Not Found When a package isn't found, try: 1. Search for the exact name: https://search.nixos.org/packages 2. Update your flake: nix flake update 3. Some packages have different names in Nix (e.g., `nodejs_24` instead of `nodejs`). # Key Takeaways 1. **One Tool to Rule Them All:** Instead of `nvm`, `pyenv`, etc., use Nix for everything. 2. **Reproducible:** Your teammates get the exact same environment. 3. **Automatic:** With direnv, environments activate automatically. 4. **Declarative:** Describe what you want, not how to install it. 5. **Versioned:** Your environment configuration lives in Git with your code. Without a doubt the combination of Nix, Flakes, and direnv creates a development experience that's both powerful and ergonomic, solving the "works on my machine" problem once and for all. I hope this simple guide spurns you to take the plunge and start creating Nix development environments.
0 0 0 0
A screenshot showing an environment populated with direnv/.envrc

A screenshot showing an environment populated with direnv/.envrc

Did you know @runme.dev natively supports #DotEnv and #Direnv?

Makes it super simple to leverage your project's existing environment configuration.

More in the docs: docs.runme.dev/configuratio...

1 0 0 0
Post image

Hot off the @runme.dev press, native #direnv support!

While still deactivated by default, it will become enabled out-of-the-box once it holds up in real-world repos.

Looking good. It won't be long.

0 0 0 0
This is a screenshot of a terminal demonstrating the allow/deny/neutral issue.

This is a screenshot of a terminal demonstrating the allow/deny/neutral issue.

It's odd how #direnv has a neutral state when it first encounters a new .envrc'd directory.

Once you ran allow or deny, you can't go back using the CLI.

To restore neutral, a "direnv reset" would be helpful. The only other option is monkeying with direnv state files.

0 0 0 0
Original post on masto.ai

Published an article about how we manage our project's #development environment at work using #direnv and #micromamba: blog.cosinux.org/2025-project-environment...

Direnv sets up micromamba which in turn downloads our tooling. You basically just have to put `use micromamba […]

0 0 0 0
Direnv Crash Course and Quick Start
Direnv Crash Course and Quick Start YouTube video by edoceo

I made a quick crash course for using #direnv on #linux , demo in #docker container -- youtu.be/4Too6G4Gyg0

1 0 0 0
uv, direnv, and simple .envrc files Easily using uv, direnv, and minimal, consistent .envrc files

I've done some thinking about how to make #uv and #direnv play together with minimal hassle and maximum repeatability.

Inspired by @hynek.me's posting about uv's speed and usability, here's that post: offby1.website/posts/uv-dir...

0 0 0 0
Original post on wandering.shop

I've done some thinking about how to make #uv and #direnv play together with minimal hassle and maximum repeatability. Inspired by @hynek's posting about uv's speed and usability, here's that post: offby1.website/posts/uv-direnv-and-simp...

Let me know if it helps you […]

0 1 2 0
Preview
isolated development with direnv & devbox (& gum) In this blog we will talk about 3 tools to make a deal with multiple environments easier.

#bluebirzblog
Setup an isolated environment and collaborate with team using #direnv #devbox and #gum. This also works for multiple environments development.
[EN] www.bluebirz.net/en/isolate-d...
[TH] www.bluebirz.net/th/isolate-d...
[Medium] medium.com/@bluebirz/is...

1 1 0 0
Post image

Notre parcours DevOps : les outils, problèmes et solutions. Parfois, nous sous-estimons la doc, mais les répétitions nous rappellent son importance. J'ai donc décidé de créer devops.jesuislibre.org

Pour cette premiere, on parle de #nix #direnv #just #geekdoc, #VHS #ghq #DevOps

2 0 0 0

ニッチなネタだけどメモしておいた。 #nushell #direnv
---
続・ラフなラボ – WSL2やgit-bashではなくWindowsのnushell環境でdirenvを使う
memo.laughk.org/articles/202...

1 0 0 0
direnv – unclutter your .profile unclutter your .profile

Just discover #direnv http://direnv.net/ language agnostic environment variable manager for #vim #python or #ruby

0 0 0 0