Skip to main content

The developer utility toolkit — debug smarter, fix faster.

Project description

⚡ letx

The developer utility toolkit — debug smarter, fix faster.

letx is a modular Python CLI library built for everyone: beginners who need plain-English error explanations, and experienced devs who want fast, no-noise tooling.


Installation

pip install letx
# or from source:
pip install -e .

Tools

letxDebug — Smart Debugger

Run a Python file with smarter output than a raw traceback.

Command What it does
letxDebug file.py Run and show clean debug info
letxDebug -e file.py Explain the error in plain English
letxDebug -s file.py Suggest a fix / solution
letxDebug -a file.py Everything: explain + solution

Example:

$ letxDebug -a my_script.py

⚡ letx  letxDebug
Debugging  my_script.py

🔴 Traceback
  ...
  NameError: name 'pritn' is not defined

💬 Error Explanation
  You used a variable or function that Python doesn't know about yet.

🔧 Suggested Fix
  1. Check the spelling of the variable name
  2. Make sure you defined the variable before using it
  3. If it's a function from a module, did you import it?

letxFix — Code Fixer

Fix and clean up your Python files.

Remove Comments

# Remove ALL comments from a file
letxFix -rm -cmt file.py

# Remove ALL comments from a folder
letxFix -rm -cmt src/

# Remove only single-line comments (#)
letxFix -rm -cmt -s file.py

# Remove only multi-line comments (triple-quoted)
letxFix -rm -cmt -m file.py

# Dry run — preview what would change, no files modified
letxFix -rm -cmt --dry-run src/

letx — List all tools

$ letx

⚡ letx  The developer utility toolkit
┌────────────┬───────────────────────────────────────────────────────┐
│ Command     Description                                           │
├────────────┼───────────────────────────────────────────────────────┤
│ letxDebug   Smart Python debugger  run, explain, and fix errors  │
│ letxFix     Code fixer and cleaner                                │
└────────────┴───────────────────────────────────────────────────────┘

Extending letx

Adding a new module takes 4 steps:

1. Create letx/modules/mymodule.py:

from letx.core.base import LetxModule
from argparse import ArgumentParser

class MyModule(LetxModule):
    @property
    def name(self): return "letxMy"

    @property
    def description(self): return "Does something awesome"

    def register_args(self, parser: ArgumentParser):
        parser.add_argument("file", help="Target file")
        parser.add_argument("-x", action="store_true", help="Do X")

    def run(self, args) -> int:
        # your logic here
        return 0

2. Register it in letx/modules/__init__.py:

from letx.modules.mymodule import MyModule

REGISTRY = {
    ...
    "letxMy": MyModule(),
}

3. Add a CLI entry point in letx/cli.py:

def letx_my():
    run_module("letxMy")

4. Register in pyproject.toml:

[project.scripts]
letxMy = "letx.cli:letx_my"

Done. ✔


License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

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

letx-0.1.0.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

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

letx-0.1.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: letx-0.1.0.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for letx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f74171f3444af7e9e06efdcb17e5d7003e22142ad015bce3d3006e74dec3d34c
MD5 5de9c3a953d9a15607cb79c6d3736ecf
BLAKE2b-256 77cc316c324a027401d51f58ddc53afbb9019cc557486150dbb7d81fef3a129a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: letx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for letx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b9ab0a395f2a800fc54f2bdb5ba8c0de8adb2d9f4120f083f7ecd368b97d91b
MD5 9cb555ac857d9e805a559777f5295806
BLAKE2b-256 dc0308e46da75b96ac1a4a02e5a062df6475ba0c56a804892ef8fdad8dff0eed

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