Python library and CLI for X5-10CD thermal printers via Bluetooth Low Energy.
A command-line tool and Python library for X5/cat thermal printers. Works out of the box - no code required for basic printing.
Key features:
- CLI tool - Just type
thermy --local photo.jpginstead of writing Python scripts - Google Docs printing - Print public Google Docs directly from URL
- Protocol fixes applied - Uses community-discovered intensity commands for better print quality
- Handles large images - Automatically chunks images to avoid firmware limits
Built because existing libraries required writing code for simple tasks, and had print quality issues we wanted to fix.
git clone https://github.com/ellinglien/thermy.git
cd thermy
pip install -e .thermy --local photo.jpg # Print an image
thermy --gdoc YOUR_DOC_ID # Print a Google Doc (must be public)
thermy --battery # Check battery level
thermy --help # See all optionsimport asyncio
from thermy import X5Printer
async def main():
async with X5Printer() as printer:
await printer.print_image("photo.jpg")
asyncio.run(main())Applies fixes from rbaron/catprinter#36:
- Uses DEEPEN intensity instead of FADED
- Omits energy commands that reduce darkness
- Chunks large images (firmware ~950 row limit)
- Polls for completion instead of delays
python scan.py # Find BLE addressUpdate DEFAULT_ADDRESS in thermy/printer.py with your device address.
- rbaron/catprinter - Python library for cat printers
- NaitLee/Cat-Printer - Multi-platform cat printer app
- catprinter#36 - Protocol fixes discussion
MIT - See LICENSE file
Elling Lien (@ellinglien)
This project was developed with assistance from Claude (Anthropic).