coder/skills/direnv/SKILL.md
direnv -- automatic environment variable loading from .envrc files. Use when working with direnv, .envrc, .secrets, or environment management.
npx skillsauth add overthinkos/overthink-plugins direnvInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
| Property | Value |
|----------|-------|
| Install files | charly.yml (packages only) |
RPM: direnv · PAC: direnv · DEB: direnv — full cross-distro parity.
# charly.yml
my-image:
candy:
- direnv
Typically used as part of the agent-forwarding composition candy rather than directly. Also available in the heavyweight dev-tools candy (46 packages).
Provides the direnv binary AND the per-shell hook installation for automatic environment variable loading from .envrc files.
Shell hooks are declarative. The candy carries a shell: block:
shell:
init: |
eval "$(direnv hook ${SHELL_NAME})" # bash/zsh/sh — POSIX-style
fish:
init: |
direnv hook fish | source # fish — different syntax
Container images get /etc/profile.d/charly-direnv-<shell>.sh and /etc/fish/conf.d/charly-direnv.fish emitted at charly box build time. target: local host deploys get a managed-block in ~/.bashrc / ~/.zshrc plus ~/.config/fish/conf.d/charly-direnv.fish at charly bundle add time, only for shells the runtime probe finds. The fish hook lands in ~/.config/fish/conf.d/charly-direnv.fish (its own conf.d drop-in), so it works without editing ~/.config/fish/config.fish.
The primary use case in OpenCharly is the .secrets workflow: .envrc calls eval "$(charly secrets gpg env)" which decrypts a GPG-encrypted .secrets file in memory and exports the variables — no plaintext on disk. No external direnvrc dependency needed.
Part of agent-forwarding composition candy, used in 27 application boxes.
Also available in the dev-tools candy.
/charly-distros:agent-forwarding -- metalayer that includes gnupg + direnv + ssh-client/charly-infrastructure:gnupg -- GPG tools (needed for .secrets decryption)/charly-coder:dev-tools -- heavyweight candy that also includes direnv (46 packages)/charly-build:secrets -- charly secrets gpg commands for managing .secrets files, charly secrets gpg setup for GPG agent + KeePassXC configuration, charly secrets gpg doctor for health checksUse when the user asks about:
.envrc filesdirenv candy.secrets + direnv workflow/charly-image:layer — candy authoring reference (charly.yml schema, task verbs, service declarations)/charly-check:check — declarative testing (check: block, charly check box, charly check live)tools
Use when authoring or modifying a charly PLUGIN — a candy with a `plugin:` block that contributes Providers (verbs/kinds/deploy-targets/steps/builders/commands), its own CUE schema, builtin (compiled-in) or external (out-of-tree git repo). Covers the unified Provider model, the per-plugin CUE-schema contract (single source → Go params for dev + schema-over-Describe RPC for runtime), the SDK, and the loader.
tools
The CUE data-validation / configuration CLI (cue), pinned to v0.16.1. Use when working with the cue candy, installing the cue binary into a box or onto a target:local dev host, or running the offline schema-vendoring pipeline that feeds charly's egress validation.
tools
CUE EGRESS validation — validating (and, where it adds value, generating) the config files charly WRITES to a system BEFORE the bytes hit disk. MUST be invoked before working on charly/egress.go, the vendored schemas under candy/plugin-egress/egress-schemas/vendor/, the ValidateEgress / registerVendoredEgressKind path, the offline `task cue:vendor` pipeline, or adding an egress schema for any written artifact (cloud-init, k8s manifests, traefik routes, runtime config, install ledger, systemd/quadlet units, ssh_config, libvirt XML).
tools
Kubernetes cluster-probe declarative check verb — the `kube:` check verb (nodes, pods, ingress, storage class, addon health, apply/delete, and arbitrary resource GETs) served out-of-process by the candy/plugin-kube plugin (vendored client-go; no external kubectl required).