memer.rs

A Rust CLI tool for generating memes using OpenAI’s DALL-E 3 API.

Docker Image Crates.io

Description

memer.rs is a command-line interface that allows you to generate meme images by simply providing a text query. The tool uses OpenAI’s DALL-E 3 model to create internet-style memes with bold, impact font text and high-contrast visuals.

Features

Installation

Prerequisites

From Source

git clone https://github.com/Programmer-RD-AI/memer.rs.git
cd memer.rs
cargo build --release

From Crates.io

cargo install memer-rs

Setup

  1. Get an OpenAI API key from OpenAI Platform
  2. Create a .env file in the project root:
OPENAI_API_KEY=your_api_key_here

Usage

Basic Usage

memer --query "when you finally understand Rust ownership"

Custom Output Directory

memer --query "debugging at 3am" --folder my_memes

Help

memer --help

Options

Examples

# Generate a programming meme
memer -q "when your code works on the first try"

# Generate a relatable meme with custom folder
memer -q "me explaining why I need another monitor" -f work_memes

# Generate a Rust-specific meme
memer -q "borrowing in Rust vs other languages"

Output

Generated images are saved as 1024x1024 PNG files in the specified directory. The tool automatically creates the directory if it doesn’t exist.

Technical Details

Dependencies

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

Apache License 2.0

Acknowledgments


Note: This tool requires an active OpenAI API subscription. Image generation costs apply according to OpenAI’s pricing.