env-system

Load environment variables from numbered env.d files with deterministic order.

Updated Jun 9, 2017
One-click install
npx skills add https://github.com/dixonwille/.dotfiles --skill env-system
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: env-system
Source: https://github.com/dixonwille/.dotfiles/tree/main/.claude/skills/env-system
Command: npx skills add https://github.com/dixonwille/.dotfiles --skill env-system

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the consistent loading of environment variables across machines and contexts, reducing manual setup and misconfigurations.

Core Features & Use Cases

  • Deterministic load order for env.d files (e.g., 10-paths.zsh, 20-tmpdir.zsh, 30-tools.zsh) to ensure predictable variable precedence.
  • Global and work-specific contexts, enabling unified variable exports and secrets handling via 1Password CLI.
  • Private submodule support for secrets and clear documentation of best practices for safe management.

Quick Start

Create or edit an env.d file and reload your shell to apply the new variables.

Frequently Asked Questions about env-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage environment variables consistently across different machines and work contexts?

Manage environment variables consistently by using a modular env.d system with deterministic load order. Numbered files like 10-paths.zsh ensure predictable variable precedence for both global and work-specific contexts, reducing manual setup and misconfigurations.

What is the best way to auto-load shell environment variables and secrets?

Auto-load shell environment variables by creating or editing numbered env.d files and reloading your shell. This modular system applies deterministic load ordering and supports private submodules to securely retrieve secrets via 1Password CLI.

Can I use 1Password CLI to retrieve secrets for my shell environment?

Yes, 1Password CLI securely retrieves secrets for your shell environment. The env.d system integrates with it to handle secure secret retrieval, applying consistent exports across global and work-specific contexts while documenting safe management practices.

How does deterministic load order work for shell configuration files?

Deterministic load order works by enforcing numbered file naming for shell configuration files, such as 20-tmpdir.zsh and 30-tools.zsh. This numbered sequence ensures predictable variable precedence when exporting environment variables across different contexts.

Do I need private submodules to handle secrets in an env.d setup?

Private submodules are supported to handle secrets safely in an env.d setup. While not strictly required for all variables, using them for secrets ensures secure management and retrieval via 1Password CLI, following documented best practices.

Why are my environment variables misconfigured when switching between global and work contexts?

Environment variables become misconfigured when switching contexts due to scattered configuration without deterministic load order. An env.d system solves this by applying numbered files for predictable precedence, enabling unified exports across both global and work-specific contexts.