This template is designed for companies (and independent consultancies) managing multiple clients and multiple AI agents.
This repo supports strict direnv-based profile switching so each repository uses its own local CLI auth context.
Run the interactive installer from your target repository:
cd /path/to/your/project
bash /path/to/ai-agent-profile-template/install.shOr provide the target directory as an argument:
/path/to/ai-agent-profile-template/install.sh /path/to/your/projectThe installer will:
- ✅ Check and optionally install
direnvvia Homebrew - ✅ Download
gumfor a beautiful interactive UI (or fall back to simple prompts) - ✅ Present checkboxes to select which AI agents you want (GitHub Copilot, Codex, Claude, Gemini)
- ✅ Create
.agent-profile/directory structure for selected agents - ✅ Copy
.envrc.exampleto.envrc(with confirmation if it exists) - ✅ Merge AI agent entries into your
.gitignore(without duplicates) - ✅ Optionally copy the
Brewfile - ✅ Provide next steps for authenticating each agent
After installation, follow the on-screen instructions to:
- Run
direnv allowin your repository - Authenticate each AI agent you selected
If you prefer to set things up manually:
Install local tooling:
brew bundleEnable direnv in your shell (one-time setup):
# zsh
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrcOpen a new shell after adding the hook.
Configure repo-local environment:
cp .envrc.example .envrc
# Create a profile directory for any agent you want to use (gh, codex, claude, gemini, etc):
mkdir -p .agent-profile/{gh,codex,claude,gemini}
direnv allowNow run your favorite agent CLI (e.g. copilot, claude, codex, gemini) to authenticate and set up your profile.
# Github Copilot (uses GH_CONFIG_DIR from .envrc)
copilot
# Codex (uses CODEX_HOME from .envrc)
codex
# Claude (uses CLAUDE_CONFIG_DIR from .envrc)
claude
# Gemini (uses GEMINI_CLI_HOME from .envrc)
geminiTo use Copilot CLI with a repo-local profile, run the following command once:
GH_CONFIG_DIR="$PWD/.agent-profile/gh" gh auth login