Problem: automagik-forge: command not found after global install
Solution 1: Check NPM Global Path
# Find NPM global bin directorynpm config get prefix# Add to PATH (Linux/macOS)echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrcsource ~/.bashrc# For zsh usersecho 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrcsource ~/.zshrc# Verifywhich automagik-forge
Solution 2: Use NPX
# Run directly without installingnpx automagik-forge# Create alias for convenienceecho 'alias forge="npx automagik-forge"' >> ~/.bashrc
Problem: EACCES: permission denied during installation
macOS/Linux (Recommended)
Quick Fix (Not Recommended)
Fix NPM permissions (don’t use sudo):
# Create directory for global packagesmkdir ~/.npm-global# Configure npm to use new directorynpm config set prefix '~/.npm-global'# Add to PATHecho 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrcsource ~/.bashrc# Now install without sudonpm install -g @automagik/forge
# Use sudo (not ideal, but works)sudo npm install -g @automagik/forge# You may need sudo to run itsudo automagik-forge
Problem: Frontend loads but API requests failSymptoms:
Empty task board
“Failed to fetch” errors
Network errors in console
Solutions:
Check Backend Port
# Verify backend is runningcurl http://localhost:5000/api/projects# If it fails, check the port# Look for "Backend server listening on: http://127.0.0.1:XXXX" in logs# Update frontend proxy if needed# Frontend auto-detects backend port from environment
Check Firewall
# macOSsudo /usr/libexec/ApplicationFirewall/socketfilterfw --list# Linux (ufw)sudo ufw status# Windows# Check Windows Defender Firewall settings
Restart Forge
# Stop Forge (Ctrl+C)# Clear any stale processespkill -f automagik-forge# Restartautomagik-forge
Problem: Tasks fail with “Invalid API key” or “Unauthorized”Solution:
# Verify API key is setecho $ANTHROPIC_API_KEY # For Claudeecho $GOOGLE_AI_API_KEY # For Geminiecho $OPENAI_API_KEY # For OpenAI# Test API key directlycurl -H "x-api-key: $ANTHROPIC_API_KEY" \ https://api.anthropic.com/v1/messages# Set if missingexport ANTHROPIC_API_KEY=sk-ant-...# Or add to .envecho "ANTHROPIC_API_KEY=sk-ant-..." >> .env# Restart Forgeautomagik-forge
# Force delete via APIcurl -X DELETE http://localhost:5000/api/tasks/{task-id}# Or delete via databasesqlite3 .forge/db.sqlite "DELETE FROM tasks WHERE id='task-id';"# Restart Forge