id = "direnv" name = "direnv" homepage = "https://direnv.net" description = "An environment switcher for the shell, loading and unloading variables as you change directory." # direnv's own mark, from the direnv organisation's avatar. icon = "https://github.com/direnv.png" executables = ["direnv"] platforms = ["macos", "linux"] [dotfiles] # direnv.toml(1): $XDG_CONFIG_HOME/direnv/direnv.toml — the config home, so # [configHome] — plus the direnvrc shell library loaded before every .envrc. paths = [ "[configHome]/direnv/direnv.toml", "[configHome]/direnv/direnvrc", "[configHome]/direnv/lib/", "~/.direnvrc", ] # The allow store is a set of hashes of absolute .envrc paths on this machine. # xdg/xdg.go, DataDir(): $XDG_DATA_HOME, else $HOME/.local/share, with no per-OS # branch — the XDG data home on macOS too, so [xdgData] and not [dataHome]. # Releases before 2.21.0 ("change where the allow files are being stored") kept # the store under the config directory instead, hence the second spelling. exclude = [ "[xdgData]/direnv/allow/", "[configHome]/direnv/allow/", ] secret = [] side_effect = false # whitelist entries are absolute paths to directories on this machine, listed # there by the user. Which trees they decided to trust is worth having back # after a rebuild, so the list is kept: backup. [[dotfiles.machine_lines]] file = "[configHome]/direnv/direnv.toml" match = { key_path = ["whitelist.prefix", "whitelist.exact"] } scope = "backup" [commands] format = 1 label = "direnv" description = "Authorize or revoke .envrc files and run a command inside a directory environment. Other subcommands are left out." quality = "ai-draft" base = "fig:direnv" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/direnv.ts" license = "MIT" [[commands.subcommand]] path = ["allow"] label = "Allow .envrc" description = "Grants direnv permission to load the given .envrc (default: the current directory)." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/direnv.ts" license = "MIT" [[commands.subcommand.field]] id = "path" label = ".envrc or directory" type = "path" position = 0 path = { kind = "any", role = "input" } sources = ["fig"] [[commands.subcommand.task]] id = "allow" label = "Allow" fields = ["path"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["path"] [[commands.subcommand]] path = ["deny"] label = "Deny .envrc" description = "Revokes authorization of the given .envrc." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/direnv.ts" license = "MIT" [[commands.subcommand.field]] id = "path" label = ".envrc or directory" type = "path" position = 0 path = { kind = "any", role = "input" } sources = ["fig"] [[commands.subcommand.task]] id = "deny" label = "Deny" fields = ["path"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["path"] [[commands.subcommand]] path = ["exec"] label = "Run in environment" description = "Runs a command after loading the first .envrc found in DIR." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/direnv.ts" license = "MIT" [[commands.subcommand.field]] id = "dir" label = "Directory" type = "path" position = 0 path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "command" label = "Command and arguments" type = "string" position = 1 multiple = true sources = ["fig"] [[commands.subcommand.task]] id = "exec" label = "Exec in directory" fields = ["dir", "command"] required = ["dir", "command"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["dir", "command"]