Skip to content

Gemini CLI

Image CDN for Gemini CLI

One gemini mcp add and the CLI can audit, migrate, and re-encode every image in the repo.

$0 forever 20 GB bandwidth 3 GB storage hard stop at quota — never a surprise bill. Compare plans

Add AuraImage to Gemini CLI

Gemini CLI expands environment variables in the env block — $VAR or ${VAR} on every platform, %VAR% on Windows — so the bare $AURA_SECRET_KEY resolves at launch and the file stays safe to commit. gemini mcp add writes this block for you, and its scope defaults to the project file rather than ~/.gemini/settings.json.

.gemini/settings.json
{
  "mcpServers": {
    "auraimage": {
      "command": "npx",
      "args": ["-y", "@auraimage/mcp-server@latest"],
      "env": {
        "AURA_SECRET_KEY": "$AURA_SECRET_KEY"
      },
      "timeout": 30000
    }
  }
}

Or from the terminal

bash
gemini mcp add auraimage npx -- -y @auraimage/mcp-server@latest

Verified against the vendor docs on 2026-08-09.

Optimize images with Gemini CLI

Each prompt is paired with the MCP tool it fires.

  • Walk the repo directory by directory and tell me which images cost the most LCP.audit_lcp
  • Migrate /public/img to AuraImage, following the naming rules in GEMINI.md.migrate_assets
  • Generate alt text for the README screenshots and hand me the list to paste in.generate_alt
  • Give me a responsive tag for the blog cover, sized to the breakpoints in our Tailwind config.generate_responsive_tag
  • Run /memory reload first — I just edited the crop ratios — then preview founder.jpg at 3:2 and tell me what it cut off.smart_crop_preview
gemini — ~/dev/acme-storefront
Gemini CLI
Tips for getting started:
1. Create GEMINI.md files to customize your interactions
2. /help for more information
3. Ask coding questions, edit code or run commands
4. Be specific for the best results
/install-auraimage-app
I'll scan the project first — framework, image surface, secrets, backend, hosting — then show you one plan and one confirm.
Success: ReadFile package.json
Next.js 15.4 · App Router · TypeScript · pnpm 9
Success: SearchText <img|background-image
14 <img> tags · 6 res.cloudinary.com URLs
Success: FindFiles public/**/*.{png,jpg}
23 local images · 18.7 MB total
Success: ReadFile .gitignore
.env.local ignored · no AURA_* keys anywhere
Success: ReadFile vercel.json
hosting: Vercel → env file convention .env.local
Discovery — acme-storefront
  Framework   Next.js 15 (App Router, TypeScript, pnpm)
  Images      14 <img> tags · 23 files in /public · 6 Cloudinary URLs
  Secrets     no AURA_* keys · .env.local gitignored
  Backend     route handlers — can sign upload tokens
  Hosting     Vercel

Plan
  1. Credentials & env     →  auraimage-api-key
  2. Register MCP server   →  .mcp.json
  3. Install SDK           →  pnpm add @auraimage/sdk
  4. Components            →  <AuraImage /> + <AuraUploader />
  5. Token route           →  app/api/aura/sign/route.ts
install-auraimage-app
5 steps · 6 writes · nothing runs before this confirm
Proceed? (or describe changes, e.g. 'skip uploader')
No Secret Key found. Paste one from the dashboard (Settings → Secret Keys) — it stays masked in this session.
sk_live_0198a4f2…9c1b
Success: WebFetch auraimage.ai/v1/sign — validate key
valid · project acme-storefront · key name "prod"
auraimage-api-key
.env.local +AURA_SECRET_KEY=sk_live_0198…9c1b +NEXT_PUBLIC_AURA_PROJECT_NAME=acme-storefront
Write 2 keys to .env.local? A secret is never written to disk without this confirm.
Success: WriteFile .env.local
+2 keys · values masked in the log
Success: Edit .mcp.json
merged "auraimage" server · existing servers untouched
Success: Shell pnpm add @auraimage/sdk
+ @auraimage/sdk 1.4.2
Packages: +1
+ @auraimage/sdk 1.4.2
Done in 1.8s
Success: Shell npx shadcn@latest add https://auraimage.ai/registry/image.json
components/aura/image.tsx
Success: Shell npx shadcn@latest add https://auraimage.ai/registry/uploader.json
components/aura/uploader.tsx
Success: WriteFile app/api/aura/sign/route.ts
Created app/api/aura/sign/route.ts — the <AuraUploader /> default endpoint, no extra wiring
added: import { AuraImage } from '@auraimage/sdk';
added:
added: const aura = new AuraImage({
added: secretKey: process.env.AURA_SECRET_KEY!,
added: projectName: process.env.NEXT_PUBLIC_AURA_PROJECT_NAME!
added: });
added:
added: export async function POST() {
added: const signature = await aura.signUpload({ maxSize: '5mb', allowedTypes: ['image/*'] });
added: return Response.json({ signature });
added: }
AuraImage installed — 6 writes, 0 failures

Wrote
  .env.local           +2 keys (masked)
  .mcp.json            auraimage MCP server
  package.json         @auraimage/sdk 1.4.2
  components/aura/     image.tsx · uploader.tsx
  app/api/aura/sign/   route.ts (+11 lines)

Next
  1. Restart your agent to load the MCP server
  2. audit_lcp — scan for unoptimized images
  3. migrate_assets — 23 local + 6 Cloudinary images detected
  4. auraimage-react — <AuraImage /> patterns

Docs: https://auraimage.ai/docs
~/dev/acme-storefrontmainno sandboxgemini-2.5-pro24% used

A Cloudinary alternative your agent can wire up itself

CapabilityCloudinary / ImgixAuraImage with Gemini CLI
Pricing modelMetered per GB and per transformFlat monthly price
EgressBilled$0
AVIFOpt-in configurationServed by default
BlurHash placeholdersBuild it yourselfBundled
ComponentSDK importLands in your repo, yours to edit
InstallManual wiringOne MCP config, then a prompt

Teach Gemini CLI your image conventions

Gemini CLI concatenates every GEMINI.md it finds, from ~/.gemini/GEMINI.md down through the repo root to the working directory, and picks up more just-in-time when a tool touches a new directory. Run /memory show to see exactly what was assembled, or /memory reload after editing one.

PathGEMINI.md

Verified against the vendor docs on 2026-08-09.

Questions, answered

The things developers ask before they ship. If something is missing, just email us.

Install it in your side project. Pay when you ship.

$0 forever 20 GB bandwidth 3 GB storage hard stop at quota — never a surprise bill. Compare plans