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.1.0.tar.gz (5.0 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.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for figmaker-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d1fdceb4b405a1c888981cac3a4678869e3b339ba4d01fb79af97a0e4e7bc84e
MD5 798b38807c37a2861631d416d2faf6b5
BLAKE2b-256 fe9f57c97be7ec95164a260125c27e69f9deaacb7526d3fb809eacd5515a6579

See more details on using hashes here.

File details

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

File metadata

  • Download URL: figmaker-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ce1e372be6c9d7e1d5782131bbc9c1370ab33f71d263a9df88ea9420a8e69e2
MD5 fc3608939abb7a0da5792edf62e6b6ec
BLAKE2b-256 f704e7a7817c240bfe7be1c9ed0fd2391ab3fa30acc50209df5857eebfab1d65

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