MD LLM Optimizer is a Python tool to convert Markdown files into a compact, LLM-friendly format.
It reduces token usage by simplifying Markdown syntax, converting tables to JSON, and removing unnecessary formatting.
- Strip Markdown headers and lists
- Convert links
[text](url)totext: url - Convert Markdown tables into JSON objects
- Remove extra blank lines and spaces
- CLI-based interface with English messages
- Ready for integration with LLM workflows
- Clone the repository:
git clone https://github.com/yourusername/md-llm-optimizer.git
cd md-llm-optimizer- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate # Linux/Mac
.venv\Scripts\activate # Windows- Install dependencies (if any; currently uses only standard library):
pip install -r requirements.txtpython optimize.py
MIT License