A Rust CLI tool for generating memes using OpenAI's DALL-E 3 API.
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.
- Fast meme generation using DALL-E 3
- Automatic UUID-based file organization
- Optimized for classic meme format (top/bottom text, bold styling)
- Async/await for efficient API calls
- Configurable output directories
- Rust (latest stable version)
- OpenAI API key
git clone https://github.com/Programmer-RD-AI/memer.rs.git
cd memer.rs
cargo build --release
cargo install memer-rs
- Get an OpenAI API key from OpenAI Platform
- Create a
.env
file in the project root:
OPENAI_API_KEY=your_api_key_here
memer --query "when you finally understand Rust ownership"
memer --query "debugging at 3am" --folder my_memes
memer --help
-q, --query <QUERY>
: The meme description/topic (required)-f, --folder <FOLDER>
: Output directory (default: random UUID)
# 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"
Generated images are saved as 1024x1024 PNG files in the specified directory. The tool automatically creates the directory if it doesn't exist.
- Language: Rust 2024 edition
- Image Model: DALL-E 3
- Image Format: Base64 JSON → PNG
- Image Size: 1024x1024 pixels
- Async Runtime: Tokio
async-openai
: OpenAI API clientclap
: Command-line argument parsingtokio
: Async runtimedotenv
: Environment variable loadingminijinja
: Template renderinguuid
: Unique identifier generation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Apache License 2.0
- OpenAI for the DALL-E 3 API
- The Rust community for excellent crates
Note: This tool requires an active OpenAI API subscription. Image generation costs apply according to OpenAI's pricing.