🍌 NanoBridge 0.8.2

Nano Banana, wired into your agent.Nano Banana, ligado no seu agente.

Gemini's image models as an MCP server and a CLI — spending the Gemini plan you already pay for, instead of billing per image. Os modelos de imagem do Gemini como servidor MCP e CLI — gastando o plano do Gemini que você já paga, em vez de cobrar por imagem.

One command, one usable spriteUm comando, um sprite pronto

Everything below came out of the commands next to it — trimmed, transparent, sliced and looped by the tool, not by hand. Tudo aqui embaixo saiu dos comandos ao lado — recortado, transparente, fatiado e em laço pela ferramenta, não na mão.

pixel-art knight sprite with a blue shield nanobridge sprite "…knight…" --size 160
animated green slime, squash and stretch loop nanobridge sheet "a green slime" --grid 4x2
4x2 sprite sheet of a green slime squashing and stretching

A whole cast that matchesUm elenco que combina

This is the one thing here that nothing else does. Isto é a única coisa aqui que nenhum outro faz.

four pixel-art characters sharing one palette

Generate characters one at a time and they do not match — the model picks a slightly different green each time, and the set looks assembled from separate sessions. cast generates them together, reads one palette from the whole group, locks everyone to it, and packs the result into an atlas with the manifests you asked for. Gerar personagens um a um dá um elenco que não combina — o modelo escolhe um verde ligeiramente diferente a cada vez, e o conjunto parece montado de sessões separadas. O cast gera todos juntos, tira uma paleta do grupo inteiro, trava todo mundo nela e empacota num atlas com os manifestos pedidos.

nanobridge cast "a knight with a sword" "a hooded rogue" "an old wizard" \
  --size 128 -f godot -f css

The four above came out of exactly that, in one command. Os quatro acima saíram exatamente disso, num comando.

Four things nothing else doesQuatro coisas que nenhum outro faz

animate

Animate a sprite you already have, keeping that exact character — not a new one drawn from text.Anima um sprite que você já tem, mantendo aquele personagem — não um novo desenhado do texto.

variations

Several takes at once, each pushed a different way, on one contact sheet to pick from.Várias versões de uma vez, cada uma empurrada num sentido, numa folha só pra escolher.

texture

Tileable and measured: the seam is checked against the texture's own variation, and stitched if it fails.Repete e é medido: a emenda é conferida contra a variação da própria textura, e costurada se falhar.

normal

A normal map for 2D dynamic lighting, derived locally. No quota.Mapa de normais pra luz dinâmica em 2D, derivado localmente. Sem cota.

Models say a texture is "seamless" and often it is not — the seam only shows once four copies sit side by side in the game. A pure gradient measures 119 on that scale, a pattern that already repeats measures 1.57, and anything under 3 nobody sees. O modelo diz que a textura é "seamless" e muitas vezes não é — a emenda só aparece quando quatro cópias ficam lado a lado no jogo. Um degradê puro mede 119 nessa escala, um padrão que já repete mede 1,57, e abaixo de 3 ninguém vê.

The second model: 3DO segundo modelo: 3D

The Nano Banana draws pixels. Geometry comes from somewhere else. O Nano Banana desenha pixel. Geometria vem de outro lugar.

one mushroom enemy rendered from eight directions

No prompt makes an image model return a mesh, and anything claiming otherwise is selling something. So the 3D comes from a different family: single-image-to-3D reconstruction, which looks at one picture and returns a closed object. The two halves fit because each solves the other's problem — those models need a clean, centred, plainly-lit reference, and that is exactly what Nano Banana can be asked for. Nenhum prompt faz um modelo de imagem devolver malha, e quem disser o contrário está vendendo alguma coisa. Então o 3D vem de outra família: reconstrução de imagem única, que olha uma foto e devolve um objeto fechado. As duas metades se encaixam porque uma resolve o problema da outra — esses modelos precisam de uma referência limpa, centrada e de luz lisa, que é exatamente o que dá pra encomendar ao Nano Banana.

nanobridge sprite3d "a round brown mushroom enemy with big angry eyes" --gif

The eight frames above are that one command: a reference drawn, a mesh reconstructed, and the mesh spun through eight directions at one fixed scale — so the character does not swell and shrink as it turns, which is the whole difference between a usable sprite and a wobbling one. --pitch 0 is a side-on platformer view, --pitch 30 is proper isometric, and the frames are ordinary PNGs, so atlas, palette and slice still work on them. Os oito quadros acima são esse comando só: uma referência desenhada, uma malha reconstruída, e a malha girada em oito direções numa escala fixa — o personagem não cresce e encolhe ao virar, que é a diferença inteira entre sprite usável e sprite tremendo. --pitch 0 é a vista lateral de plataforma, --pitch 30 é a isométrica de verdade, e os quadros são PNG comum, então atlas, palette e slice continuam funcionando neles.

The reconstruction runs on free public Hugging Face Spaces — TRELLIS, TripoSR and Hunyuan3D — so there is no key and no bill; you pay in queueing. The last step, mesh to frames, is a software rasteriser in the repo: NumPy, no GPU, no network, and the same pixels on every machine. A reconstrução roda em Space público da Hugging Face — TRELLIS, TripoSR e Hunyuan3D — sem chave e sem conta; o preço é a fila. O último passo, malha para quadros, é um rasterizador escrito aqui: NumPy, sem placa de vídeo, sem rede, e os mesmos pixels em qualquer máquina.

The input picture decides everything: one object, whole, facing the camera, plain background, visible shading. Flat pixel art does not work — there is no volume in it to reconstruct. Measured on this project's own 32×32 hero sprite, the result came back 7% as deep as it was wide, so mesh prints a depth ratio and warns when it collapses. A imagem de entrada decide tudo: um objeto só, inteiro, de frente, fundo liso, com sombreado visível. Arte 2D chapada não funciona — não há volume nenhum para reconstruir. Medido no sprite de 32×32 deste próprio projeto, o resultado voltou com 7% de profundidade, e por isso o mesh imprime a razão de profundidade e avisa quando ela desaba.

A mesh is not an assetMalha não é asset

The part that decides whether the 3D is usable — and the part everything else skips. A parte que decide se o 3D serve — e a parte que todo mundo pula.

a treasure chest rendered from four angles in Blender

What a 3D generator returns is a shell: two to five hundred thousand irregular triangles, no UVs, colour stored per vertex — a format only its own viewer understands. Open it in Blender and you get a grey blob; drop it in Godot and it has no texture. It is a preview, not a model. O que um gerador 3D devolve é uma casca: duzentos a quinhentos mil triângulos irregulares, sem UV, com a cor guardada por vértice — formato que só o visualizador dele entende. Abre no Blender e dá um borrão cinza; põe no Godot e não tem textura. É prévia, não é modelo.

nanobridge model "a wooden treasure chest with iron bands and a heavy padlock" --kind prop

The chest above is that command. In between, refine runs Blender headless and does what an artist would, in the same order: weld and fix normals, retopologise into quads with QuadriFlow, unwrap the UVs, and bake the dense mesh's colour onto the clean topology — the same high-to-low transfer used between a sculpt and a game model. 279 329 faces became 5 519, all quads. O baú acima é esse comando. No meio, o refine roda o Blender sem interface e faz o que um artista faria, na mesma ordem: solda e conserta normal, retopologiza em quadriláteros com QuadriFlow, desdobra a UV e assa a cor da malha densa na topologia limpa — a mesma transferência de alta para baixa que se usa entre escultura e modelo de jogo. 279 329 faces viraram 5 519, todas quadriláteras.

the baked UV atlas: wood planks, iron bands, rivets

That atlas is the whole point. It came out of the mesh's own vertex colours, and unlike them it works in any engine, any viewer, any renderer. The .blend ships with the image packed inside, so it opens anywhere. Esse atlas é o ponto inteiro. Ele saiu da cor por vértice da própria malha, e diferente dela funciona em qualquer motor, visualizador ou render. O .blend sai com a imagem embutida, então abre em qualquer lugar.

Blender is an external dependency on purpose: it is a 400MB download, and nobody who only wants 2D sprites should be made to install it — brew install --cask blender. O Blender é dependência externa de propósito: são 400 MB, e quem só quer sprite 2D não deveria ser obrigado a baixar — brew install --cask blender.

Palettes, and real pixel artPaletas, e pixel art de verdade

a slime rebuilt at 40 art pixels, locked to the PICO-8 palette --pixels 40 --zoom 8 --palette pico8

Eight built-in palettes (PICO-8, Game Boy, CGA, C64, Sweetie 16, Endesga 32 and two greyscales), plus .hex files and inline colour lists. Matching is perceptual, not raw RGB — it has to be: in plain RGB the grey #5F574F sits closer to a mid green than PICO-8's own green does, so a green slime came out grey. Oito paletas embutidas (PICO-8, Game Boy, CGA, C64, Sweetie 16, Endesga 32 e duas em cinza), mais arquivos .hex e listas de cor na linha de comando. O casamento é perceptual, não RGB cru — e tem que ser: em RGB puro o cinza #5F574F fica mais perto de um verde médio do que o próprio verde da PICO-8, e um slime verde saía cinza.

--size scales the image; --pixels rebuilds it at an exact number of art pixels, so the grid closes and every art pixel is one pixel. Downscaling 2816px straight to 128px gives blocks of 4, 5 and 6 mixed together — it reads as pixel art until somebody zooms in. --size redimensiona a imagem; --pixels reconstrói com um número exato de pixels de arte, então a grade fecha e cada pixel da arte é um pixel. Reduzir 2816px direto para 128px dá blocos de 4, 5 e 6 misturados — parece pixel art até alguém dar zoom.

Why not just call the APIPor que não usar a API

Because on a free plan it answers 429 to every image, and on a paid one it bills twice for something already paid. Porque no plano grátis ela responde 429 para toda imagem, e no pago ela cobra de novo por algo que já foi pago.

The AI Studio key is the obvious route and it does not work: gemini-2.5-flash-image, gemini-3.1-flash-image and gemini-3-pro-image all answer 429 RESOURCE_EXHAUSTED, because the free tier grants zero image quota. Turning billing on fixes it and starts charging per image — while the Gemini subscription sitting on the same account goes unused. A chave do AI Studio é o caminho óbvio e não funciona: gemini-2.5-flash-image, gemini-3.1-flash-image e gemini-3-pro-image respondem 429 RESOURCE_EXHAUSTED, porque o nível gratuito dá cota zero para imagem. Ligar faturamento resolve e passa a cobrar por imagem — enquanto a assinatura do Gemini na mesma conta fica parada.

BackendAuthAutenticaçãoCostCusto
web (default)(padrão) the Gemini cookie already in your browsero cookie do Gemini que já está no navegador the plan you already haveo plano que você já tem
api GEMINI_API_KEY per image, needs active billingpor imagem, exige faturamento ativo

nanobridge doctor says which one is live and how much quota is left. Nothing to paste, nothing to buy. nanobridge doctor diz qual está de pé e quanta cota sobrou. Nada para colar, nada para comprar.

There is no login, and no keyNão existe login, nem chave

The question everyone asks first has an answer nobody guesses. A pergunta que todo mundo faz primeiro tem uma resposta que ninguém adivinha.

You don't sign in to anything. NanoBridge reads the Gemini session cookie already sitting in your browser — if you can open gemini.google.com and chat, it can generate images. It is literally the same session. There is no GUI on purpose: there is nothing for one to do. Você não entra em nada. O NanoBridge lê o cookie de sessão do Gemini que já está no seu navegador — se você consegue abrir o gemini.google.com e conversar, ele consegue gerar imagem. É literalmente a mesma sessão. Não existe GUI de propósito: não haveria o que ela fizesse.

nanobridge setup

walks it: says that outright, finds the session, opens Gemini if there isn't one, and proves the whole path by generating a real image instead of claiming it should work. conduz: diz isso com todas as letras, acha a sessão, abre o Gemini se não houver, e prova o caminho inteiro gerando uma imagem de verdade em vez de dizer que deve funcionar.

InstallInstalar

Clone and run the installer. Needs Python 3.11+ and a browser signed in to gemini.google.com. The repository is private, so cloning goes through an authenticated gh. Clonar e rodar o instalador. Precisa de Python 3.11+ e um navegador logado no gemini.google.com. O repositório é privado, então o clone passa por um gh autenticado.

gh repo clone NspxMiguel/NanoBridge ~/Projects/NanoBridge
cd ~/Projects/NanoBridge && ./install.sh

Either way you get the nanobridge command, the MCP server registered with Claude Code, and the agent skill installed. Dos dois jeitos você fica com o comando nanobridge, o servidor MCP registrado no Claude Code e a skill do agente instalada.

From the shellNo terminal

nanobridge doctor
nanobridge sprite "a green slime" --style pixel --size 128
nanobridge icon "a compass rose" --style flat
nanobridge edit hero.png "make the sky stormy, keep everything else"

nanobridge sheet "a green slime" --grid 4x2 \
  --action "squash down and stretch back up, a bouncy idle loop" --fps 10

# local, no network, no quotalocal, sem rede, sem cota
nanobridge cut photo.jpg --transparent --trim --size 256
nanobridge slice sheet.png --grid 6x1 --size 96
nanobridge atlas hero.png villain.png item.png -o game/atlas

atlas packs loose sprites into one sheet plus a JSON manifest of where each named sprite sits — what Godot, Phaser and Unity call a sprite atlas. atlas empacota sprites soltos numa folha só, mais um manifesto JSON de onde cada sprite nomeado ficou — o que Godot, Phaser e Unity chamam de atlas de sprites.

From an agentDo agente

Eight MCP tools — and every generating one hands the picture back to the model. Oito ferramentas MCP — e toda que gera devolve a imagem para o modelo.

generate_sprite

One sprite, background removed and trimmed.Um sprite, sem fundo e já recortado.

generate_sprite_sheet

A sheet, sliced into frames, assembled into a looping GIF.Uma folha, fatiada em quadros, montada em GIF que dá laço.

generate_image

Free-form, with reference images and multi-turn edits.Livre, com imagem de referência e edição em várias rodadas.

edit_image

Change any image on disk in plain language.Muda qualquer imagem do disco em linguagem normal.

cut_image / slice_sheet

Local post-processing. No network, no quota.Pós-processamento local. Sem rede, sem cota.

generate_cast

A whole set of characters, one shared palette, packed.Um elenco inteiro, uma paleta só, empacotado.

extract_palette / apply_palette

Take a palette off art you like, put it on everything else.Tira a paleta de uma arte boa e põe no resto.

pack_atlas

Loose sprites into one sheet plus a manifest. Local, no quota.Sprites soltos numa folha só, mais manifesto. Local, sem cota.

nanobridge_status

Which backend is live and what quota is left.Qual canal está de pé e quanta cota sobrou.

nanobridge_reset

Drop a stale session right after signing back in.Solta uma sessão morta assim que você entra de novo.

The preview handed back is the point: an agent that cannot see what it drew cannot tell a good sprite from a broken one, and iterates blind. A pré-visualização de volta é o ponto: um agente que não vê o que desenhou não distingue sprite bom de sprite quebrado, e itera às cegas.

What the post-processing doesO que o pós-processamento faz

The model returns a large JPEG on a flat background. Sprites need the opposite. O modelo devolve um JPEG grande com fundo chapado. Sprite precisa do contrário.

Limits worth knowingLimites que vale saber

CreditCréditos

NanoBridge is not the only project on this idea. O NanoBridge não é o único projeto nessa ideia.

gemini-webapi-mcp, by AndyShaman, reaches Nano Banana through a browser session too, since February 2026, on largely the same stack. Two things here exist because that project showed they were worth having: NANOBRIDGE_COOKIE_FILE, to point at a browser cookie store outside the default location, and nanobridge_reset, to drop a stale session on purpose right after signing back in. gemini-webapi-mcp, de AndyShaman, também chega ao Nano Banana por uma sessão de navegador, desde fevereiro de 2026, com praticamente a mesma pilha. Duas coisas aqui existem porque aquele projeto mostrou que valiam a pena: NANOBRIDGE_COOKIE_FILE, pra apontar um cookie de navegador fora do lugar padrão, e nanobridge_reset, pra soltar uma sessão morta de propósito logo depois de entrar de novo.