cmdutils
A fast, zero-bloat CLI utility toolbox, written in Rust.
One binary. Every util you actually use. Nothing you don't.
Table of Contents
Why cmdutils
The internet is full of "free" PDF, image, and file tools that come wrapped in pop up ads, tracking scripts, and a GUI you have to fight with just to compress one image.
cmdutils takes a different approach:
| Web Tools | GUI Apps | cmdutils |
|---|
| Works offline | No | Yes | Yes |
| Zero telemetry | No | Sometimes | Yes |
| Zero adware | No | Sometimes | Yes |
| Scriptable / pipeable | No | No | Yes |
| Single static binary | No | No | Yes |
| Embeddable in your app | No | No | Yes |
Architecture
cmdutils splits its core into two layers:
subnet: a category of utilities for a given domain (for example image, pdf, text)
util: a single command inside a subnet (for example compress inside image)
cmdutils
└── subnets
├── image (subnet)
│ ├── resize (util)
│ ├── compress (util)
│ ├── convert (util)
│ ├── metadata (util)
│ ├── crop (util)
│ ├── rotate (util)
│ ├── grayscale (util)
│ ├── watermark (util)
│ └── strip (util)
└── text (subnet)
├── count (util)
├── case (util)
├── replace (util)
├── base64 (util)
└── checksum (util)
This design keeps the core small while making it simple to add new subnets, such as pdf or archive, without touching existing code.
Utils Supported
image subnet
| Util | Description | Status |
|---|
resize | Resize an image to exact dimensions (any format) | Stable |
compress | Compress an image (PNG: lossless max; JPEG/WebP: quality 1–100; others: re-encode) | Stable |
convert | Convert between any supported formats (PNG, JPEG, WebP, BMP, GIF, TIFF, AVIF, SVG, and more) | Stable |
metadata | Extract and display image metadata (EXIF, dimensions, color); optional PDF report | Stable |
crop | Crop an image to a WxH+X+Y region | Stable |
rotate | Rotate clockwise in 90° steps | Stable |
grayscale | Convert an image to grayscale | Stable |
watermark | Overlay semi-transparent text on an image (bundled fallback font — works with no system fonts) | Stable |
strip | Remove all embedded metadata (EXIF, comments) | Stable |
All image utils accept glob patterns (e.g. *.png) and process matches in parallel.
text subnet
| Util | Description | Status |
|---|
count | Count lines, words, characters, and bytes (file or stdin) | Stable |
case | Convert between upper, lower, title, snake, kebab, camel, pascal, constant | Stable |
replace | Find & replace (in-place, output file, or stdout) | Stable |
base64 | Encode / decode base64 (file or stdin) | Stable |
checksum | Compute md5, sha256, or sha512 hashes | Stable |
More subnets (pdf, archive) are on the roadmap.
Installation#clone and build from source
git clone https://github.com/aaravmaloo/cmdutils.git
cd cmdutils
cargo build --release
``` #install via winget ```
winget install aaravmaloo.cmdutils
#install via AUR
yay -S cmdutils-bin
---
## Usage
```bash
cmdutils [options]
Examples:
# Resize an image to 800x600
cmdutils image resize input.png 800x600
# Compress a JPEG to 70% quality
cmdutils image compress photo.jpg 70
# Convert PNG to JPEG
cmdutils image convert logo.png jpg
# Crop a 400x300 region from a photo
cmdutils image crop photo.png 400x300+50+40
# Watermark every PNG in a folder (parallel batch)
cmdutils image watermark '*.png' --text "© 2026"
# Count words in a file
cmdutils text count notes.txt
# Convert to snake_case from stdin
cmdutils text case --to snake --text "Hello World"
# Verify a download
cmdutils text checksum file.iso --algo sha256
Contributing
Contributions, issues, and feature requests are welcome.
- Fork the repo
- Create your feature branch (
git checkout -b feature/new-subnet)
- Commit your changes
- Open a PR
License
Licensed under the MIT License. See LICENSE for details.
The bundled watermark font (Roboto, latin subset) is © Google and licensed
under the Apache License 2.0.
No ads. No trackers. Just utils.