← All tools

paperfoot/nanaban-cli

Popularity 75 Updated AI & Agents

AI image generation CLI. One command, one image, three seconds. Gemini-powered.

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

<p align="center" <img src="nanabanlogo.png" alt="nanaban — image generation from the terminal" width="600" </p

<h1 align="center"nanaban</h1

<p align="center" Image generation from the terminal. <strongGPT Image 2 free on your ChatGPT Plus/Pro subscription</strong — no OpenAI API key, no metered billing. Plus Nano Banana (Gemini) and GPT-5 Image. One CLI. </p

<p align="center" <a href="https://github.com/paperfoot/nanaban-cli/stargazers"<img src="https://img.shields.io/github/stars/paperfoot/nanaban?style=for-the-badge&logo=github&label=%E2%AD%90%20Star%20this%20repo&color=yellow" alt="Star this repo"</a &nbsp; <a href="https://x.com/longevityboris"<img src="https://img.shields.io/badge/Follow%40longevityboris-000000?style=for-the-badge&logo=x&logoColor=white" alt="Follow @longevityboris on X"</a </p

<p align="center" <a href="https://www.npmjs.com/package/nanaban"<img src="https://img.shields.io/npm/v/nanaban?style=for-the-badge&logo=npm&logoColor=white&label=npm&color=CB3837" alt="npm version"</a <a href="https://www.npmjs.com/package/nanaban"<img src="https://img.shields.io/npm/dm/nanaban?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="npm downloads"</a <a href="https://github.com/paperfoot/nanaban-cli/blob/main/LICENSE"<img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="MIT License"</a <a href="https://nodejs.org"<img src="https://img.shields.io/node/v/nanaban?style=for-the-badge&logo=node.js&logoColor=white&color=339933" alt="Node.js version"</a </p

<p align="center" Type a prompt. Get an image. One command, zero browser tabs. nanaban is a CLI for AI image generation that works for humans typing prompts and LLM agents calling <code--json</code. It runs OpenAI's GPT Image 2 (free against your ChatGPT Plus/Pro subscription via Codex OAuth), Google's Nano Banana (Gemini), and OpenAI GPT-5 Image — pick whichever, or let nanaban choose based on the auth you have. </p

<p align="center" <a href="#install"Install</a · <a href="#quick-start"Quick Start</a · <a href="#models"Models</a · <a href="#auth"Auth</a · <a href="#usage"Usage</a · <a href="#for-llm-agents-and-scripts"Agent Mode</a · <a href="#contributing"Contributing</a </p

---

What It Looks Like

<table <tr <td align="center" <img src="examples/cyberpunktokyo.png" width="350"<br <codenanaban "cyberpunk tokyo street neon rain" --ar wide</code </td <td align="center" <img src="examples/foxink.png" width="250"<br <codenanaban "minimalist single line fox"</code </td <td align="center" <img src="examples/productmug.png" width="250"<br <codenanaban "product photo white ceramic mug"</code </td </tr </table

Every image on this page was generated with nanaban. Straight from the terminal.

Why This Exists

Most AI image generators make you open a browser, wait in a queue, click through UI, and download manually. That workflow breaks the second you need images inside a script, a CI pipeline, or an agent loop.

nanaban fixes that:

  • One command — type your prompt, get a file. No browser, no signup flow, no queue.
  • Free GPT Image 2 for ChatGPT Plus/Pro subscribers. nanaban reads the OAuth token written by codex login and hits the private Codex backend (chatgpt.com/backend-api/codex/responses) on your behalf — every generation decrements your ChatGPT image quota, not your OpenAI API balance. Zero marginal cost, no API key needed.
  • Three model families, one CLI — GPT Image 2 (OpenAI's April 2026 flagship) when Codex auth is present, Nano Banana (Gemini) for the cheap/fast default with extended ratios, GPT-5 Image for OpenAI's text/UI work via OpenRouter.
  • Auto-names files — "a fox in a snowy forest at dawn" becomes foxsnowyforestdawn.png.
  • Built for scripts — stdout is always the file path. nanaban "a cat" | xargs open just works.
  • Built for LLM agents — --json gives structured output with cost. nanaban agent-info is a machine-readable manifest of every model, flag, transport, and error code (with per-code recovery instructions).
  • Tiny footprint — one Node package, or one standalone binary with no runtime required.

Install

Three options, pick whichever matches how you like to install CLIs: