Get up and running with the Code Factory Platform in minutes!
- Prerequisites
- Quick Installation
- Running with Docker
- Running Locally
- First Steps
- Common Commands
- Troubleshooting
- Next Steps
- Python 3.11+ - Download (Python 3.10 and below are not supported)
- Git - Download
- Docker & Docker Compose (for containerized setup) - Download
Important: Python 3.11 or higher is required. Earlier versions are not supported due to dependency requirements.
- Make - For simplified commands (included on Linux/macOS, Windows instructions)
- Redis - For message bus (or use Docker)
- PostgreSQL - For production database (or use Docker)
Get API keys from one or more of these providers:
- xAI Grok - Get API Key
- OpenAI - Get API Key
- Google Gemini - Get API Key
- Anthropic Claude - Get API Key
- Local LLM - Run Ollama locally (no API key needed)
# Clone the repository
git clone https://github.com/musicmonk42/The_Code_Factory_Working_V2.git
cd The_Code_Factory_Working_V2
# Run the setup command
make setup
# Edit .env file with your API keys
nano .env # or use your favorite editor
# Start services
make docker-up# Clone the repository
git clone https://github.com/musicmonk42/The_Code_Factory_Working_V2.git
cd The_Code_Factory_Working_V2
# Copy environment template
cp .env.example .env
# Edit .env file with your API keys
nano .env
# Install dependencies for the unified platform
pip install --upgrade pip
pip install -r requirements.txt
# Start with Docker
docker-compose up -dDocker is the easiest way to get started:
# Start all services
make docker-up
# or
docker-compose up -d
# Check service status
docker-compose ps
# View logs
make docker-logs
# or
docker-compose logs -f
# Stop all services
make docker-down
# or
docker-compose downOnce started, you can access:
- Generator API: http://localhost:8000
- Generator Docs: http://localhost:8000/docs
- OmniCore API: http://localhost:8001
- OmniCore Docs: http://localhost:8001/docs
- Prometheus: http://localhost:9090
- Grafana: http://localhost:3000 (admin/admin)
For development without Docker:
# Using Docker
docker run -d -p 6379:6379 redis:7-alpine
# Or install Redis locally
# macOS: brew install redis && brew services start redis
# Ubuntu: sudo apt-get install redis-server && sudo service redis-server start# Terminal 1
make run-generator
# or from the generator directory:
cd generator
python -m main.main --interface api
# For Git Bash on Windows, use:
cd generator
python -m main.main --interface apiTo run both main.py and the API simultaneously in Git Bash:
# Terminal 1 - Start the API server
cd generator
python -m main.main --interface api
# Terminal 2 - Start with all interfaces (CLI, GUI, API)
cd generator
python -m main.main --interface all
# Or run specific interfaces:
python -m main.main --interface cli # CLI only
python -m main.main --interface gui # GUI only# Terminal 2
make run-omnicore
# or
cd omnicore_engine
python -m uvicorn fastapi_app:app --host 0.0.0.0 --port 8001 --reload# Check health
make health-check
# or
python health_check.py
# Run tests
make testUsing the Generator API:
curl -X POST http://localhost:8000/generate \
-H "Content-Type: application/json" \
-d '{
"requirements": "Create a Flask REST API with /hello endpoint",
"output_format": "docker"
}'Using the OmniCore CLI:
cd omnicore_engine
python -m omnicore_engine.cli --code-factory-workflow --input-file ../input_readme.mdcd generator
python demo_investor.pyThis will generate a sample Dockerfile based on a demo description.
make help # Show all available commands
make install-dev # Install with dev dependencies
make test # Run all tests
make lint # Run code linters
make format # Format code
make clean # Clean up generated filesmake docker-build # Build unified platform Docker image
make docker-up # Start services
make docker-down # Stop services
make docker-logs # View logs
make docker-clean # Clean up Docker resources
make docker-validate # Validate Docker build and configurationmake test # Run all tests
make test-generator # Test Generator only
make test-omnicore # Test OmniCore only
make test-sfe # Test Self-Fixing Engineer only
make test-coverage # Run with coverage reportmake lint # Run linters (strict - will fail on errors)
make format # Format code with Black
make type-check # Run type checking (strict)
make security-scan # Run security scans (strict)
make ci-local # Run all CI checks locally (strict)Note: All code quality checks now enforce strict checking. Errors will cause command failures instead of being suppressed, ensuring code quality standards are met.
# Find process using port 8000
lsof -i :8000 # Linux/macOS
netstat -ano | findstr :8000 # Windows
# Kill the process or change the port in docker-compose.yml# Reinstall dependencies
make clean
make install-devCommon Import Error Fixes:
-
"No module named 'runner.alerting'": This module re-exports
send_alertfromrunner_logging. Make sure you're running from thegeneratordirectory. -
"attempted relative import with no known parent package": Use module syntax instead of direct execution:
# Wrong: python main/main.py # Correct: cd generator python -m main.main --interface api
-
Missing dependencies: Install all required packages:
pip install -r requirements.txt # Or install specific packages: pip install python-dotenv pydantic prometheus_client aiohttp aiofiles opentelemetry-api opentelemetry-sdk
# Check if Redis is running
docker ps | grep redis
# Start Redis if not running
docker run -d -p 6379:6379 redis:7-alpine# Verify .env file
cat .env | grep API_KEY
# Make sure .env is in the root directory
# Restart services after updating .env
make docker-down
make docker-up# Clean Docker cache
make docker-clean
# Rebuild from scratch
docker-compose build --no-cache- Documentation: See README.md and docs/
- Health Check: Run
python health_check.py - Logs: Check service logs with
make docker-logs - Issues: Report issues on GitHub
-
Read the Documentation
- README.md - Complete overview
- DEPLOYMENT.md - Deployment guide
- Generator README - Generator details
- OmniCore README - OmniCore details
-
Explore Components
- Generator: AI-powered code generation
- OmniCore Engine: Orchestration and coordination
- Self-Fixing Engineer: Automated maintenance and healing
-
Customize Configuration
- Edit
.envfor environment variables - Update
generator/config.yamlfor Generator settings - Update
omnicore_engine/config.yamlfor OmniCore settings - Update
self_fixing_engineer/crew_config.yamlfor SFE settings
- Edit
-
Set Up Monitoring
- Configure Prometheus metrics
- Set up Grafana dashboards
- Enable OpenTelemetry tracing
-
Deploy to Production
- See DEPLOYMENT.md
- Set up CI/CD pipelines
- Configure cloud services
- Create a feature branch:
git checkout -b feature/my-feature - Make changes and test:
make test - Run quality checks:
make ci-local(runs strict linting, type checking, security scans, and tests) - Commit and push:
git commit -am "Add feature" && git push - Create a pull request
Tip: Always run
make ci-localbefore pushing to catch issues early. All checks run with strict error checking.
See Contribution Guidelines in the main README.
Ready to build production-ready applications with AI? 🚀
For detailed documentation, visit the OmniCore Engine docs or check out the Generator README.