Skip to main content

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+

Getting Started

No installation needed - use npx to run Edgit:
npx @ensemble-edge/edgit --version
That’s it. You’re ready to version components.

Initialize in Your Repo

cd your-project
npx @ensemble-edge/edgit init
This creates .edgit/components.json:
{
  "version": "1.0",
  "components": {}
}
Commit it:
git add .edgit/
git 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
git add .
npx @ensemble-edge/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 npx instead of global install:
npx @ensemble-edge/edgit --version
Or use nvm to manage Node.js:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 18
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