A powerful collection of CLI tools for Python developers
Clean cache, manage Django projects, handle virtual environments, and more - all in one place!
| ๐งน Clean Python Cache | Remove all __pycache__ folders recursively with space calculation |
|---|---|
| ๐ Django Manager | Create projects, apps, run migrations and server interactively |
| ๐ Environment Manager | Create/delete virtual environments, manage .env files |
| ๐ File Operations | Copy, move, delete, and list files with beautiful output |
| ๐ File Statistics | Count files by extension, analyze project structure |
| ๐ AI Context Generator | Generate optimized project context for AI assistants |
pip install mytoolspip install git+https://github.com/Alexashok99/mytools.gitgit clone https://github.com/Alexashok99/mytools.git
cd mytools
pip install -e .$ mytools list
๐ง Available tools:
โข clean-pycache โ Remove all __pycache__ folders recursively
โข django โ Interactive Django project manager
โข env โ Virtual environment and .env helper
...mytools --help
mytools clean-pycache --helpcd your-project-directory
mytools clean-pycache๐ Cleaning in: E:\projects\myproject
โ
Deleted: __pycache__ (1.25 MB)
โ
Deleted: src\__pycache__ (0.50 MB)
๐ฏ Summary: 2 folders deleted, 1.75 MB freed
mytools djangoDJANGO MANAGER
1. Create Django Project
2. Check Django Installation
3. Create Django App
...
MyTools is designed to be extendable. Thirdโparty or custom tools can be
registered using Python entry points
under the mytools.plugins group. The package dynamically loads every
tool listed there when it starts.
There is also a src/mytools/plugins/ package included for convenience โ
it's empty by default but you may drop local plugin modules in there
and add corresponding entry points during development.
Removes all __pycache__ directories recursively from current path.
mytools clean-pycache --yes # skip confirmation prompt
mytools clean-pycache --no-pause # run without waiting at endmytools clean-pycache- Shows folder size before deletion
- Displays total space freed
- Safe - asks for confirmation
Interactive Django project and app management.
mytools djangoFeatures:
- Create new Django projects
- Check Django installation
- Create Django apps
- Make and apply migrations
- Run development server
Virtual environment and .env file management.
mytools envFeatures:
- Create virtual environments (.venv, venv, custom)
- Delete virtual environments
- Create
.envfile with templates - Delete
.envfiles - List environment variables
- Check Python environment
Comprehensive file and folder management.
mytools file-opsFeatures:
- List all files with sizes
- Copy files/folders
- Move files/folders
- Delete files/folders
- File information
- Create folders and files
- Export file lists
Analyze your project structure.
mytools file-counterOutput:
๐ Project: myproject
๐ Path: E:/projects/myproject
๐ Statistics:
โข Total folders: 42
โข Total files: 156
๐ Files by extension:
โข .py: 89
โข .md: 23
โข .json: 12
โข .txt: 8
โข .yml: 5
โข [no extension]: 19
Generate optimized context for AI assistants.
mytools contextFeatures:
- Smart file selection (prioritizes important files)
- Custom ignore patterns
- Project tree visualization
- File content extraction
- Size limits to prevent overflow
Create .env file in your project directory:
# MyTools Configuration
MYTOOLS_LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR
MYTOOLS_MAX_FILE_SIZE=100000 # Max file size to read (bytes)
MYTOOLS_MAX_TOTAL_SIZE=500000 # Max total context size (bytes)Or set environment variables directly:
# Windows
set MYTOOLS_LOG_LEVEL=DEBUG
# Linux/Mac
export MYTOOLS_LOG_LEVEL=DEBUG# Clone repository
git clone https://github.com/Alexashok99/mytools.git
cd mytools
# Create virtual environment
python -m venv .venv
# Activate it:
# Windows: .venv\Scripts\activate
# Linux/Mac: source .venv/bin/activate
# Install in editable mode with dev dependencies
pip install -e .[dev]
# Run tests
pytest tests/ --cov=mytools
# Format code
black src/ tests/
# Lint code
ruff check src/ tests/
# Type check
mypy src/mytools/
โโโ src/
โ โโโ mytools/
โ โโโ __init__.py # Package version
โ โโโ __main__.py # python -m support
โ โโโ cli.py # Typer CLI application
โ โโโ config.py # Pydantic settings
โ โโโ utils.py # Helper functions
โ โโโ tools/ # All CLI tools
โ โโโ base.py # BaseTool abstract class
โ โโโ clean_pycache.py
โ โโโ django_manager.py
โ โโโ env_manager.py
โ โโโ file_ops.py
โ โโโ file_counter.py
โ โโโ context_generator.py
โโโ tests/ # Unit tests
โ โโโ test_cli.py
โ โโโ test_tools/
โโโ pyproject.toml # Package configuration
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ .gitignore # Git ignore rules
Contributions are welcome! Here's how you can help:
- ๐ Report bugs - Open an issue
- โจ Suggest features - Open an issue with
enhancementtag - ๐ Improve docs - Fix typos, add examples
- ๐ง Submit PRs - Fix bugs, add features
Development workflow:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing) - Open a Pull Request
Guidelines:
- Follow PEP 8 style guide
- Add tests for new features
- Update documentation
- Use Black formatter
- Run Ruff linter
This project is licensed under the MIT License - see the LICENSE file for details.
Your Name
- GitHub: @Alexashok99
- Email: alexashok999@gmail.com
If you find this project useful, please consider:
- Giving a โญ star on GitHub
- ๐ค Sharing with fellow developers
- ๐ Reporting issues
- ๐ง Contributing code
Made with โค๏ธ for Python developers