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.3.0.tar.gz (5.4 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.3.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for figmaker-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a38346a76f2716ea0427dbe31396967a9c4a1a72ac332e94130f1ef3852bfb48
MD5 a31884e90192e2d830e4635a0041d837
BLAKE2b-256 6ab6cb83b906c8c7979400352c83398dfa0d953d53d330b4299f59c337b39510

See more details on using hashes here.

File details

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

File metadata

  • Download URL: figmaker-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 730b39a64fd2dd44ab2a12e055ef98718ec49d033a191c92aff693e2e4e64403
MD5 d8b4be2167e69ffacc8e1c745e791afd
BLAKE2b-256 b48515bc6297f559601105264342df702a1886e468456094bdf1b952a8ed6ddc

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