Skip to main content

CLI tool to compress images, PDFs, and videos

Project description

🚀 ilovecli

The ultimate, high-performance media optimization suite for your terminal.

Version 1.0.1

FeaturesInstallationQuick StartAdvanced UsageLicense


ilovecli is an impossibly fast, cross-platform command-line utility built to seamlessly compress, resize, and optimize Images, PDFs, and Videos.

Designed for both beginners and power-users, it maps complex formatting engines (like FFmpeg and Ghostscript) into an elegant, interactive interface. Whether you are batch-shrinking gigabytes of vacation photos or stripping megabytes out of a corporate PDF, ilovecli handles it instantly.

✨ Core Features

  • 🧙‍♂️ Interactive UI: A gorgeous, keyboard-driven wizard for users who prefer menus over typing commands.
  • 🖼️ Precision Resizer: Scale images with mathematical accuracy using pixels (px), centimeters (cm), or millimeters (mm). Perfect for digital design and print media.
  • 🗜️ Smart Compression Engine: Multi-threaded optimization for Images (JPG, PNG, WEBP), PDFs, and Videos (HEVC/libx265).
  • 🎯 Target-Size Isolation: Specify an exact file size (e.g., "Max 5MB"), and our binary-search algorithm will calculate the perfect compression ratio automatically.
  • 🌐 Anti-Bot Web Fetcher: Download media directly from highly protected sites (like Freepik) utilizing built-in Cloudflare bypass protocols.
  • 📁 Mass Batching: Process entire directory trees recursively, utilizing 100% of available CPU cores.

📦 Installation

This project requires Python 3.8+. It is highly recommended to install it globally using pipx to avoid environment conflicts.

pipx install ilovecli
# Fallback standard installation:
# pip install ilovecli

Auto-Install Dependencies (Highly Recommended)

ilovecli heavily benefits from native system engines (FFmpeg & Ghostscript). Let the CLI provision these for your specific operating system automatically:

ilovecli install

🚀 Quick Start Guide

1. The Interactive Wizard (Easiest Method)

If you do not want to memorize manual arguments, simply launch the step-by-step terminal UI:

ilovecli wizard

2. Standard Compression (compress / c)

The engine automatically detects the MIME type and routes the file safely to the correct compressor.

ilovecli c photo.jpg          # Optimize an image
ilovecli c document.pdf       # Shrink a PDF
ilovecli c video.mp4          # Compress a video (HEVC)

3. Image Precision Resizing (resize)

Safely scale images while automatically maintaining their aspect ratio.

# Standard pixel resizing
ilovecli resize header.png --width 1920

# Professional print resizing (20cm width at 300 DPI)
ilovecli resize poster.jpg --width 20 --unit cm --dpi 300

# Built-in dimensional presets
ilovecli resize post.jpg --preset instagram

4. Target-Size Algorithms (target / t)

Strict email attachment limits? Force a file below a specific KB threshold.

ilovecli t presentation.pdf 2000    # Compresses until strictly under 2MB
ilovecli t large_photo.jpg 500      # Compresses until strictly under 500KB

5. Fetch & Optimize (url / u)

Download a remote file, bypass bot-protection, and immediately push it through the compression/resize pipeline.

ilovecli url https://example.com/source.png --width 1000

6. Parallel Folder Processing (folder / f)

Execute multi-threaded compression across an entire directory.

ilovecli f ./assets --smart

⚙️ Advanced Settings & Tuning

PDF Export Profiles

Control exact DPI outputs for your PDFs using the -p (profile) flag.

  • screen: Extreme compression for emails and speedy web viewing (72 DPI).
  • ebook: Balanced file size and crisp vector rendering (150 DPI). (Default)
  • printer: High-fidelity resolution for home/office printing (300 DPI).
  • prepress: Lossless, commercial-grade print quality (300 DPI+).

Example: ilovecli c report.pdf -p printer

Video Adjustments (HEVC)

ilovecli utilizes libx265 (HEVC) for video, cutting file sizes in half compared to older h264 standards. You can manually adjust the Constant Rate Factor (-c).

  • Lower CRF (18): Visually lossless quality, larger file sizes.
  • Higher CRF (35): Maximum compression, noticeable quality reduction.

Example: ilovecli c raw_footage.mp4 -c 28


🛠 System Diagnostics

Verify the integrity of your installed dependencies (FFmpeg/Ghostscript) at any time:

ilovecli doctor

🐳 Docker Deployment

For CI/CD pipelines or users who wish to avoid local dependency installations:

docker build -t ilovecli .
docker run --rm -v $(pwd):/data ilovecli c /data/huge_file.pdf

📄 License & Contributing

Distributed under the MIT License. We welcome pull requests, bug reports, and ideas! If this tool has accelerated your workflow or saved your server space, please consider leaving a ⭐ on the repository.

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

ilovecli-1.0.2.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

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

ilovecli-1.0.2-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file ilovecli-1.0.2.tar.gz.

File metadata

  • Download URL: ilovecli-1.0.2.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for ilovecli-1.0.2.tar.gz
Algorithm Hash digest
SHA256 f4b984753a0b03493422f62b4a97c1c0df4e96842df5fd389961f2270a71fa66
MD5 c1f217458d5861549d75471e7c6f199c
BLAKE2b-256 465e030f0453c27cef89b7406387d8c2263a58d8a634e81a57d0fbcf40111dfd

See more details on using hashes here.

File details

Details for the file ilovecli-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ilovecli-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for ilovecli-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cce14dbcbf8771d26007d8b6a9f87faaa2d98f1c6a8456687b5daa9ba333acb5
MD5 b66b38fc256e18aec24652bdc3d306c8
BLAKE2b-256 5bef58259f8c6765753d14dc33b6be7a800724f428662d0a7624879c63767ab5

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