██████╗ ██████╗ ██████╗ ██╗██╗███╗ ██╗██╗████████╗
██╔══██╗██╔══██╗██╔═══██╗ ██║██║████╗ ██║██║╚══██╔══╝
██████╔╝██████╔╝██║ ██║ ██║██║██╔██╗ ██║██║ ██║
██╔═══╝ ██╔══██╗██║ ██║██ ██║██║██║╚██╗██║██║ ██║
██║ ██║ ██║╚██████╔╝╚█████╔╝██║██║ ╚████║██║ ██║
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚════╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝
Project Lifecycle Management Tool v2.0
CLI pour initialiser, auditer et mettre a jour des projets selon des standards definis.
Linux first — Concu pour les environnements Linux. Peut fonctionner sur macOS, non teste sur Windows.
| Commande | Description |
|---|---|
projinit check |
Auditer la conformite d'un projet |
projinit update |
Corriger automatiquement les non-conformites |
projinit new |
Creer un nouveau projet selon les standards |
projinit config |
Gerer la configuration |
# Cloner le depot
git clone https://github.com/xgueret/projinit.git
cd projinit
# Installer les dependances
uv sync
# Lancer
uv run projinit --version# Installer comme outil global
uv tool install git+https://github.com/xgueret/projinit.git
# Verifier l'installation
projinit --versionVerifier la conformite d'un projet existant aux standards definis :
# Audit du projet courant (type auto-detecte)
projinit check
# Audit d'un projet specifique
projinit check /path/to/project
# Forcer le type de projet
projinit check -t python-cli
# Format de sortie (text, json, markdown)
projinit check -f markdown > audit-report.md
# Mode verbose (temps d'execution, fichiers scannes)
projinit check -vTypes de projets supportes :
python-cli: Application CLI Pythonpython-lib: Bibliotheque Pythonnode-frontend: Application frontend Node.js (React, Vue, Vite, PWA)infrastructure: Projet Terraform/Ansibledocumentation: Documentation MkDocslab: Lab/Tutorial (exercices, solutions, dojos)
Appliquer les corrections automatiques pour atteindre la conformite :
# Correction automatique (avec backup)
projinit update
# Mode dry-run (voir sans appliquer)
projinit update --dry-run
# Mode interactif (confirmer chaque action)
projinit update --interactive
# Sans backup
projinit update --no-backupGenerer un nouveau projet conforme aux standards :
# Creation interactive
projinit new mon-projet
# Specifier le type
projinit new mon-projet -t python-cli
# Mode non-interactif
projinit new mon-projet -t python-cli -d "Description du projet" -y
# Dans un dossier specifique
projinit new mon-projet -p /path/to/parent
# Avec direnv + pass pour les secrets
projinit new mon-projet --direnvprojinit supporte l'integration avec direnv et pass pour une gestion securisee des secrets :
# Activer direnv lors de la creation
projinit new mon-projet --direnv
# Le fichier .envrc genere utilise pass :
# export API_KEY=$(pass show projects/secrets/mon-projet/api-key)Prerequis :
direnvinstalle et configure dans le shellpass(password-store) installe et initialise
# Voir la configuration actuelle
projinit config show
# Voir les chemins de configuration
projinit config paths
# Creer un fichier de configuration
projinit config init --global # ~/.config/projinit/config.yaml
projinit config init --local # .projinit.yaml- Valeurs par defaut (integrees)
- Configuration globale :
~/.config/projinit/config.yaml - Configuration locale :
.projinit.yaml(projet)
# projinit configuration
author:
name: "Votre Nom"
email: "[email protected]"
# Version Python par defaut
python_version: "3.10"
# Licence par defaut
default_license: "MIT"
# Personnalisation des standards
standards:
# Changer le niveau d'un check
check_overrides:
has_claude_md: required # Rendre CLAUDE.md obligatoire
# Desactiver des checks
disabled_checks:
- has_py_typed
# Ajouter des hooks pre-commit
extra_precommit_hooks:
- repo: https://github.com/example/hook
rev: v1.0.0
hooks:
- id: example-hook
# Templates personnalises
templates:
templates_dir: ~/.config/projinit/templates
overrides:
README.md.j2: ~/.config/projinit/templates/my-readme.j2| Check | Description |
|---|---|
has_readme |
README.md present |
has_license |
Fichier LICENSE present |
has_gitignore |
.gitignore present |
has_pyproject |
pyproject.toml (Python) |
has_package_json |
package.json (Node.js) |
| Check | Description |
|---|---|
has_claude_md |
CLAUDE.md pour les instructions IA |
has_precommit |
Configuration pre-commit |
has_src_dir |
Structure src/ (Python) |
has_tests_dir |
Repertoire tests/ |
has_ruff_config |
Configuration Ruff (Python) |
envrc_uses_pass |
.envrc utilise pass pour les secrets |
has_vite_config |
Configuration Vite (Node.js) |
has_eslint_config |
Configuration ESLint (Node.js) |
# 1. Auditer un projet existant
projinit check ~/mon-vieux-projet
# Score: 45.5% - NON-COMPLIANT
# 2. Voir ce qui serait corrige
projinit update ~/mon-vieux-projet --dry-run
# 3. Appliquer les corrections
projinit update ~/mon-vieux-projet
# 4. Verifier la conformite
projinit check ~/mon-vieux-projet
# Score: 100.0% - COMPLIANT
# 5. Creer un nouveau projet conforme
projinit new nouveau-projet -t python-cli
# Score: 100.0% - COMPLIANTname: Conformity Check
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- run: uv tool install projinit
- run: projinit check -f markdown >> $GITHUB_STEP_SUMMARYprojinit check -f markdown > CONFORMITY.mdGenere un rapport avec badges shields.io :
# Cloner et installer
git clone https://github.com/xgueret/projinit.git
cd projinit
uv sync
# Lancer en developpement
uv run projinit check .
# Linting
uvx ruff check src/
# Tests
uv run pytestMIT