Skip to main content

minipil — mini Pillow-based CLI for NLP image edits

Project description

minipil

A mini-Pillow, natural-language image editor for your terminal.

minipil is a lightweight command-line tool that performs image editing using simple natural-language instructions. Resize, crop, compress, rotate, adjust brightness/contrast, convert to B&W, invert, blur, sharpen — all with one command.

No ML Models required

Ideal for exam photo requirements (GATE, passport photos, govt forms), quick batch edits, or automation scripts.

Installation

pip install minipil

1. Connect an image

minipil connect image.png

2. Apply edits (natural language)

minipil do "convert to bnw and resize to 400x500"

3. Save result

minipil save output.jpg

If no filename is given:

minipil save
→ saves as minipil.png in the current directory

Current minipil supports:

  1. Grayscale (BNW)
minipil do "convert to bnw"
minipil do "make it grayscale"
minipil do "black and white"
  1. Invert
minipil do "invert"
minipil do "invert colors"
  1. Blur
minipil do "blur 2"
minipil do "blur 4"
minipil do "gaussian blur 3.5"
  1. Sharpen
minipil do "sharpen"
minipil do "sharpen 2"
minipil do "sharpen 3.5"
  1. Brightness
minipil do "brightness +20%"
minipil do "increase brightness 15%"
minipil do "darken 10%"
minipil do "brightness -5%"
  1. Contrast
minipil do "contrast +25%"
minipil do "increase contrast 10%"
minipil do "decrease contrast 30%"
  1. Saturation
minipil do "saturation +40%"
minipil do "boost color 30%"
minipil do "desaturate 20%"
  1. Rotation
minipil do "rotate 90"
minipil do "rotate 180"
minipil do "rotate -45"
  1. Flip horizontal/vertical
minipil do "flip horizontal"
minipil do "flip h"
  1. Exact pixel resize
minipil do "400x600"
minipil do "resize to 300x300"
minipil do "make it 1024x768"
  1. Resize by width/height
minipil do "width 300"
minipil do "height 500"
minipil do "resize to width 600"
  1. Aspect ratio crop
minipil do "ratio 1:1"
minipil do "crop to 3:2"
minipil do "ratio 4:5"
  1. File size compression
minipil do "compress to 250kb"
minipil do "size 150kb"
minipil do "target 300kb"
minipil do "100kb"
  1. Format conversion
minipil do "convert to jpeg"
minipil do "convert to png"
minipil save output.jpg
minipil save image.webp
  1. Chained multi-action commands
minipil do "invert and blur 3 and rotate 90"
minipil do "convert to bnw, ratio 4:5, compress to 200kb"
minipil do "resize to 400x500 and brightness +20% and sharpen 2"
minipil do "saturation +40% and contrast -10% and flip horizontal"

Folder Structure


minipil/

 ├── cli.py          # CLI commands (connect, do, save)
 ├── core.py         # All image-processing functions
 ├── parser.py       # NL command parser
 ├── session.py      # Persistent session manager
 └── __init__.py
tests/
docs/
setup.py
README.md

Contributing

Contributions are very welcome! open issues for:

  • batch processing
  • smarter NLP

Created by - Yadhnika Wakde

With love and --force

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

minipil-0.1.1.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

minipil-0.1.1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file minipil-0.1.1.tar.gz.

File metadata

  • Download URL: minipil-0.1.1.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for minipil-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c8a773a08d4d5d7ad63e549d16694c1fb1d5306e19267462d6b692c59b2a2157
MD5 a3889c6b0664a3af9bbd886976f62f27
BLAKE2b-256 cc888b1168b355d5902abec13911fe7a3347744457fc0ef2ff6fa6b4f592673f

See more details on using hashes here.

File details

Details for the file minipil-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: minipil-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for minipil-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73a6f1d8dce017d4407d1e13aba4639cd4f950b4c46faf850badda469631324c
MD5 16d89487632dbcf7758dd04affcafe0c
BLAKE2b-256 a6b8feed855d040bca6d550106a62d98059474754de607ab9ce5d808b5ff3afe

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