Code Monkey home page Code Monkey logo

dallecli's Introduction

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 2 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.

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 2 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.
  --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.
  --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:
  --help  Show this message and exit.

Please feel to create issues or request for features. There will be many features added to the cli.

dallecli's People

Contributors

ctrlcctrlv avatar dependabot[bot] avatar raiyanyahya avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.