Complete guide to installing Forge on your system.
- Python 3.11 or higher
- Git (for version control)
- Docker (for isolated testing)
- Poetry (will be installed if not present)
- OS: macOS, Linux, or Windows (with WSL2)
- RAM: 2GB minimum, 4GB recommended
- Disk: 500MB for dependencies + embeddings model
Poetry is Forge's dependency manager.
curl -sSL https://install.python-poetry.org | python3 -export PATH="/Users/$USER/.local/bin:$PATH"
# Make permanent (zsh)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
# Make permanent (bash)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrcpoetry --version
# Output: Poetry (version 2.2.1)cd /path/to/your/projects
# If you have Forge in a directory already:
cd forge# Install all dependencies
poetry install
# This will:
# - Create a virtual environment
# - Install 63+ dependencies
# - Install Forge CLI
# - Download embedding model (~90MB)Expected output:
Updating dependencies
Resolving dependencies...
Package operations: 63 installs, 0 updates, 0 removals
...
Installing the current project: forge (1.0.0)
Note: First install will download the sentence-transformers model (~90MB). This is normal and only happens once.
# Check Forge version
poetry run forge --version
# Output: forge, version 1.0.0
# Run system health check
poetry run forge doctorExpected output:
✓ Python 3.11.13
✓ git installed
✓ docker installed
✓ KnowledgeForge patterns (28 files)
✓ Compound Engineering plugin
✨ Forge health check complete!
Forge requires KnowledgeForge patterns in a sibling directory:
# Create patterns directory
mkdir -p patterns
# Copy your .md pattern files there
cp /path/to/patterns/*.md patterns/
# Verify patterns
ls patterns/*.md | wc -l
# Should show: 28Create a configuration file:
# Project config (recommended)
poetry run forge config
# Global config (applies to all projects)
poetry run forge config --global-configThis creates forge.yaml with default settings.
To use forge directly without typing poetry run every time:
pip install -e .Now you can run Forge from anywhere:
forge --version
forge doctor
forge review panelThis is the recommended setup for daily use.
If you prefer not to install globally, use Poetry's shell:
poetry shell
# Now you can run commands directly:
forge doctor
forge search "patterns"
# Exit when done:
exitNote: poetry shell only works in the current terminal session.
If using CodeGen API:
# Add to ~/.zshrc or ~/.bashrc
export CODEGEN_API_KEY="your-api-key"
export CODEGEN_ORG_ID="your-org-id"Run the test suite:
poetry run pytest -v
# Expected: 26 passed in ~17sFor isolated testing capabilities:
brew install --cask docker
# Or download from: https://www.docker.com/products/docker-desktop# Ubuntu/Debian
sudo apt-get update
sudo apt-get install docker.io
# Enable Docker
sudo systemctl start docker
sudo systemctl enable docker
# Add user to docker group
sudo usermod -aG docker $USERdocker --version
docker run hello-worldIf curl command fails:
# Download installer manually
wget https://install.python-poetry.org -O install-poetry.py
python3 install-poetry.pyCheck Python version:
python3 --version
# Must be 3.11 or higherIf too old, install Python 3.11+:
# macOS
brew install python@3.11
# Ubuntu
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.11Clear cache and retry:
poetry cache clear pypi --all
poetry install --no-cacheIf patterns aren't found:
# Check directory structure
ls -la patterns/
# Should show .md files
# If not, create and populate:
mkdir -p patterns
# Copy your pattern files# Ensure Forge directory is writable
chmod -R 755 .
# Create .forge directory manually
mkdir -p .forge
chmod 755 .forgeEnsure you're using Poetry's environment:
# Show which Python
poetry run which python
# Should point to Poetry's virtual environment
# Example: ~/.cache/pypoetry/virtualenvs/forge-*/bin/python# Remove virtual environment
poetry env remove python
# Remove installed files
rm -rf .venv/
rm -rf dist/
rm -rf *.egg-info/curl -sSL https://install.python-poetry.org | python3 - --uninstall# Remove project data
rm -rf .forge/
# Remove global config
rm -rf ~/.forge/After successful installation:
- Read the Quick Start Guide
- Follow the Tutorial
- Review the User Guide
- Configure Forge: Configuration Guide
- Use
zsh(default shell) - Homebrew recommended for dependencies
- Docker Desktop provides easy Docker setup
- Use
bashorzsh - Package manager varies by distribution
- Docker requires additional setup
- Install WSL2 first
- Use Ubuntu 20.04+ in WSL
- Follow Linux instructions within WSL
# Update dependencies
poetry update
# Update to specific version
poetry add forge@^1.1.0
# Check for updates
poetry show --outdatedIf you encounter issues:
- Run
forge doctorto check system health - Check Troubleshooting Guide
- Review error messages carefully
- Run tests:
poetry run pytest -v - Check Python version:
python3 --version
After installation, verify:
-
poetry --versionshows Poetry 2.2.1+ -
pip install -e .completes successfully -
forge --versionshows forge 1.0.0 -
forge doctorpasses all checks -
ls patterns/*.mdshows pattern files -
poetry run pytestshows tests passing -
.forge/patterns.dbexists after runningforge doctor
Once all items are checked, you're ready to use Forge!