[![Actions Status](https://github.com/raiyanyahya/dallecli/workflows/Build%20Test/badge.svg)](https://github.com/raiyanyahya/dallecli/actions) [![Actions Status](https://github.com/raiyanyahya/dallecli/workflows/Package%20Release/badge.svg)](https://github.com/raiyanyahya/dallecli/actions) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=raiyanyahya_dallecli&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=raiyanyahya_dallecli)[![CodeQL](https://github.com/raiyanyahya/dallecli/workflows/CodeQL/badge.svg)](https://github.com/raiyanyahya/dallecli/actions?query=workflow%3ACodeQL) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/851417bc6ec8405ba244438fe31dae55)](https://www.codacy.com/gh/raiyanyahya/dallecli/dashboard?utm_source=github.com&utm_medium=referral&utm_content=raiyanyahya/dallecli&utm_campaign=Badge_Grade) [![](https://img.shields.io/badge/python-3.6+-blue.svg)]
[![PyPI version](https://badge.fury.io/py/dallecli.png)](https://badge.fury.io/py/dallecli)[![PyPI download month](https://img.shields.io/pypi/dm/dallecli.svg)](https://pypi.python.org/pypi/dallecli/)
# DalleCli π
`dallecli` is a community-maintained cli designed to provide users with the ability to generate, edit and filter images using the DALL-E 3 API provided by OpenAI, all from the command line.
The tool provides three main commands, generate, edit, and filter.
The `generate` command allows the user to generate an image using a prompt, with the option to apply a filter, specify the size, and choose the number of times to generate the image. The generated image can also be saved to a specified file path.
The `edit` command provides the ability to edit an existing image by adjusting the brightness, contrast, and sharpness of the image. The edited image is then saved to a new file.
The `filter` command allows users to apply various filters and effects to an existing image. The user can select from a range of different filters, and the filtered image can be saved to a specified file path.
This is ideal for developers, designers, and anyone who wants to quickly generate and manipulate images without the need for a full-fledged image editing software. I hope you find it useful.
## Note
The image generations endpoint allows you to create an original image given a text prompt. When using DALLΒ·E 3, images can have a size of 1024x1024, 1024x1792 or 1792x1024 pixels.
By default, images are generated at standard quality, but when using DALLΒ·E 3 you can set quality: "hd" for enhanced detail. Square, standard quality images are the fastest to generate.
You can request 1 image at a time with DALLΒ·E 3 (request more by making parallel requests)
Read more here https://platform.openai.com/docs/guides/images/introduction
## Configuration
The cli requires you to have an api token to query the OpenAI's api. You can read about and get it here https://platform.openai.com/account/api-keys.
## Installation
Install the dallecli python package directly from pypi.
```console
pip install dallecli
```
I would recommend using pipx instead of pip to install cli applications on you machine.
## Usage
```console
Usage: dallecli [OPTIONS] COMMAND [ARGS]...
π Use the Dall.E 3 api to generate, edit & filter images from the cmd line.
Options:
--help Show this message and exit.
Commands:
edit π΄ Change the brightness, contrast and sharpness of an image.
filter π¦ Apply filters and effects to an image.
generate πΈ Generate an image from the OpenAI Dalle api.
update π Update the OpenAI API key.
```
### Commands and Options
**```generate```**
```console
Usage: dallecli generate [OPTIONS]
πΈ Generate an image from the OpenAI Dalle api
Options:
--prompt TEXT π¬ The prompt to generate the image from.
--size TEXT π The size of the generated image (default 1024x1024).
--filter π¨ Apply a filter to the generated image.
--iterations INTEGER π The number of times to generate the image.
--save-path FILE πΎ Save the generated image to the specifiedfile path.
--hide FLAG π±οΈ Do not open the image after generation.
--quality TEXT π The quality of the image ( "standard" or "hd" ).
--model TEXT π¦Ύ The OpenAI model to use when generating images ( use dall-e-2 for older model)
--help Show this message and exit.
```
**```edit```**
```console
Usage: dallecli edit [OPTIONS] IMAGE_PATH
π΄ Change the brightness, contrast and sharpness of an image.
Options:
--brightness FLOAT π‘ The brightness of the image
--contrast FLOAT π The contrast of the image
--sharpness FLOAT πͺ The sharpness of the image
--help Show this message and exit.
```
**```filter```**
```console
Usage: dallecli filter [OPTIONS] IMAGE_PATH
π¦ Apply filters and effects to an image.
Options:
--filter [grayscale|sepia|blur|contour|detail|edge_enhance|edge_enhance_more|emboss|find_edges|sharpen|smooth|smooth_more|outline|posterize|solarize|invert|flip]
π¨ The filter to apply to the image
--save-path PATH The directory to save the filtered image.
Defaults to the current directory.
--help Show this message and exit.
```
**```update```**
```console
Usage: dallecli update [OPTIONS]
π Update the OpenAI API key.
Options:
--env β»οΈ Get the api key from the OPENAI_API_KEY env variable
--help Show this message and exit.
```
Please feel to create issues or request for features. There will be many features added to the cli.
Raw data
{
"_id": null,
"home_page": "https://github.com/raiyanyahya/dallecli",
"name": "dallecli",
"maintainer": "",
"docs_url": null,
"requires_python": ">3.8",
"maintainer_email": "",
"keywords": "cli,developer tools,productivity,openai,generative art,ai",
"author": "Raiyan Yahya",
"author_email": "raiyanyahyadeveloper@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b0/ad/de74c5fbd68d951643dc0d031fff44d1f9c1316f95122deb2c85b5bced79/dallecli-2.2.0.tar.gz",
"platform": null,
"description": "[![Actions Status](https://github.com/raiyanyahya/dallecli/workflows/Build%20Test/badge.svg)](https://github.com/raiyanyahya/dallecli/actions) [![Actions Status](https://github.com/raiyanyahya/dallecli/workflows/Package%20Release/badge.svg)](https://github.com/raiyanyahya/dallecli/actions) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=raiyanyahya_dallecli&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=raiyanyahya_dallecli)[![CodeQL](https://github.com/raiyanyahya/dallecli/workflows/CodeQL/badge.svg)](https://github.com/raiyanyahya/dallecli/actions?query=workflow%3ACodeQL) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/851417bc6ec8405ba244438fe31dae55)](https://www.codacy.com/gh/raiyanyahya/dallecli/dashboard?utm_source=github.com&utm_medium=referral&utm_content=raiyanyahya/dallecli&utm_campaign=Badge_Grade) [![](https://img.shields.io/badge/python-3.6+-blue.svg)] \n[![PyPI version](https://badge.fury.io/py/dallecli.png)](https://badge.fury.io/py/dallecli)[![PyPI download month](https://img.shields.io/pypi/dm/dallecli.svg)](https://pypi.python.org/pypi/dallecli/)\n\n# DalleCli \ud83d\udca0\n\n`dallecli` is a community-maintained cli designed to provide users with the ability to generate, edit and filter images using the DALL-E 3 API provided by OpenAI, all from the command line.\n\nThe tool provides three main commands, generate, edit, and filter.\n\nThe `generate` command allows the user to generate an image using a prompt, with the option to apply a filter, specify the size, and choose the number of times to generate the image. The generated image can also be saved to a specified file path.\n\nThe `edit` command provides the ability to edit an existing image by adjusting the brightness, contrast, and sharpness of the image. The edited image is then saved to a new file.\n\nThe `filter` command allows users to apply various filters and effects to an existing image. The user can select from a range of different filters, and the filtered image can be saved to a specified file path.\n\nThis is ideal for developers, designers, and anyone who wants to quickly generate and manipulate images without the need for a full-fledged image editing software. I hope you find it useful.\n\n## Note\n\nThe image generations endpoint allows you to create an original image given a text prompt. When using DALL\u00b7E 3, images can have a size of 1024x1024, 1024x1792 or 1792x1024 pixels.\n\nBy default, images are generated at standard quality, but when using DALL\u00b7E 3 you can set quality: \"hd\" for enhanced detail. Square, standard quality images are the fastest to generate.\n\nYou can request 1 image at a time with DALL\u00b7E 3 (request more by making parallel requests) \n\nRead more here https://platform.openai.com/docs/guides/images/introduction\n\n## Configuration\n\nThe cli requires you to have an api token to query the OpenAI's api. You can read about and get it here https://platform.openai.com/account/api-keys.\n\n## Installation\n\nInstall the dallecli python package directly from pypi. \n\n```console\n pip install dallecli\n```\nI would recommend using pipx instead of pip to install cli applications on you machine.\n\n## Usage\n\n```console\nUsage: dallecli [OPTIONS] COMMAND [ARGS]...\n\n \ud83d\udca0 Use the Dall.E 3 api to generate, edit & filter images from the cmd line.\n\nOptions:\n --help Show this message and exit.\n\nCommands:\n edit \ud83c\udfb4 Change the brightness, contrast and sharpness of an image.\n filter \ud83e\udd84 Apply filters and effects to an image.\n generate \ud83c\udf38 Generate an image from the OpenAI Dalle api.\n update \ud83d\udd10 Update the OpenAI API key.\n```\n\n### Commands and Options\n\n**```generate```**\n```console\nUsage: dallecli generate [OPTIONS]\n\n \ud83c\udf38 Generate an image from the OpenAI Dalle api\n\nOptions:\n --prompt TEXT \ud83d\udcac The prompt to generate the image from.\n --size TEXT \ud83d\udcd0 The size of the generated image (default 1024x1024).\n --filter \ud83c\udfa8 Apply a filter to the generated image.\n --iterations INTEGER \ud83d\udd04 The number of times to generate the image.\n --save-path FILE \ud83d\udcbe Save the generated image to the specifiedfile path.\n --hide FLAG \ud83d\uddb1\ufe0f Do not open the image after generation.\n --quality TEXT \ud83d\udc4c The quality of the image ( \"standard\" or \"hd\" ).\n --model TEXT \ud83e\uddbe The OpenAI model to use when generating images ( use dall-e-2 for older model)\n --help Show this message and exit.\n```\n\n**```edit```**\n```console\nUsage: dallecli edit [OPTIONS] IMAGE_PATH\n\n \ud83c\udfb4 Change the brightness, contrast and sharpness of an image.\n\nOptions:\n --brightness FLOAT \ud83d\udca1 The brightness of the image\n --contrast FLOAT \ud83c\udf08 The contrast of the image\n --sharpness FLOAT \ud83d\udd2a The sharpness of the image\n --help Show this message and exit.\n```\n\n**```filter```**\n```console\nUsage: dallecli filter [OPTIONS] IMAGE_PATH\n\n \ud83e\udd84 Apply filters and effects to an image.\n\nOptions:\n --filter [grayscale|sepia|blur|contour|detail|edge_enhance|edge_enhance_more|emboss|find_edges|sharpen|smooth|smooth_more|outline|posterize|solarize|invert|flip]\n \ud83c\udfa8 The filter to apply to the image\n --save-path PATH The directory to save the filtered image.\n Defaults to the current directory.\n --help Show this message and exit.\n```\n\n**```update```**\n```console\nUsage: dallecli update [OPTIONS]\n\n \ud83d\udd10 Update the OpenAI API key.\n\nOptions:\n --env \u267b\ufe0f Get the api key from the OPENAI_API_KEY env variable\n --help Show this message and exit.\n```\n\nPlease feel to create issues or request for features. There will be many features added to the cli.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A command line application to help wrap the OpenAI Dalle 3 api and other utilities.",
"version": "2.2.0",
"project_urls": {
"Homepage": "https://github.com/raiyanyahya/dallecli"
},
"split_keywords": [
"cli",
"developer tools",
"productivity",
"openai",
"generative art",
"ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "858585e6923d600f2303d61f7857a96fce38585f32693b1816cea6815dc1addf",
"md5": "d7d6bcfe188ab69ab52792359a14942e",
"sha256": "48044373f3957f4e67d5950aa34d929c7647c55be466798d04d793b3031bd352"
},
"downloads": -1,
"filename": "dallecli-2.2.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "d7d6bcfe188ab69ab52792359a14942e",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">3.8",
"size": 7489,
"upload_time": "2024-01-06T19:11:09",
"upload_time_iso_8601": "2024-01-06T19:11:09.027272Z",
"url": "https://files.pythonhosted.org/packages/85/85/85e6923d600f2303d61f7857a96fce38585f32693b1816cea6815dc1addf/dallecli-2.2.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b0adde74c5fbd68d951643dc0d031fff44d1f9c1316f95122deb2c85b5bced79",
"md5": "73a1ffbf3271c6c7f5f0b7d0bcbf9746",
"sha256": "1ccfc2a6059b887acbf0edfbd1f85131619eddb347d73b84cd273ade7da5951b"
},
"downloads": -1,
"filename": "dallecli-2.2.0.tar.gz",
"has_sig": false,
"md5_digest": "73a1ffbf3271c6c7f5f0b7d0bcbf9746",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">3.8",
"size": 7646,
"upload_time": "2024-01-06T19:11:10",
"upload_time_iso_8601": "2024-01-06T19:11:10.707421Z",
"url": "https://files.pythonhosted.org/packages/b0/ad/de74c5fbd68d951643dc0d031fff44d1f9c1316f95122deb2c85b5bced79/dallecli-2.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-06 19:11:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "raiyanyahya",
"github_project": "dallecli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "dallecli"
}