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.1.0.tar.gz (23.5 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.1.0-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lscript_terminal-0.1.0.tar.gz
  • Upload date:
  • Size: 23.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 cfdd92df582291d68eb236feeb79f74c859dcc7582ed1e71411785f6b729b0ef
MD5 dd2460b20854feb671e36650dcae8e22
BLAKE2b-256 468e3b52d8cb20e7c775beedb4a29a79c6832de4a07a971d7b0ded13f12dcbde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for lscript_terminal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7dbb7ba3d7def57350cedbdafcbe170a7c4a3dc3d5f580535c4d66408a5614e2
MD5 eb5a78799a04f7dd2f9ada35af2c04dd
BLAKE2b-256 5dbe0b257b1a17cbcefb736fcd11429703aec3f6802272405efdda05efd679c0

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