A minimalistic environment manager for Git Worktree workflows.
Provide a lightweight way to spin up and manage per-worktree shell environments so each branch can have isolated tooling, variables, and startup behavior without heavy setup.
- Keep worktree setup simple and fast.
- Reduce context switching between branches.
- Standardize environment bootstrapping for local development.
- Stay script-first and easy to customize.
curl -sSL https://raw.githubusercontent.com/ibedwi/enman/main/install.sh | bashThen reload your shell:
source ~/.zshrc # or source ~/.bashrcThis clones enman to ~/.enman/bin/ and adds an enman alias to your shell config.
- Prepare your project env templates under:
~/.enman/projects/<project-name>/environments/<env>/...
All project data is stored in ~/.enman/ in your home directory. You can override this by setting the ENMAN_HOME environment variable. Each project holds one or more environments (e.g. development, staging, production).
- Scan your project to capture env files:
enman scan <project-name> [directory] [--env <env>] [--include <pattern>]...
# Scan for .env files into the default 'development' environment
enman scan my-app
# Scan into a specific environment
enman scan my-app --env staging
# Scan for all .env variants
enman scan my-app --include ".env*"
# Scan for multiple patterns
enman scan my-app --include ".env*" --include "config.yaml"
# Scan a specific directory into staging
enman scan my-app /path/to/monorepo --env staging --include ".env*"The --env flag selects which environment to scan into (defaults to development). The --include flag specifies file patterns to scan for (can be repeated). Defaults to .env if not specified. A .enman manifest file is written to the env directory listing the patterns used and all included files.
- Copy files into a target worktree directory:
enman setup <project-name> <target-directory> [--env <env>]
# example (uses 'development' by default)
enman setup my-cool-project /path/to/worktree
# example (specific env)
enman setup my-cool-project /path/to/worktree --env stagingThe command copies all files from ~/.enman/projects/<project-name>/environments/<env>/ to <target-directory>, preserving directory structure. Metadata files (.archived, .enman) are excluded.
enman setup <project-name> <target-directory> [--env <env>]enman scan <project-name> [directory] [--env <env>] [--include <pattern>]...enman projects <action> [arguments]enman environments <action> <project-name> [env-name]enman update