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.1.tar.gz (23.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.1-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lscript_terminal-0.2.1.tar.gz
  • Upload date:
  • Size: 23.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.1.tar.gz
Algorithm Hash digest
SHA256 b78c3c19620888197181dd6dc01593ba634d6878aed03a0c81f7b822721d124e
MD5 9ece90ac68ccd8ccb7fa1d3ee50ebdce
BLAKE2b-256 2b68a80d5bb43bdea70815939f8a6decfe111ba23e6b2a2403ad101038fd8221

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lscript_terminal-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca3b8f961d4da02c5e9a9b1fb5a91c516d02fc9e9f8b7ca84a86d1378950c42b
MD5 75bfe2a6b1adf478545b1a77be4e7c68
BLAKE2b-256 e0cf053ea072ce97d3d930017eafffada1b8b78b9a9f58e60c6a21c6d39aa623

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