Skip to main content

Terminal intelligent orienté humain - Explique les erreurs en langage simple

Project description

🚀 LScript

PyPI version Python 3.9+ License: MIT

Pourquoi LScript existe

Le terminal n'a jamais été conçu pour être compris.

Quand une commande échoue, vous recevez un message d'erreur cryptique. ENOENT, command not found, permission denied... Des mots qui ne vous aident pas. Vous copiez-collez sur Google, vous perdez 10 minutes, vous vous sentez frustré.

LScript change ça.

Au lieu d'un message technique incompréhensible, LScript vous explique :

  • 🧠 Ce qui s'est passé — en langage humain, pas en jargon
  • Comment le résoudre — avec des actions concrètes, pas des théories

LScript est un terminal qui vous accompagne. Pas un outil qui vous juge.

Conçu pour les développeurs qui apprennent, et ceux qui en ont marre de perdre du temps sur des erreurs triviales.

🎯 Pour qui ?

  • Développeurs débutants qui veulent comprendre leurs erreurs
  • Développeurs intermédiaires qui veulent gagner du temps
  • Formateurs qui veulent un terminal pédagogique

📦 Installation

# Installation depuis PyPI
pip install lscript

# Avec UI moderne (recommandé)
pip install lscript[ui]

# Ou depuis les sources
git clone https://github.com/lscript/lscript.git
cd lscript
pip install -e ".[ui]"

🚀 Utilisation

# Lancer LScript
lscript

# Ou via Python
python -m lscript

💡 Exemple

🚀 LScript v0.1.0
Terminal intelligent orienté humain
19 règles chargées • Tapez 'help' pour l'aide

~ ❯ npm install

  bash: npm: command not found

╭─ ❌ Erreur Détectée ────────────────────────────────╮
│ commande npm install                                │
│ code 127                                            │
╰─────────────────────────────────────────────────────╯
╭─ 🧠 Explication ────────────────────────────────────╮
│ Node.js / npm non installé                          │
│                                                     │
│ npm (Node Package Manager) n'est pas installé sur  │
│ votre système. npm est inclus avec Node.js.        │
╰─────────────────────────────────────────────────────╯
╭─ ✅ Solution Suggérée ──────────────────────────────╮
│ Installez Node.js (qui inclut npm):                │
│ • macOS: brew install node                         │
│ • Linux: sudo apt install nodejs npm               │
│ • Windows: https://nodejs.org                      │
╰─────────────────────────────────────────────────────╯

📋 Règles Supportées

Génériques

Règle Description
command_not_found Commande inexistante
permission_denied Droits insuffisants
file_not_found Fichier introuvable
syntax_error Erreur de syntaxe

npm / Node.js

Règle Description
npm_not_found Node.js non installé
npm_install_error Erreurs npm install

Git

Règle Description
git_not_found Git non installé
git_not_repo Pas un dépôt Git
git_merge_conflict Conflit de fusion
git_push_rejected Push rejeté

Python

Règle Description
python_not_found Python non installé
python_module_not_found Module manquant
python_syntax_error Erreur de syntaxe

Docker

Règle Description
docker_not_found Docker non installé
docker_daemon_not_running Daemon arrêté

Réseau & Système

Règle Description
network_error Problème de connexion
port_in_use Port déjà utilisé
disk_full Disque plein

🏗️ Architecture

lscript/
├── cli.py           # Point d'entrée CLI
├── shell.py         # Boucle REPL
├── runner.py        # Exécution subprocess
├── plugins.py       # Système de plugins
├── explain/         # CORE MÉTIER
│   ├── base.py      # Classes abstraites
│   └── rules.py     # 19 règles intégrées
└── ui/              # COUCHE UI (optionnelle)
    ├── theme.py     # 5 thèmes
    └── formatter.py # Affichage Rich

🔌 Créer un plugin

from lscript.plugins import LScriptPlugin, PluginInfo
from lscript.explain.base import ErrorRule, Explanation

class MyPlugin(LScriptPlugin):
    def get_info(self) -> PluginInfo:
        return PluginInfo(
            id="my-plugin",
            name="Mon Plugin",
            version="1.0.0",
        )

    def get_rules(self) -> list:
        return [MyCustomRule()]

🎨 Thèmes

Thème Description Premium
default Sobre et pédagogique
dark Mode sombre
light Mode clair
hacker Terminal vert
dracula Thème Dracula

🤝 Contribuer

Les contributions sont les bienvenues ! Voir CONTRIBUTING.md

📄 Licence

MIT License - Voir LICENSE


Fait avec ❤️ pour les développeurs | lscript.fr

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

lscript_terminal-0.2.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

lscript_terminal-0.2.0-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file lscript_terminal-0.2.0.tar.gz.

File metadata

  • Download URL: lscript_terminal-0.2.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for lscript_terminal-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5628c702a8a9c3ae409dfdfd6181b0f78fc7b26a1acb030f758fc9375161a9af
MD5 a519e0de3b19a1f36ab228d3ec86d660
BLAKE2b-256 c6df45f2793755bfedc63262b0b7cf612c7f133fd17cd293568f10faccb7b738

See more details on using hashes here.

File details

Details for the file lscript_terminal-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lscript_terminal-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1818eb3f0565c1991c5459d88a685e66d84c028facbde8469139f6fae552cc0e
MD5 ccb975c3b549f6bfffddb8aacdb9a2e1
BLAKE2b-256 56b788912dd5fc07160ad5fa77b70362670855d27b3ff5c6b0bfe68755843f59

See more details on using hashes here.

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