Skip to main content

Agent IA d'audit technique de projets — analyse le code source et génère un rapport structuré en Markdown et PDF.

Project description

CodePulse

Agent IA d'audit technique de projets informatiques. Analyse le code source, l'architecture, les dépendances et la configuration d'un projet, puis génère un rapport structuré en Markdown et PDF.

Fonctionnalités

  • Commande audit installable en une ligne depuis n'importe quel terminal (CMD, PowerShell, bash)
  • Clé API embarquée — aucune configuration requise après installation
  • Analyse via Google Gemini 2.5 Flash
  • Rapport structuré en 11 blocs couvrant 8 piliers d'analyse
  • Génération automatique d'un rapport PDF stylisé (couleurs, badges de risque, mise en page professionnelle)
  • Ingestion intelligente : priorité aux fichiers critiques, troncature automatique, budget de tokens maîtrisé
  • Exclusion automatique des fichiers sensibles (.env, node_modules, __pycache__, venvs…)
  • Streaming : affichage du rapport en temps réel pendant la génération
  • Interface web optionnelle (Streamlit) pour les non-développeurs
  • Compatible Streamlit Cloud et Render : clé API configurable via variables d'environnement

Piliers analysés

# Pilier
1 Architecture & Qualité du code
2 Tests & Qualité Assurance
3 Sécurité & Robustesse (OWASP Top 10)
4 DevOps & Infrastructure
5 Performance & Scalabilité
6 Dépendances & Licences
7 Conformité & Réglementation (RGPD, WCAG)
8 Documentation & Expérience Développeur

Installation

Via PyPI (recommandé)

pip install agent-audit-ai
audit .

Aucune configuration requise — la clé API est embarquée dans le package.

Via l'exécutable Windows

Télécharger audit.exe depuis la page Releases GitHub, le placer dans C:\Windows\System32\ et l'utiliser directement :

audit .

Via le code source

git clone https://github.com/DIOMANDE-CODE/agent_ai_audit_projet.git
cd agent_ai_audit_projet

python -m venv codepulse-env
codepulse-env\Scripts\activate        # Windows
# source codepulse-env/bin/activate   # Linux / macOS

pip install -e .
audit .

Utilisation

# Auditer le dossier courant
audit .

# Auditer un projet spécifique
audit /chemin/vers/mon-projet

# Afficher le rapport en temps réel pendant la génération
audit /chemin/vers/mon-projet --stream

# Aide
audit --help

Les rapports .md et .pdf sont générés à la racine du projet audité.


Interface web (optionnelle)

Pour les utilisateurs non-développeurs, une interface Streamlit est disponible.

Déploiement sur Render

  1. Poussez le dépôt sur GitHub
  2. Sur render.comNew → Web Service → connecter le repo
  3. Runtime : Docker (Render détecte automatiquement le Dockerfile)
  4. Dans Environment → Environment Variables, ajouter :
Key Value
GEMINI_API_KEY votre clé API Gemini
  1. Cliquer Create Web Service — Render construit l'image et expose l'URL publique.

Déploiement sur Streamlit Cloud

  1. Forkez / poussez ce dépôt sur GitHub
  2. Connectez-le à share.streamlit.io
  3. Dans Settings → Secrets, ajoutez :
GEMINI_API_KEY = "votre_cle_api_ici"

Docker (local)

DOCKER_BUILDKIT=1 docker build -t codepulse .
docker run -p 8501:8501 -e GEMINI_API_KEY=votre_cle_api codepulse

Structure du projet

agent_ai_audit_projet/
├── main.py                   # CLI — commande `audit`
├── app.py                    # Interface web Streamlit (optionnelle)
├── pyproject.toml            # Packaging pip (agent-audit-ai)
├── Dockerfile                # Image production (python:3.12-slim, non-root, healthcheck)
├── .dockerignore
├── .github/
│   └── workflows/
│       └── publish.yml       # CI/CD : build exe + publication PyPI
├── components/
│   └── folder_picker/        # Composant sélection de dossier (File System Access API)
│       └── index.html
├── config/
│   ├── settings.py           # Configuration : _bundled → st.secrets → .env → env vars
│   └── _bundled.py           # Clé API embarquée (gitignore)
├── core/
│   ├── ingestion.py          # Chargement et priorisation des fichiers du projet
│   └── prompts.py            # Génération du prompt d'audit (11 blocs)
├── services/
│   ├── gemini_client.py      # Client Gemini avec retry et streaming
│   └── pdf_generator.py      # Génération PDF via ReportLab
├── requirements.txt
├── .env.example              # Modèle de configuration
├── .gitignore
├── LICENSE
├── README.md
└── CHANGELOG.md

Variables d'environnement

Non requis si la clé est embarquée dans le package distribué.

Variable Défaut Description
GEMINI_API_KEY (embarquée) Clé API Google Gemini
MODEL_NAME gemini-2.5-flash Modèle Gemini à utiliser
TEMPERATURE 0.1 Créativité du modèle (0 = déterministe)
MAX_OUTPUT_TOKENS 65536 Budget de tokens pour la réponse

Priorité de lecture : clé embarquée (_bundled.py) → st.secrets.env → variables d'environnement système.

Licence

MIT — voir LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_audit_ai-1.0.1.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_audit_ai-1.0.1-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file agent_audit_ai-1.0.1.tar.gz.

File metadata

  • Download URL: agent_audit_ai-1.0.1.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agent_audit_ai-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2d78e017a52030925a551331ce276369cbe5954d72201a7aefcedd8a6b621bec
MD5 42b0dedec3290e210aaa819d88347ef1
BLAKE2b-256 874b18da1623fa0beb3eac776f8da3c28ca39dfa905c532a66ef77129ff72850

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_audit_ai-1.0.1.tar.gz:

Publisher: publish.yml on DIOMANDE-CODE/agent_ai_audit_projet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_audit_ai-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: agent_audit_ai-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agent_audit_ai-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae047937b11b6ebfccf5e3a67722809075093ea7ee383b64574fef825c510088
MD5 7c8dcf4dc748951cad415d01d9f1d801
BLAKE2b-256 b53f204e7558570e73c4fb1ca5f32336b7f29b954602c3fa53a99faa1f497229

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_audit_ai-1.0.1-py3-none-any.whl:

Publisher: publish.yml on DIOMANDE-CODE/agent_ai_audit_projet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page