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.2.0.tar.gz (5.3 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.2.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for figmaker-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5b0e43786dd28e781582865dd7f114ec9a2678ec7da8d75ddee9546fa7b537bc
MD5 e4d5d2f0ed826afd9ba898afc6b6bd61
BLAKE2b-256 583806fac73dc320b580c4f4b9b8686277b89f19dfb403db7fa2d8b54bd0a8aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: figmaker-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b47e2a90df3a69be67ec115b4842cb8efe1cbdbb61b0e3dec4389d52588b0928
MD5 746f68b45e48035e55536161c3a65949
BLAKE2b-256 8762b04eb0909652132bc475e0d845a1628ca9356378511c326e2606711a8545

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