Skip to content

rishabh0510rishabh/EnvForage

EnvForge πŸ› οΈ

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.


πŸ“‘ Table of Contents


🎯 Project Overview

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

✨ Features

  • 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 SafetyFilter that 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.

πŸ—οΈ Architecture

EnvForge is built with a modular, scalable architecture.

  1. CLI Diagnostic Agent: Inspects local hardware and emits a structured JSON DiagnosticReport.
  2. API Layer: FastAPI handles incoming requests and orchestrates logic.
  3. Compatibility Engine: A pure-Python module holding the "Engineering Moat" β€” the CUDA and Framework compatibility matrices.
  4. Template Engine: Renders Jinja2 templates (.sh, .ps1, Dockerfile) based on the resolved environment.
  5. Safety Filter: Scans rendered output to block destructive actions.

For more details, see ARCHITECTURE.md.


πŸš€ Quick Start

1. Install the CLI Agent

Inspect your environment without needing the backend!

pip install envforge-agent
envforge diagnose

2. Run the Backend (Docker)

git clone https://github.com/rishabh0510rishabh/EnvForage.git
cd EnvForage
docker-compose up -d

The API is now running at http://localhost:8000.

3. Generate a Script

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"]}'

πŸ“š Documentation Links

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

🀝 Contributing

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

πŸ—ΊοΈ Roadmap

  • 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.


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors