Skip to main content

AI-powered image generation and editing CLI tool using Gemini Nano Banana API

Project description

FigMaker

AI-powered image generation and editing CLI tool using Gemini Nano Banana API.

Installation

pip install figmaker

Quick Start

# Generate an image from text
figmaker generate "a cute cat wearing sunglasses" -o cat.png

# Generate with custom aspect ratio
figmaker generate "sunset over mountains" --aspect-ratio 16:9 -o sunset.png

# Edit an existing image
figmaker edit photo.jpg "add a wizard hat on the person" -o edited.png

# Generate image without text response
figmaker generate-only "kawaii red panda sticker" -o sticker.png

Setup

Before using FigMaker, you need a Google Gemini API key:

  1. Get your API key from Google AI Studio
  2. Set it as an environment variable:
export GOOGLE_API_KEY="your-api-key-here"

Or modify the nano_banana.py file directly with your key.

Commands

generate

Generate an image from a text prompt.

figmaker generate "your prompt here" -o output.png [--aspect-ratio RATIO]

Options:

  • -o, --output: Output file path (default: generated_image.png)
  • --aspect-ratio: Image aspect ratio (e.g., 16:9, 1:1, 9:16)

generate-only

Generate an image without any text response.

figmaker generate-only "your prompt here" -o output.png

edit

Edit an existing image based on a text prompt.

figmaker edit input.jpg "edit description" -o output.png

Arguments:

  • image: Path to input image
  • prompt: Text description of the edits to make
  • -o, --output: Output file path (default: edited_image.png)

Examples

# Create a restaurant scene
figmaker generate "nano banana dish in a fancy restaurant" -o dish.png

# Portrait with specific aspect ratio
figmaker generate "portrait of an elderly ceramicist" --aspect-ratio 16:9 -o portrait.png

# Edit an existing photo
figmaker edit cat.jpg "add a small wizard hat on its head" -o wizard_cat.png

# Generate a transparent sticker
figmaker generate-only "cute red panda sticker with transparent background" -o sticker.png

Requirements

  • Python 3.8+
  • google-genai >= 1.45.0
  • pillow >= 12.0.0

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

figmaker-1.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

figmaker-1.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file figmaker-1.0.1.tar.gz.

File metadata

  • Download URL: figmaker-1.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for figmaker-1.0.1.tar.gz
Algorithm Hash digest
SHA256 422896253abb18c892c82eab51008e1762563258a00c6d1cda04bcc0b5a0997c
MD5 3fd7fc2d322c3467a89fa45fd12bdb26
BLAKE2b-256 c0615876bb7c9a4cb6bdea9479b25d108adb83a66c8a778ee8eeeee77d9c77c5

See more details on using hashes here.

File details

Details for the file figmaker-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: figmaker-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for figmaker-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b1a484ec8931c48d38be01d4ad079fa20f351314ea33c766a8114a5d6633f419
MD5 a9c6f66b9ae735d31ec4f0751b2861c9
BLAKE2b-256 2597dcfb9cc9412bee61e606a8753d8a4ff5397da11c7af2967c08707caa83c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page