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.
Prerequisites
- Google Gemini CLI installed (installation guide)
- An Inliner.ai account (free tier available)
- Node.js 18+ installed
Quick Setup
Step 1: Get Your API Key
- Log into your Inliner.ai dashboard
- Go to Account > API Keys
- 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:
- generate_image — Create images from text descriptions
- edit_image — Modify existing images with AI
- get_projects — List your Inliner projects
- get_usage — Check your credit balance
- list_images — Browse generated images
Example Interactions
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.