| Crates.io | milkshake |
| lib.rs | milkshake |
| version | 0.1.1 |
| created_at | 2025-09-21 21:40:38.004938+00 |
| updated_at | 2025-09-21 22:23:10.286459+00 |
| description | Seamless CLI for Google's Nano Banana (Gemini 2.5 Flash Image Preview) model |
| homepage | https://github.com/gregkonush/milkshake |
| repository | https://github.com/gregkonush/milkshake |
| max_upload_size | |
| id | 1849230 |
| size | 97,771 |
Milkshake is an open-source CLI that turns plain text prompts into images using Google's Nano Banana (Gemini 2.5 Flash Image Preview) model, then ships the PNG straight to your clipboard and disk. It is designed to feel invisible—developers type one command and instantly have a shareable visual ready for social, docs, or prototypes.
~/Pictures/milkshake/ (or a provided path) with UUID filenames.Grab an API key – Visit Google AI for Developers and ensure your key has access to the Nano Banana (gemini-2.5-flash-image-preview) model.
Export the key:
export GOOGLE_API_KEY="your-key"
Install Milkshake from source (until a crates.io release is available):
cargo install --path .
Or build a release binary directly:
cargo build --release
Generate your first image:
milkshake "A Gemini-branded nano banana dessert plated on a futuristic table"
Milkshake exits immediately if no prompt is provided and nothing is piped on STDIN, so be sure to pass text (or echo "prompt" | milkshake).
| Option | Description | Default |
|---|---|---|
GOOGLE_API_KEY |
API key used for authentication. | required |
MILKSHAKE_MODEL / -m, --model |
Gemini model identifier. | gemini-2.5-flash-image-preview |
--api-key <KEY> |
Override the environment variable inline. | – |
-o, --output <PATH> |
Write the image to an explicit path. | ~/Pictures/milkshake/milkshake-<uuid>.png (with sensible fallbacks) |
--no-copy |
Skip copying to the clipboard. | Clipboard enabled |
--timeout <SECONDS> |
Request timeout window. | 60 |
-q, --quiet |
Silence informational output. | Verbose |
--format <FORMAT> |
Output format (PNG today; extensible later). | png |
--no-copy.Milkshake prefers your Pictures directory (~/Pictures/milkshake/). If it cannot create that folder it will fall back to ./milkshake/ inside the current working directory. Supply --output to control the exact filename.
| Symptom | Fix |
|---|---|
Gemini API error ... response_mime_type |
You are likely hitting the REST API manually. Milkshake already requests the correct modalities; ensure your key has image-generation access. |
| CLI appears to hang | Running milkshake with no prompt waits for STDIN. Provide a prompt argument or pipe data. |
| Clipboard unavailable warning | Ensure you have clipboard access (Linux desktop session) or use --no-copy. |
Required toolchain: Rust 1.80+ (edition 2024).
Formatting & linting:
cargo fmt
Build & test:
cargo build
cargo test
Create a release build:
cargo build --release
Before opening a PR, run the commands above and ensure the README, CHANGELOG, and version number are updated as appropriate.
MIT © 2025 Greg Konush