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.2.tar.gz (12.3 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.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: minipil-0.1.2.tar.gz
  • Upload date:
  • Size: 12.3 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.2.tar.gz
Algorithm Hash digest
SHA256 5dd07949adcc93a05b1d1f94be5c3049ce82975231b00805bb28c9f9fd1e36d2
MD5 2378f1102dc6c64becc65a2fab288ae9
BLAKE2b-256 2de530a0faeed67610dc263ffb2b6e70c628ec51f4eaa4551dba9bf734524fa9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: minipil-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e461329561f44eb4f73dc4ffa1c6c44deff5c233126cf06cebc929f6cb3bab3
MD5 c935513643bc4fc05b67a57aaca80ce9
BLAKE2b-256 d54d310121d75e9d30b5f4ecec33a57c315039fd45b4adae4e3db95709e4bc00

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