Skip to main content

The developer utility toolkit — debug smarter, fix faster.

Project description

⚡ letx

The developer utility toolkit — debug smarter, fix faster.

Built by Ammaar Bakshi

PyPI version Python License: GPL v3


letx is a modular Python CLI toolkit built for everyone — beginners who need plain-English error explanations, and experienced developers who want fast, no-noise tooling straight from the terminal.

No more staring at raw tracebacks. No more hunting through files to remove comments. Just run a command and get things done.


📦 Installation

pip install letx

Or install from source:

git clone https://github.com/AMMAAR-IC/letx.git
cd letx
pip install -e .

🛠 Tools

letxDebug — Smart Debugger

Runs your Python file and gives you clean, useful output instead of a wall of red text.

Command What it does
letxDebug file.py Run and show clean debug output
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

Clean up your Python files with one command.

Remove Comments

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

# Remove ALL comments from an entire 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 changes without modifying any files
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                                │
└────────────┴───────────────────────────────────────────────────────┘

Run <command> --help for usage details.

🔌 Extending letx

letx is built to grow. Adding a new tool takes exactly 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 an entry point in letx/cli.py

def letx_my():
    run_module("letxMy")

4. Register in pyproject.toml

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

Then reinstall with pip install -e . and your new command is live. ✔


📁 Project Structure

letx/
├── pyproject.toml
├── README.md
├── LICENSE
└── letx/
    ├── cli.py              ← entry points
    ├── core/
    │   └── base.py         ← LetxModule base class
    ├── modules/
    │   ├── __init__.py     ← module registry
    │   ├── debug.py        ← letxDebug
    │   └── fix.py          ← letxFix
    └── utils/
        ├── printer.py      ← rich terminal output
        └── runner.py       ← subprocess file executor

👤 Author

Ammaar Bakshi — Built letx to make Python debugging less painful for everyone.

🔗 GitHub: https://github.com/AMMAAR-IC/letx

If you find it useful, consider giving it a ⭐ on GitHub.


📄 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-1.1.0.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

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

letx-1.1.0-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for letx-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c4113b8afcd586ef2463fa09be3f0381058b5e2252de51105095e27f2b120b5d
MD5 b749f923746f75747718e7cb4414116f
BLAKE2b-256 370dfb59baaeedbad8b7fe048a47d6340186a9479920a1ea2fb66181cbc85eff

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for letx-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e230d30c8738c4aea423a90551f3961c787c40ff007f5301afbd5960ce33c32
MD5 9f56939da4358d58d0eb309c67f9c093
BLAKE2b-256 4d2033d08cf5b737124dc722bc00a0918d34e6a0cea2985fdb4730aed67e21ae

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