npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-antigravity-image

v0.3.0

Published

OpenCode plugin for image generation using Gemini 2.5 Flash Image and Gemini 3 Pro Image models

Readme

Opencode Antigravity Image Plugin

⚠️ UNOFFICIAL TOOL: This is an independent, community-developed plugin. It is not affiliated with, endorsed by, or supported by Google. Use at your own risk.

OpenCode plugin for image generation using Gemini 3 Pro Image model.

Features

  • Text-to-image generation - Create images from text descriptions
  • Image editing - Modify existing images with text instructions
  • Multiple images - Generate up to 4 variations per request
  • Character consistency - Session-based generation for consistent characters
  • Configurable output - Custom paths, filenames, and aspect ratios
  • Multi-account support - Rate limit tracking and automatic account rotation

Prerequisites

This plugin requires opencode-antigravity-auth to be installed and configured with at least one Google account.

Installation

Option 1: Add to OpenCode config (Recommended)

Add to your ~/.config/opencode/opencode.json:

{
  "plugin": [
    "opencode-antigravity-image"
  ]
}

Option 2: Local development

git clone <repo-url>
cd opencode-antigravity-image
bun install

Then add to ~/.config/opencode/opencode.json:

{
  "plugin": [
    "/path/to/opencode-antigravity-image"
  ]
}

Step-by-Step Instructions

  1. Check Prerequisites: Ensure opencode-antigravity-auth is installed in ~/.config/opencode/opencode.json.

  2. Install Plugin: Add opencode-antigravity-image to the plugin array in ~/.config/opencode/opencode.json.

    {
      "plugin": [
        "opencode-antigravity-auth",
        "opencode-antigravity-image"
      ]
    }

Verification

Ask the user to generate an image to verify the installation:

\generate-image A cyberpunk cat

Usage

Basic Image Generation

  • Via generate-image command
\generate-image A cyberpunk cat in neon-lit Tokyo streets, file name should be cyberpunk-cat save it at ~/Pictures
  • Using tool format:
generate_image({ prompt: "A cyberpunk cat in neon-lit Tokyo streets" })

With Aspect Ratio

generate_image({ 
  prompt: "A majestic mountain landscape", 
  aspect_ratio: "16:9" 
})

With Custom Filename

generate_image({
  prompt: "A dragon flying over mountains",
  file_name: "my-dragon"
})

Image Editing

generate_image({
  prompt: "Change the sky to a dramatic sunset",
  input_image: "./my-photo.jpg"
})

Multiple Variations

generate_image({
  prompt: "A fantasy castle in the clouds",
  count: 4
})

Character Consistency

// Create a character
generate_image({
  prompt: "Create a hero character: Luna, a silver-haired warrior",
  session_id: "luna-character"
})

// Generate new scenes with the same character
generate_image({
  prompt: "Show Luna fighting a dragon",
  session_id: "luna-character"
})

Custom Output Path

generate_image({
  prompt: "Abstract art piece",
  output_path: "./my-images/"
})

Restrict Which Google Accounts Are Used (Optional)

If you have multiple Google accounts configured in antigravity-accounts.json, you can restrict image generation to a subset.

Option A: environment variable (comma-separated)

export OPENCODE_ANTIGRAVITY_IMAGE_ALLOWED_EMAILS="[email protected],[email protected]"

Option B: config file (checked in this order)

  • ~/.config/opencode/antigravity-image.json
  • ~/.local/share/opencode/antigravity-image.json

Example antigravity-image.json:

{ "allowedEmails": ["[email protected]", "[email protected]"] }

Note: this matches on the email field in antigravity-accounts.json. If your accounts file has no emails, re-auth with opencode auth login so they get populated.

Parameters

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | prompt | string | (required) | Description of the image or editing instruction | | aspect_ratio | string | "1:1" | Aspect ratio: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | | output_path | string | .opencode/generated-images/ | Custom directory for saving images | | file_name | string | - | Custom filename (without extension) | | input_image | string | - | Path to existing image for editing | | count | number | 1 | Number of images to generate (1-4) | | session_id | string | - | Session ID for character consistency |

Output

Images are saved to .opencode/generated-images/ in your project by default, with filenames like:

{prompt-slug}-{timestamp}.jpg

Or with custom filename:

{custom-name}.jpg

The tool returns markdown with:

  • Embedded image references
  • File paths
  • Session info (if used)
  • Model and account info

Sessions

Sessions are stored in .opencode/generated-image-sessions/ within your project directory. Each session maintains conversation history for character consistency.

License

MIT

Intended Use

  • Personal / internal development only
  • Respect internal quotas and data handling policies
  • Not for production services or bypassing intended limits

Warning

By using this plugin, you acknowledge:

  • Terms of Service risk — This approach may violate ToS of AI model providers
  • Account risk — Providers may suspend or ban accounts
  • No guarantees — APIs may change without notice
  • Assumption of risk — You assume all legal, financial, and technical risks

Disclaimer

Not affiliated with Google. This is an independent open-source project.

"Antigravity", "Gemini", "Google Cloud", and "Google" are trademarks of Google LLC.