Skip to main content

Installation

Get Edgit running in 2 minutes. No complex setup, no configuration files.

Prerequisites

You need:
  • Node.js 18+ (nodejs.org)
  • Git 2.30+ (probably already installed)
Check:
node --version  # Should be 18+
git --version   # Should be 2.30+

Install

npm install -g @ensemble-edge/edgit
edgit --version
That’s it. You’re ready to version components.

Initialize in Your Repo

cd your-project
edgit init
This creates .edgit/components.json:
{
  "version": "1.0",
  "components": {}
}
Commit it:
edgit add .edgit/
edgit commit -m "chore: initialize edgit"

Optional: AI-Powered Commits

Want AI to generate your commit messages? Add an OpenAI API key:
# Add to ~/.zshrc or ~/.bashrc
export OPENAI_API_KEY=sk-...
Test it:
# Make a change
echo "export const test = () => 'hello'" > src/test.ts
edgit add .
edgit commit  # AI generates: "feat(test): add test function"

Troubleshooting

Your PATH doesn’t include npm global bin directory.Fix:
# Find npm global bin path
npm config get prefix

# Add to PATH (add to ~/.zshrc or ~/.bashrc)
export PATH="$(npm config get prefix)/bin:$PATH"

# Reload shell
source ~/.zshrc
Don’t have permission to install globally.Fix (recommended): Use nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 18
npm install -g @ensemble-edge/edgit
Fix (alternative): Install locally per project
npm install --save-dev @ensemble-edge/edgit
npx edgit --version
API key isn’t set or is invalid.Check:
echo $OPENAI_API_KEY  # Should start with sk-
Test the key:
curl https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY"
If that fails, your key is invalid. Get a new one at platform.openai.com.

Next Steps