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

Uploaded Python 3

File details

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

File metadata

  • Download URL: figmaker-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 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.0.tar.gz
Algorithm Hash digest
SHA256 5a9a6a78122b097dbd74ba3db20287d9934ade94243caedefc8b6d7bbfe121fc
MD5 f32a713f872e1ef6ccfea06bf3847c4f
BLAKE2b-256 e6ebfff29b95d23da5c3210a8524e224772f13355f543a0a3d3eac4080f58967

See more details on using hashes here.

File details

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

File metadata

  • Download URL: figmaker-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d3f8295e5932e11e2b88c749f567c753582f8cf442af6984b99007a5264902e
MD5 bdff1a69485dc8d07f0f88d70e8cdae9
BLAKE2b-256 a0645960449f0486360d8768cfbfd5325f690c957a71c3e177217957dfd678ae

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