tldr: Your new CLI tool for Python
What is tldr?
tldr is a lightweight command-line tool that helps you quickly understand Python error messages and suggests quick fixes so you can debug faster and code smarter. It is built to accommodate all experience levels, helping beginners gain a clearer understanding of Python errors while enabling more advanced users to save time during the debugging process. It natively handles errors and provides solutions (and edits files if needed) for most basic cases, though it has AI support if needed. All local, no API keys needed!
Features
- Looks through your Python tracebacks and explains errors in plain English
- Simple CLI interface: run
tldr <filename>.pyto get instant feedback - Experimental
--autofixoption to automatically fix errors - Tons of internal flags for ease of use
- Native error handling, but has AI-powered fallback
- Minimal dependencies for easy installation and usage
Installation
Install tldr directly in your terminal:
pip install tldrcli
That's it! tldr is ready to use!
Using tldr
Using tldr is as simple as running your Python file, but without typing python first. Instead of:
python <filename>.py
You just type:
tldr <filename>.py
If your script runs without errors, tldr will quietly exit (no unnecessary noise). However, if something does go wrong, tldr will instantly catch the error, explain it in plain English, and even suggest possible fixes right away. The table below shows some of the things tldr can do:
tldr <filename>.py # Run code and explain error
tldr --help | -h # Show quick docs
tldr --demo | -d # Creates demo file to you to test tldr
tldr --version | -v # Show current version
tldr --reset | -r # Reset and clear all data
tldr <filename>.py --autofix # Experimental auto-fix mode
tldr --ol | -o # Setup instructions for complex --autofix
tldr --oc | -c # Verify setup
tldr --stats | -s # View usage statistics and error history
After installing tldr, run tldr --help to view all available commands. For a hands-on example, run tldr --demo to generate a sample file you can experiment with. Like this, tldr is already a great tool for Python beginners to learn and understand. However, there are always some errors that it cannot predict. To ensure that tldr can help you regardless of the situation, set up the local AI model by following the steps in the flag tldr --ol. Once that is done, running tldr --oc will verify if the setup was done correctly. Below are the same steps you will find in your terminal if you choose to install it later:
- In your terminal, run
pip install ollama - Visit https://ollama.com/ and download the installer
- Run the installer and follow the setup instructions
- Once installed, open a terminal and run
ollama run llama3:8b
Changelog
v1.3.1:
- Fixed setup bug for
-vflag - Stats flag,
--stats | -snow persists across version updates (won't lose history whenpip install --upgrade tldrcli) - Demo flag,
--demo | -d, created to help users see how tldr works
v0.1 / v0.2:
- Mainstream launch of tldr with minor UI changes
Contributing
Contributions, issues, and feature requests are welcome! Feel free to open issues to report bugs, request features, submit pull requests to improve the codebase, or more!
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
Devanshu Pandya, pandyadevh@gmail.com
Metadata
Release files for tldrcli 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tldrcli-1.3.2.tar.gz | 12.9 kB | Without provenance | Details for tldrcli-1.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tldrcli-1.3.2-py3-none-any.whl | Python 3 | none | any | Details for tldrcli-1.3.2-py3-none-any.whl |
Total release size: 23.7 kB
Release files / tldrcli-1.3.2.tar.gz
| Download URL | tldrcli-1.3.2.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
190766aa8cb2b0e9d874773a1ef7dd0fe2d2d25fc2487d1c75f4d9a61fcaaa23
|
|
BLAKE2b-256 checksum How to use checksums |
c51ebd217035cf8c58111dd947f92d9151b6bafeeaa534bb8578d7f9dba928de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.0
|
Release files / tldrcli-1.3.2-py3-none-any.whl
| Download URL | tldrcli-1.3.2-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b748c761886d0bbaf96bec1a4936aa8a1603d20be892d5f981411fbcc6e4394f
|
|
BLAKE2b-256 checksum How to use checksums |
e21b5d4e77ab41bc90e6cdb12cd0ff882e8e22c3ec578eca3bebabac86eb6e64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.0
|
Security for tldrcli 1.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.