Skip to content

jhnavi25/EnvForage

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

846 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

EnvForge πŸ› οΈ

Production-Grade ML Environment Provisioning Platform

EnvForge is an intelligent environment provisioning platform that automates one of the most frustrating parts of machine learning development: creating reliable and compatible development environments.

By combining hardware diagnostics, compatibility-aware version resolution, template-driven script generation, and built-in safety validation, EnvForge enables developers to generate deterministic setup scripts for PyTorch, TensorFlow, CUDA, YOLO, and other ML ecosystems across Windows, WSL, and Linux.

No more CUDA mismatches. No more dependency conflicts. No more hours spent debugging installation issues.

Generate. Verify. Deploy. Build AI with confidence.

πŸ‘₯ Contributors

A massive thank you to all the developers who have contributed code, resolved issues, and helped shape EnvForge into a production-grade ML environment provisioning platform!

Contributors Grid

Made with contrib.rocks.


πŸ“‘ 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.


πŸ“‚ Project Structure

EnvForage/
β”œβ”€β”€ .github/                  # GitHub templates, workflows, and automation
β”‚   β”œβ”€β”€ ISSUE_TEMPLATE/
β”‚   β”œβ”€β”€ workflows/
β”‚   β”œβ”€β”€ CODEOWNERS
β”‚   β”œβ”€β”€ dependabot.yml
β”‚   └── PULL_REQUEST_TEMPLATE.md
β”‚
β”œβ”€β”€ backend/                  # FastAPI backend and compatibility engine
β”‚   β”œβ”€β”€ alembic/              # Database migrations
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ ai/               # AI troubleshooting logic
β”‚   β”‚   β”œβ”€β”€ api/              # API routes
β”‚   β”‚   β”œβ”€β”€ compatibility/    # CUDA/Framework compatibility engine
β”‚   β”‚   β”œβ”€β”€ core/             # Core application logic
β”‚   β”‚   β”œβ”€β”€ middleware/       # Custom middleware
β”‚   β”‚   β”œβ”€β”€ models/           # Database models
β”‚   β”‚   β”œβ”€β”€ schemas/          # Pydantic schemas
β”‚   β”‚   β”œβ”€β”€ services/         # Business services
β”‚   β”‚   └── templates/        # Script generation templates
β”‚   β”‚
β”‚   β”œβ”€β”€ scripts/              # Utility scripts
β”‚   β”œβ”€β”€ seeds/                # Compatibility matrices and profiles
β”‚   β”œβ”€β”€ tests/                # Unit, integration, and API tests
β”‚   β”œβ”€β”€ Dockerfile
β”‚   └── pyproject.toml
β”‚
β”œβ”€β”€ frontend/                 # Next.js web application
β”‚   β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”‚   β”œβ”€β”€ diagnose/     # Environment diagnostics UI
β”‚   β”‚   β”‚   β”œβ”€β”€ generate/     # Script generation UI
β”‚   β”‚   β”‚   β”œβ”€β”€ profiles/     # Environment profiles
β”‚   β”‚   β”‚   └── troubleshoot/ # AI troubleshooting interface
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ components/       # Reusable React components
β”‚   β”‚   β”œβ”€β”€ services/         # API communication layer
β”‚   β”‚   └── types/            # TypeScript types
β”‚   β”‚
β”‚   β”œβ”€β”€ Dockerfile
β”‚   └── package.json
β”‚
β”œβ”€β”€ cli/                      # Standalone diagnostic CLI agent
β”œβ”€β”€ docs/                     # Project documentation
β”‚
β”œβ”€β”€ docker-compose.yml        # Development environment
β”œβ”€β”€ docker-compose.prod.yml   # Production deployment
β”œβ”€β”€ CONTRIBUTING.md           # Contribution guidelines
β”œβ”€β”€ CODE_OF_CONDUCT.md        # Community standards
β”œβ”€β”€ SECURITY.md               # Security policy
β”œβ”€β”€ TROUBLESHOOTING.md        # Common issues & fixes
β”œβ”€β”€ CHANGELOG.md              # Release history
β”œβ”€β”€ LICENSE
└── README.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

3. Run the Backend (Kubernetes)

Prerequisites:

  • Helm 3+
  • A running Kubernetes cluster (Docker Desktop, minikube, or cloud)
  • NGINX Ingress Controller (only if ingress.enabled=true):
  kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.10.0/deploy/static/provider/cloud/deploy.yaml
helm install envforge ./helm/envforge

# Enable ingress (optional)
helm install envforge ./helm/envforge \
  --set ingress.enabled=true \
  --set ingress.host=api.yourdomain.com

kubectl port-forward svc/envforge 8000:8000
kubectl port-forward svc/envforge-frontend 3000:3000

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
TASKS.md The master implementation blueprint

🀝 Contributing

We love open source! Contributions of all sizes are welcome β€” whether it's fixing bugs, improving documentation, adding new environment profiles, enhancing the compatibility engine, or proposing new features.

Please read our Contributing Guide before getting started. You'll find detailed instructions for:

  • Local development setup (Docker & non-Docker workflows)
  • Backend, frontend, and CLI development
  • Branching and commit message conventions
  • Adding new profiles and script templates
  • Testing requirements and quality standards
  • Pull request guidelines and code review expectations

Before submitting a contribution, please ensure that all tests pass and relevant documentation is updated.

Thank you for helping make EnvForge more reliable, safe, and developer-friendly!


πŸ—ΊοΈ 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 βœ…
  • Phase 6: Polish & Production Readiness βœ…

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

Languages

  • Python 74.4%
  • TypeScript 19.4%
  • Shell 3.2%
  • Jinja 1.5%
  • CSS 1.2%
  • Dockerfile 0.2%
  • Other 0.1%