Skip to main content

A lightweight CLI toolkit for daily development utilities.

Project description

devbits

CLI style

devbits provides both a main command and standalone commands installed into your Python environment's PATH.

Main command style:

devbits clearcache .
devbits images2video frames/ -o output.mp4 --fps 30

Standalone command style:

clearcache .
images2video frames/ -o output.mp4 --fps 30
video2gif input.mp4 -o output.gif
clipvideo input.mp4 --start 3 --end 10 -o clip.mp4

After editable install, reopen the terminal or run hash -r if your shell does not immediately find the new commands.

devbits is a lightweight CLI toolkit for daily development utilities, including cache cleanup, media conversion, image helpers, dataset-like file operations, and project maintenance tools.

The project supports two CLI styles:

devbits <command> [options]
<command> [options]

Features

Project cleanup

devbits clearcache .
devbits clearcache . --all
devbits clearcache . --dry-run

Removes:

  • __pycache__/
  • *.pyc
  • *.pyo
  • optionally .pytest_cache/, .mypy_cache/, .ruff_cache/

Image and video conversion

devbits images2video ./frames -o output.mp4 --fps 30
devbits video2images input.mp4 -o ./frames --every 1
devbits images2gif ./frames -o output.gif --fps 10
devbits video2gif input.mp4 -o output.gif --fps 10 --start 2 --end 8
devbits clipvideo input.mp4 -o clip.mp4 --start 3 --end 10
devbits clipvideo input.mp4 -o clip.mp4 --start-frame 100 --end-frame 500
devbits resizevideo input.mp4 -o resized.mp4 --size 1280,720

Image utilities

devbits image2ico logo.png -o logo.ico
devbits resizeimage input.jpg -o output.jpg --size 640,480
devbits batchimages ./images -o ./resized --size 640,480 --format jpg
devbits checkimages ./images --recursive
devbits contactsheet ./images -o sheet.jpg --cols 5 --labels

Project utilities

devbits tree . --depth 3
devbits size . --top 20
devbits renamefiles ./images --prefix frame --digits 6
devbits renamefiles ./images --prefix frame --digits 6 --dry-run
devbits samplefiles ./images -o ./sample --num 100

Installation for local development

git clone https://github.com/yourname/devbits.git
cd devbits
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Check the CLI:

devbits --help
devbits images2video --help
clearcache --help
images2video --help

Build package

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*

Upload to TestPyPI

python -m twine upload --repository testpypi dist/*

Upload to PyPI

python -m twine upload dist/*

Commands

Command Description
clearcache Clear Python cache files.
images2video Convert image sequence to MP4 video.
video2images Extract frames from a video.
images2gif Convert image sequence to GIF.
video2gif Convert video to GIF.
clipvideo Clip video by seconds or frame indices.
resizevideo Resize a video.
image2ico Convert image to .ico.
resizeimage Resize an image.
batchimages Batch resize or convert images.
checkimages Check broken image files.
contactsheet Create a contact sheet.
tree Print a compact project tree.
size Show top-level folder/file sizes.
renamefiles Batch rename files.
samplefiles Copy or move first N files.

Roadmap

  • Interactive clipvideo --gui
  • mergevideos
  • comparevideos
  • concatframes
  • annotatevideo
  • watermark
  • splitdataset
  • countdataset
  • dedupimages
  • Optional ROS helpers under devbits[ros]

License

MIT

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

devbits-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

devbits-0.1.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file devbits-0.1.0.tar.gz.

File metadata

  • Download URL: devbits-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for devbits-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a711113818e43a9d7fdf1710ce0d47effa074bf40574119d3ad49c1cf92d4694
MD5 8d82b05735f687f089491a01e8f4289c
BLAKE2b-256 2c80593d0590adaf618579c5bf8a8e0092f9b7aecfc81b8ecac35b4a28cf74c5

See more details on using hashes here.

File details

Details for the file devbits-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: devbits-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for devbits-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d80ae5b8e628653128e099b7a78cd7c08d76b6e13dc5c7d323ebb8f0f968c20
MD5 a42ab0a281d3efcd69fc3940459eee22
BLAKE2b-256 ca1647d912b9dbb6dfd9f696edba96e6edfe9884b3c2266c92c6e5d985ce0f63

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