Production-Grade ML Environment Provisioning Platform
EnvForge is a developer tooling platform that generates intelligent, safe, and deterministic ML/AI environment setup scripts for Windows, WSL, Linux, and CUDA systems.
Stop wrestling with CUDA version mismatches, Python dependency hell, and OS-specific setup quirks. EnvForge detects your hardware and generates the exact setup script you need for your chosen ML framework.
Deterministic logic > AI generation. Because scripts affect real systems, EnvForge relies on a strictly deterministic Compatibility Engine to resolve versions. It never guesses package versions or writes destructive shell commands.
EnvForge helps users:
- Generate environment setup scripts (
setup.sh,setup.ps1,Dockerfile) - Install compatible ML frameworks (TensorFlow, PyTorch, YOLO, etc.)
- Verify existing environments
- Diagnose setup issues across OS, GPU, and Python boundaries
- Environment Profiles: Out-of-the-box configurations for
pytorch-cuda,tf-gpu,yolov8, and more. - Hardware Introspection: A standalone CLI agent (
envforge-agent) that detects OS, RAM, GPU, VRAM, and CUDA details without an internet connection. - Safety First: Every generated script passes through a regex-based
SafetyFilterthat strictly blocks dangerous commands (e.g.,rm -rf /,mkfs). - Idempotent Setup: Scripts verify prerequisites before installing anything.
- RESTful API: Fast, async backend built on FastAPI and PostgreSQL.
EnvForge is built with a modular, scalable architecture.
- CLI Diagnostic Agent: Inspects local hardware and emits a structured JSON
DiagnosticReport. - API Layer: FastAPI handles incoming requests and orchestrates logic.
- Compatibility Engine: A pure-Python module holding the "Engineering Moat" β the CUDA and Framework compatibility matrices.
- Template Engine: Renders Jinja2 templates (
.sh,.ps1,Dockerfile) based on the resolved environment. - Safety Filter: Scans rendered output to block destructive actions.
For more details, see ARCHITECTURE.md.
Inspect your environment without needing the backend!
pip install envforge-agent
envforge diagnosegit clone https://github.com/rishabh0510rishabh/EnvForage.git
cd EnvForage
docker-compose up -dThe API is now running at http://localhost:8000.
Generate a PyTorch CUDA setup script for Linux:
curl -X POST http://localhost:8000/api/v1/scripts/generate \
-H "Content-Type: application/json" \
-d '{"profile_id": "pytorch-cuda", "target_os": "LINUX", "output_formats": ["setup.sh"]}'| Document | Purpose |
|---|---|
| ARCHITECTURE.md | High-level system overview and component boundaries |
| COMPATIBILITY_ENGINE.md | Core logic: CUDA mappings and framework rules |
| WORKFLOW.md | Script generation, diagnosis, and repair flows |
| AI_USAGE_POLICY.md | Where AI is allowed vs where deterministic logic is required |
| SCRIPT_SAFETY.md | Prohibited commands and rollback philosophy |
| CLI_REFERENCE.md | Commands for envforge diagnose, verify, and fix |
| API_DESIGN.md | REST endpoints, schemas, and validation rules |
| PROFILE_SPEC.md | How to build and define new ML profiles |
We love open source! Please read our Contributing Guide to learn about:
- Local development setup
- Our branching and commit message strategy
- How to add new templates or profiles
- Writing tests for the Compatibility Engine
- Phase 1: Core Backend (Compatibility Engine, Template Engine) β
- Phase 2: CLI Diagnostic Agent (
envforge-agent) β - Phase 3: Next.js Frontend Web App β³
- Phase 4: AI Troubleshooting Layer
- Phase 5: Environment Verification
See the full ROADMAP.md for details.
This project is licensed under the MIT License - see the LICENSE file for details.