Skip to content
dobbyncicodePublic

About

eap - A minimal env var and path manager

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

29 Commits

Folders and files

Repository files navigation

eap Reference

Minimalist environment and path manager.

Quick Install

curl -sSL https://dobbyncicode.github.io/eap/install.sh | sh

Requirements

  • Python 3.11+ (uses built-in tomllib)
  • For Python 3.10 and earlier: pip install tomli

Security Note: Environment variables set via eap may be visible in process listings (ps, top). Avoid storing sensitive secrets (passwords, API keys, tokens) in config.toml. Use a secrets manager instead.

Activation

Add the exact line corresponding to your shell to your configuration file.

Bash

Add to ~/.bashrc:

eval "$(~/.local/bin/eap activate bash)"

Zsh

Add to ~/.zshrc:

eval "$(~/.local/bin/eap activate zsh)"

Fish

Add to ~/.config/fish/config.fish:

eval (~/.local/bin/eap activate fish | string collect)

NuShell

Add to env.nu or config.nu:

eval (~/.local/bin/eap activate nu)

Configuration

1. User Config (~/.config/eap/config.toml)

Define your variables and paths here.

Structure:

  • [env]: Key-value pairs for environment variables.
  • [path]: A list of folders to add to your system PATH.

Example:

[env]
EDITOR = "nvim"

[path]
add = ["~/.local/bin", "~/scripts"]

2. Project Config (.eap.toml)

Place this file in any project directory to override global settings for that folder and its subfolders. Use the same structure as config.toml.


Extending Shells (~/.config/eap/shells.toml)

If you use a shell not listed by default, add it to shells.toml. eap uses simple templates to generate the export commands.

Available Variables:

  • {k}: The variable key (e.g., EDITOR)
  • {v}: The variable value (e.g., nvim)
  • {p}: The path string (e.g., /home/user/.local/bin)

Example: Adding a custom shell

[my-shell]
env = 'export {k}="{v}";'
path = 'export PATH="{p}:$PATH";'

Internal Logic

  • Sync: eap monitors the modification time (mtime) of your config files.
  • Trigger: The environment is refreshed automatically when the shell prompt is displayed.
  • Precedence: Project .eap.toml $\rightarrow$ Global config.toml.

About

eap - A minimal env var and path manager

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages