ImgBB CLI (imgbb-cli)
A lightweight, production-ready Command Line Interface (CLI) tool and Python library for uploading images directly to ImgBB with beautiful terminal formatting via Rich.
Features
- Environment Variable Support: Automatically reads
IMGBB_API_KEY. - Rich Terminal UI: Includes upload progress bars, emojis, and cleanly sectioned outputs.
- Flexible Output Formats: Choose between sectionized rich view (
--format pretty) or raw JSON (--format json) for scripting. - Advanced Options: Custom naming and auto-expiration timers.
Installation
Clone this repository or install it locally in editable mode:
pip install imgbb-cli
pip install . or pip install -e . # dev mode
Configuration
Set your API key as an environment variable:
Windows (PowerShell / CMD)
setx IMGBB_API_KEY "your_api_key_here"
Linux / macOS (Bash / Zsh)
export IMGBB_API_KEY="your_api_key_here"
Usage
Usage: imgbb [-h] [-k API_KEY] [-e EXPIRATION] [-n NAME]
[-f {pretty,json,url,display_url,delete_url,thumb_url,medium_url}]
[IMAGES ...]
A production-ready CLI tool to upload images to ImgBB with wildcard support and flexible outputs.
Positional Arguments:
IMAGES Path or wildcard pattern to the image file(s) to upload (e.g., *.jpg,
image?.png, *).
Options:
-h, --help show this help message and exit
-k, --key API_KEY ImgBB API key. Can also be set via IMGBB_API_KEY environment variable.
-e, --expiration EXPIRATION
Enable auto-deletion after given seconds (60-15552000).
-n, --name NAME Custom name for the uploaded image file (applicable if uploading a single
file).
-f, --format {pretty,json,url,display_url,delete_url,thumb_url,medium_url}
Output format style or specific JSON field to extract: - pretty : Rich
formatted panel view (default) - json : Full raw JSON response - url :
Direct image URL only - display_url : Viewer / display page URL only -
delete_url : Deletion URL only - thumb_url : Thumbnail URL only -
medium_url : Medium image URL only
1. Standard Rich Output (Default)
Uploads the image with an interactive progress bar and structured, colorized sections:
imgbb-cli photo.png
2. Raw JSON Output (For Automation / Scripting)
If you want to parse the output in scripts, use --format json:
imgbb-cli photo.png --format json
3. Available Options
-k,--key: Provide ImgBB API key explicitly.-e,--expiration: Set auto-deletion time in seconds (e.g.,86400for 1 day).-n,--name: Specify a custom name for the uploaded file.-f,--format: Output format style (prettyorjson). Default ispretty.-h,--help: Show help message.
Example with options:
imgbb-cli banner.png -e 3600 -n my_banner -f pretty
License
👤 Author
Metadata
Release files for imgbb-cli 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| imgbb_cli-1.0.2.tar.gz | 7.9 kB | Without provenance | Details for imgbb_cli-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imgbb_cli-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for imgbb_cli-1.0.2-py3-none-any.whl |
Total release size: 16.5 kB
Release files / imgbb_cli-1.0.2.tar.gz
| Download URL | imgbb_cli-1.0.2.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be56337149f40937f7d07e4470f2cfe3876761ce17a26f011e93745d2bdb1888
|
|
BLAKE2b-256 checksum How to use checksums |
266168e5be91132433edefdea24c89640bedd1644652cd5c506532fc0ab8d583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Release files / imgbb_cli-1.0.2-py3-none-any.whl
| Download URL | imgbb_cli-1.0.2-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57f5f5d0e8cda5e001f599598a1b03ae87c1cf48bc17f333cd801aaa92db4c83
|
|
BLAKE2b-256 checksum How to use checksums |
9b99839ad2d0d5a82cdb0aaa03922827eeb33c998c7e2c4c4ffc4ea2390e548a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|
Security for imgbb-cli 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.