Common Commands - CoursIA
Environment Setup
Ce document est centré Windows (paths C:\, venv\Scripts). Pour le setup d’un poste contributeur macOS / Linux (équivalents brew/apt des commandes winget/choco, elan Lean sans WSL, backend MPS sur Apple Silicon), cf setup-linux-macos.md. Les kernels .NET Interactive, Python et Lean 4 sont cross-OS ; les notebooks s’exécutent à l’identique modulo le backend GPU.
# Python
python -m venv venv && venv\Scripts\activate # Windows
# python -m venv venv && source venv/bin/activate # macOS / Linux
pip install -r MyIA.AI.Notebooks/GenAI/requirements.txt
# C# (.NET 9.0)
dotnet restore MyIA.CoursIA.slnDocker / ComfyUI Services
python scripts/genai-stack/genai.py docker status # Statut des services
python scripts/genai-stack/genai.py docker start all # Demarrer tous les services
python scripts/genai-stack/genai.py docker stop all # Arreter tous les servicesCf genai-services.md pour le detail des services et notebooks.
Validation & Testing
IMPORTANT : Always use existing scripts for notebook validation/execution. Never write ad-hoc execution scripts.
Notebook Tools (multi-family CLI)
python scripts/notebook_tools/notebook_tools.py validate [target] # Structure validation
python scripts/notebook_tools/notebook_tools.py execute [target] # Execute via Papermill
python scripts/notebook_tools/notebook_tools.py execute [target] --cell-by-cell # Cell-by-cell (.NET/Lean)
python scripts/notebook_tools/notebook_tools.py analyze [path] # Analyze structure
python scripts/notebook_tools/notebook_tools.py skeleton [path] # Generate skeletonKernel auto-detection : notebook_tools.py reads kernel name from notebook metadata and uses it automatically. Custom kernels (smartcontracts, lean4-wsl) are supported with extended startup timeouts.
SmartContracts-specific validator
python scripts/smartcontracts/validate_sc_notebooks.py # Full SC validation
python scripts/smartcontracts/validate_sc_notebooks.py --quick # Structure only
python scripts/smartcontracts/validate_sc_notebooks.py --execute --anvil # Execute with anvilGenAI stack validation
python scripts/genai-stack/genai.py validate --full # Validation complete ComfyUI
python scripts/genai-stack/genai.py validate --notebooks # Validation syntaxe notebooks
python scripts/genai-stack/genai.py notebooks # Validation Papermill notebooks
python scripts/genai-stack/genai.py gpu # Verification VRAMGitHub Actions validates notebooks on PR : .github/workflows/notebook-validation.yml
Slash commands Claude Code
/verify-notebooks [target] [--quick] [--fix] # Verify and test notebooks
/enrich-notebooks [target] [--execute] [--strict] # Add pedagogical content
/cleanup-notebooks [target] [--dry-run] # Clean markdown structure
/build-notebook <action> <path> [--quality=90] # Create/improve/fix notebooks
/execute-notebook <path> [--batch] [--save] # Execute via MCP
/validate-genai [target] [--local] # Validate GenAI stack
Cf claude-code-config.md pour le detail agents/skills/rules.
GradeBookApp
python GradeBookApp/gradebook.py # Python grading pipeline (module core)
python GradeBookApp/run_grading.py # Runner generique (CLI argparse)Notation par cohorte (ECE, ESGF, …) = privee sur GDrive G:\Mon Drive\MyIA\Formation\<ecole>\<annee>\grading\ ; cf GradeBookApp/configs/README.md pour le moteur generique.