Gemini CLI + Inliner.ai Integration - AI Image Generation | Inliner.ai

Gemini CLI + Inliner.ai

Give Google's Gemini CLI the power to generate AI images. With the Inliner MCP server, Gemini can create, edit, and manage images directly from your terminal.

Google Gemini AI terminal interface with colorful gradient design

Prerequisites

Quick Setup

Step 1: Get Your API Key

  1. Log into your Inliner.ai dashboard
  2. Go to Account > API Keys
  3. Click Create API Key and copy the key

Step 2: Configure MCP Server

Add the Inliner MCP server to your Gemini CLI settings:

~/.gemini/settings.json

{
  "mcpServers": {
    "inliner": {
      "command": "npx",
      "args": ["@inliner/mcp-server"],
      "env": {
        "INLINER_API_KEY": "inl_your-api-key-here"
      }
    }
  }
}

Step 3: Restart Gemini CLI

Close and reopen Gemini CLI to load the MCP server. You should see "inliner" in your available tools.

Tip: You can also set your API key as an environment variable: export INLINER_API_KEY=inl_xxx

What Gemini Can Do

With the Inliner MCP server, Gemini CLI gains these capabilities:

Example Interactions

"Generate a hero image for my fintech landing page and save it to ./images/hero.png"

I'll create that hero image for you. Let me generate a professional fintech-themed image...

Done! Image saved to ./images/hero.png

"How many image credits do I have?"

You have 234 Image Credits remaining this month on your Standard plan.

Using with @inliner/cli

You can also use the standalone Inliner CLI alongside Gemini for batch operations:

Terminal

# Generate images directly from terminal
npx @inliner/cli "hero-banner_1200x600.png" -p myproject

# Batch process with Unix pipes
cat prompts.txt | xargs -I {} npx @inliner/cli "{}_800x600.png" -p myproject

See the CLI documentation for more examples.

Resources

Ready to Add Image Generation to Gemini CLI?

Get your API key and start generating images in minutes