Skip to main content

Actions Status Actions Status Quality Gate StatusCodeQL Codacy Badge [] PyPI versionPyPI download month

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.

  pip install dallecli

I would recommend using pipx instead of pip to install cli applications on you machine.

Usage

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

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

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

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

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.

Metadata

Release files for dallecli 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dallecli 2.2.0
File Size Uploaded Provenance Actions
dallecli-2.2.0.tar.gz 7.6 kB Without provenance Details for dallecli-2.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dallecli 2.2.0
File Interpreter ABI Platform Actions
dallecli-2.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for dallecli-2.2.0-py2.py3-none-any.whl

Total release size: 15.1 kB

Release files / dallecli-2.2.0.tar.gz

Download URL dallecli-2.2.0.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1ccfc2a6059b887acbf0edfbd1f85131619eddb347d73b84cd273ade7da5951b
BLAKE2b-256 checksum
How to use checksums
b0adde74c5fbd68d951643dc0d031fff44d1f9c1316f95122deb2c85b5bced79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Release files / dallecli-2.2.0-py2.py3-none-any.whl

Download URL dallecli-2.2.0-py2.py3-none-any.whl
Size 7.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
48044373f3957f4e67d5950aa34d929c7647c55be466798d04d793b3031bd352
BLAKE2b-256 checksum
How to use checksums
858585e6923d600f2303d61f7857a96fce38585f32693b1816cea6815dc1addf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.18

Security for dallecli 2.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page