# Load pi coding-agent environment variables from ~/.config/pi/.env # # Canonical source: mempalace-toolkit/extensions/pi/pi-env.zsh # Installed by mempalace-toolkit/install.sh via `cp` (not symlink) to keep # ~/.oh-my-zsh/custom/ portable across machines with different $HOME paths. # See extensions/pi/README.md#environment-setup for the full story. # # Sources ~/.config/pi/.env (AWS_PROFILE, AWS_REGION, and any future # pi-scoped secrets) so pi's Bedrock provider works when spawned from any # shell. The .env file itself is shipped (git-crypt encrypted) from the # myconfigs dotfiles repo. # # `set -a` auto-exports every assignment in the sourced file, so plain # KEY=VALUE lines become exported env vars without needing `export` in .env. # Also works in bash (set -a and source are POSIX) — non-oh-my-zsh users # can source this file directly from ~/.bashrc or ~/.zshrc instead. # # Historical note: these vars used to live in ~/.config/opencode/.env # under a "# Environment variables for pi" block. Split out 2026-05-05 # so each tool owns its own env file. _pi_env="${HOME}/.config/pi/.env" if [[ -r "${_pi_env}" ]]; then set -a source "${_pi_env}" set +a fi unset _pi_env