gobananas-cli
v1.3.7
Published
Command-line interface for Go Bananas! AI Image Generation
Downloads
951
Maintainers
Readme
gobananas-cli
Quickest setup: gobananasai.com/connect has copy-ready steps for Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex and Gemini CLI. Claude Code and Codex users can install the go-bananas plugin (server + skill). The MCP address is
https://mcp.gobananasai.com;https://gobananasai.com/mcpstill works.
Interactive command-line interface and MCP proxy for Go Bananas AI image generation.
What's New (v1.3.6)
- 1.3.6 — when Go Bananas rejects the sign-in, the MCP proxy says the tool did not run and is safe to retry, instead of warning that it may have completed.
- 1.3.5 — the MCP proxy and CLI client read the browser-login token for every request and refresh it on a 401, so a session that outlives its access token no longer fails one call with "Access token has expired".
- Earlier: 1.3.0 added authoritative subscription routing, explicit generation lanes
(
--subscription/--provider), and structured source/billing provenance. See CHANGELOG.md — "CLI / MCP proxy releases" — for the full history.
Install
Requires Node.js 20.3.0 or newer. Earlier versions exit with an upgrade message before starting the CLI or MCP connection.
npm install -g gobananas-cliOr use without installing:
npx gobananas-cliCommands
| Command | Alias | Description |
| --------------- | ----- | ------------------------------ |
| gobananas | gb | Interactive CLI |
| gobananas-mcp | — | MCP STDIO proxy for AI editors |
MCP Setup
Go Bananas supports two MCP auth modes. Pick one per client/scope:
- Remote HTTP OAuth: the MCP client connects to
https://mcp.gobananasai.comand stores its own OAuth tokens. - STDIO proxy: the MCP client launches
gobananas-mcp; the proxy reads credentials fromgobananas-cli auth loginorGO_BANANAS_API_KEY.
Do not expect gobananas-cli auth login to authenticate a direct HTTP MCP entry. It only
authenticates the STDIO proxy.
Both connection modes advertise subscription-first routing during the MCP handshake. Existing
npx -y gobananas-mcp configurations pick up the latest proxy on their next restart. Global
installs must run npm update -g gobananas-cli gobananas-mcp.
gb generate "a studio banana portrait" # configured auto lane
gb generate --subscription "a studio banana portrait" # subscription required
gb generate --provider --model gemini-pro-image "..." # provider required
gb subscription status --json
gb config generation-lane autoFor Claude Code, claude.ai connectors, Codex, Cursor, VS Code, and other clients that support remote HTTP MCP OAuth, use the hosted endpoint:
claude mcp add --transport http -s user go-bananas https://mcp.gobananasai.comThen run /mcp in Claude Code and complete the Go Bananas browser login.
Codex uses:
codex mcp add go-bananas --url https://mcp.gobananasai.com
codex mcp login go-bananasUse the local STDIO proxy for MCP clients that cannot connect to remote HTTP servers, or when you want one local credential shared across STDIO clients. Run browser login once:
npx -y gobananas-cli auth loginThen configure the proxy:
{
"mcpServers": {
"go-bananas": {
"command": "npx",
"args": ["-y", "gobananas-mcp"],
"env": {
"GO_BANANAS_SERVER_URL": "https://gobananasai.com",
"GO_BANANAS_MCP_TRANSPORT": "streamable-http"
}
}
}
}For CI/headless environments, add GO_BANANAS_API_KEY to the same env object instead of
using browser login.
See the gobananas-mcp README for client-specific setup instructions.
Environment Variables
| Variable | Default | Description |
| -------------------------- | ------------------------- | -------------------------------------------------------- |
| GO_BANANAS_API_KEY | — | API-key fallback for STDIO proxy and CI/headless clients |
| GO_BANANAS_SERVER_URL | https://gobananasai.com | Server URL |
| GO_BANANAS_MCP_TRANSPORT | streamable-http | Transport protocol |
Architecture
src/— TypeScript sourcedist/— Compiled outputbin/— CLI entry points (gobananas.js,gobananas-mcp.js)
The MCP STDIO proxy (bin/gobananas-mcp.js) bridges STDIO-based MCP clients to the remote
server. Its Streamable HTTP upstream negotiates MCP 2026-07-28 automatically, while /sse
remains a pinned legacy fallback. It uses a 30-second connect timeout and a 15-minute tool-call
timeout.
Related
gobananas-mcp— MCP proxy package (zero-installnpxsetup)- Go Bananas — AI image generation platform
Proxy configuration checks
gobananas-mcp and gb mcp use the same options: --server-url, --api-key,
and --transport. Unknown options and missing values fail before starting MCP.
Transport precedence is the explicit option, then GO_BANANAS_MCP_TRANSPORT,
then streamable-http; supported values are auto, streamable-http, and sse.
Authentication precedence is an explicit API key, a valid OAuth login bound to
that server, then the environment or saved API key. An environment key does not
override an existing valid OAuth login; use --api-key when that is intentional.
If the saved login can no longer be refreshed, the proxy switches to the environment
or saved API key for the same server (in a new upstream session) instead of failing,
and says so once on stderr and in go_bananas_diagnose. A temporary failure of the token
endpoint (rate limit, server error or challenge page) fails only that call and keeps
the login. Subscription tools need the
login, so run gb auth login to restore them. Proxy processes that share one login
refresh it under a lock file next to the config file, because the server revokes
the whole login when a refresh token is used twice.
The offline CLI suite exercises both shipped entry points with isolated profiles:
initialise, tool discovery, an authenticated fixture tool call, diagnostics and
clean shutdown when the client closes stdin. It checks OAuth and API-key precedence,
invalid options, and keeps ordinary stdout exclusively for MCP messages. The release
builder additionally verifies the extracted npm and MCPB package contents and startup.
These checks establish the proxy contract; each agent application's installation,
browser login and permitted real tool calls still need a separate acceptance check.
Local image upload requires the OAuth images:edit scope; a successful read or
generation alone does not establish permission to upload.
Image upload limits
Uploads must be at most 20 MB and 4,194,304 total pixels (about 4.2 megapixels, equivalent to 2048 × 2048). Wider images are accepted when their total pixel count stays within this limit. PNG, JPEG, WebP and single-frame GIF are supported; animated GIF must be exported as one frame first. Corrupted, truncated or MIME-mismatched content is rejected before storage. These limits apply to uploads, not generated image resolutions.
