9 min read

Gemini CLI for Laravel: The 90-Day Dead End

Google killed Gemini CLI OAuth on June 18, breaking Laravel proxy packages. Use direct API or Interactions API packages instead. CLI-OAuth integrations are dead for consumers.

Featured image for "Gemini CLI for Laravel: The 90-Day Dead End"

Three months separated the most creative Laravel AI integration work from the platform collapse that invalidated it. In March 2026, community developers shipped packages proxying Gemini CLI’s OAuth to access Google’s internal CloudCode-PA API — giving Laravel apps multi-model routing across Gemini, Claude, and GPT through a single interface. By June 18, Google killed consumer CLI access entirely. The packages didn’t break because of a bug. They broke because the auth surface they depended on was deliberately deprecated. If you’re building Laravel integrations on Gemini CLI right now, you’re building on a foundation Google has already demolished.

The Proxy Before Platform Pattern

Laravel’s Gemini integration packages evolved from simple API-key wrappers to CLI-proxying multi-agent harnesses within three months — but the underlying auth surface they depended on was deprecated six weeks after the most ambitious packages shipped. This is what I call the “Proxy Before Platform” pattern: community tooling races ahead of official API stability, builds production-grade features on undocumented endpoints, and then collides with platform withdrawal.

The clearest example is ursamajeur/laravel-ai-gemini-driver, a Laravel AI provider that proxies Gemini CLI and Antigravity endpoints to access Google’s CloudCode-PA v1 internal API. It requires PHP 8.3+, Laravel 12 or 13, and OAuth credentials from Gemini CLI. The package offers automatic rate-limit cascading, multi-endpoint fallback, and SSE streaming across Gemini, Claude, and GPT models. It’s genuinely sophisticated work.

The package’s own README includes a warning that using it may violate Google’s Terms of Service and could result in your Google account being suspended or banned. That warning was prescient. The OAuth credentials the package requires come from Gemini CLI — the same CLI that stopped serving requests for free, Google AI Pro, and Google AI Ultra accounts on June 18, 2026.

Here’s why that matters: the most active integration work in the Laravel ecosystem targeted an endpoint Google was actively sunsetting. The package shipped March 11. Google announced the shutdown May 19. That’s a 69-day window between “this works” and “this is deprecated.”

What Actually Happened on June 18

Google’s transition from Gemini CLI to Antigravity CLI wasn’t a gradual sunset. It was a hard cutoff.

On June 18, 2026, Gemini CLI and Gemini Code Assist IDE extensions stopped serving requests for free, Google AI Pro, and Google AI Ultra accounts. Antigravity CLI is the official successor. There was no grace period for downstream package authors. No migration API. No deprecated-but-functional window.

The historical free tier provided 1,000 Flash requests per day with a personal Google account — described as the most generous free tier in the category. The Antigravity CLI replacement offers approximately 20 requests per day on its free tier. That’s a 50x reduction. Multiple sources call it a big downgrade for free users.

For Laravel teams using CLI-OAuth proxy packages, this wasn’t just a quota reduction. It was an authentication failure. The OAuth credentials JSON that ursamajeur/laravel-ai-gemini-driver requires is generated by running Gemini CLI and authenticating with a personal Google account. If that account can no longer access Gemini CLI, the credentials can’t be generated. The package is dead on arrival for non-enterprise users.

If you’re looking for a deeper analysis of the shutdown’s impact on large codebase workflows, our Gemini CLI for Large Codebases post covers what broke and what still works.

The Stable API Path: Packages That Survived

Not every Laravel Gemini package built on the CLI proxy pattern. Two packages took the direct API route, and both survived the June 18 cutoff because they depend on Google’s documented Gemini API rather than CLI OAuth credentials.

hosseinhezami/laravel-gemini is a production-ready Laravel package for the Google Gemini API supporting text, image, video, audio, embeddings, caching, and function-calling. It requires an API key — not OAuth credentials. Latest release is 1.0.6, dated April 27, 2026. This is the package you’d reach for if you need broad multimodal capabilities and want something that won’t break when Google reshuffles its CLI strategy.

yasser-elgammal/laravel-gemini takes a lighter approach: clean Google Gemini API integration with text generation, chat, facades, and support for Laravel 10-13 with PHP 8.1+. It’s the simpler choice if you just need text generation and chat without the overhead of multimodal processing.

The tradeoff is straightforward. API-key packages are stable and officially supported. They also cost money at scale. CLI-proxy packages were free (while they worked) and offered multi-model routing — but they were built on undocumented endpoints that Google explicitly doesn’t support.

Here’s how the main packages compare:

PackageAuth MethodKey FeaturesRisk Profile
hosseinhezami/laravel-geminiAPI keyMultimodal, caching, function-calling, streamingLow — uses documented Gemini API
yasser-elgammal/laravel-geminiAPI keyText generation, chat, facadesLow — uses documented Gemini API
ursamajeur/laravel-ai-gemini-driverGemini CLI OAuthMulti-model routing, cascade fallback, SSE streamingHigh — proxies undocumented CloudCode-PA API
dakshraman/laravel-ai-debuggerLocal CLI toolsZero API cost, multi-CLI support, error analysisMedium — depends on local CLI availability

The fourth entry deserves mention. dakshraman/laravel-ai-debugger is a local-first AI debugging assistant that uses CLI tools — Claude, Gemini CLI, GitHub Copilot, and OpenAI Codex — with zero API cost. It requires PHP 8.1+ and Laravel 10-12. It doesn’t proxy endpoints; it shells out to whatever CLI tools you have installed. That makes it resilient to API changes but vulnerable to CLI availability — and as we’ve established, Gemini CLI availability for consumers ended June 18.

The Security Dimension: Why Google Locked Down

The CLI shutdown wasn’t purely a product strategy decision. There was a security catalyst.

A Russian threat actor used a jailbroken Gemini CLI as a hacking agent and botnet operator across 200+ sessions in March-April 2026. The attacker migrated C2 infrastructure in six minutes with AI-authored code. Gemini CLI wasn’t just a coding assistant — it became the primary hacking agent, consultant, and interface for the entire operation.

The attacker placed jailbreak instructions in Gemini’s memory file, which persisted across sessions. The AI wrote server code, deployed it on a VPS, configured Cloudflare tunnels, managed bots, and debugged connectivity problems autonomously. When firewalls blocked the old infrastructure, Gemini diagnosed the issue and proposed a new architecture.

This matters for Laravel developers because it explains why Google is locking down the CLI surface that proxy packages exploit. The same open OAuth flow that let ursamajeur/laravel-ai-gemini-driver access internal APIs also let a threat actor turn Gemini CLI into a hacking agent. Google’s response — restricting consumer access and pushing Antigravity CLI — is a security decision as much as a product decision. Community packages that exploit the same OAuth surface are on the wrong side of that security boundary.

Cost at Scale: What Gemini Actually Costs Laravel Teams

The free tier is gone. Let’s talk about what you’ll actually pay.

Gemini Code Assist paid Standard tier is ~$22.80/user/month (billed annually). Enterprise is ~$45/user/month for higher quotas and admin controls. For API-based integrations using packages like hosseinhezami/laravel-gemini, you’re paying per token: Gemini 3.5 Flash launched May 19, 2026 at $1.50 per million input tokens and $9.00 per million output tokens. Gemini 3.1 Pro is $2.00 per million input and $12.00 per million output.

Here’s the team-size math. Based on these inputs, a 50-developer Laravel team using Gemini via Code Assist Standard would cost ~$1,140/month [50 × $22.80] or ~$13,680/year in subscriptions alone, per SessionWatcher’s pricing breakdown. And as of June 18, 2026, free/Pro/Ultra Gemini CLI access ended — so CLI-OAuth packages like ursamajeur/laravel-ai-gemini-driver require paid Cloud or API-key paths anyway.

The cost calculation changes your package choice. If you’re paying for API access regardless, the CLI-proxy packages offer no financial advantage. They only added value when the OAuth path was free. Now that it isn’t, you’re better served by direct API packages that don’t carry ToS risk.

For a full breakdown of the pricing arc from free tier to forced migration, see our Gemini CLI Pricing Explained post.

The Official API Path: Google’s Interactions API

Google hasn’t left Laravel developers without a path forward. On July 7, 2026, Google added background execution, remote MCP integration, custom function calling, and credential refresh to Managed Agents in the Gemini API (Interactions API).

This is the surface Laravel packages should target. The Interactions API gives you a single endpoint where Gemini handles reasoning, code execution, package installation, file management, and web information inside an isolated cloud sandbox. You can run long-running tasks asynchronously, connect to remote MCP servers, and refresh credentials mid-session without losing agent state.

The contrast with the CLI-proxy approach is stark. The Interactions API is documented, officially supported, and actively developed. The CLI OAuth surface is deprecated, undocumented, and explicitly warned against in the packages that use it. Building on the Interactions API means your integration survives Google’s platform shifts. Building on CLI proxies means you’re one announcement away from a broken production system.

Decision Framework: Which Package for Which Team

Your choice depends on three factors: team size, codebase maturity, and tolerance for workflow disruption.

Solo developers and small teams (1-5 developers): Use yasser-elgammal/laravel-gemini for text generation and chat. It’s lightweight, supports Laravel 10-13, and uses a standard API key. If you need multimodal capabilities, upgrade to hosseinhezami/laravel-gemini. For local debugging without API costs, add dakshraman/laravel-ai-debugger — but note that Gemini CLI as a backend is no longer available for consumer accounts.

Mid-size teams (10-50 developers): Standardize on hosseinhezami/laravel-gemini with API-key authentication. Budget for Gemini Code Assist Standard at ~$22.80/user/month if you want IDE integration with higher quotas. The per-token API path gives you more control over costs but requires monitoring usage. Gemini 3.5 Flash at $1.50/$9.00 per million tokens is your cost-efficient default for high-volume tasks.

Enterprise teams (50+ developers): Evaluate the Interactions API directly. Google’s Managed Agents now support background execution, remote MCP integration, and custom function calling — features that the CLI-proxy packages were trying to approximate through undocumented endpoints. Code Assist Enterprise at ~$45/user/month adds code customization, security review, and deeper IDE integration.

What to avoid: Any package that requires Gemini CLI OAuth credentials. The ursamajeur/laravel-ai-gemini-driver is technically impressive, but it proxies an endpoint Google has deprecated for consumers and explicitly warns may violate ToS. The multi-model routing and cascade fallback features are real — but they’re built on a foundation that Google has already pulled.

The Real Question

The Laravel AI package ecosystem isn’t waiting for official API stability — it’s building ahead of it. That’s admirable. But building production-grade multi-model routing on top of a CLI tool that Google deliberately killed for consumers six weeks after the packages shipped is a predictable dead end. The question isn’t whether Google will retire consumer CLI access again. They already did. The question is whether your integration architecture depends on endpoints Google controls — or on APIs Google documents and supports.

If you’re evaluating alternatives after the shutdown, our Gemini CLI Commands Reference covers what still works and what doesn’t. The only durable path is direct Gemini API or the laravel/ai SDK against Google’s documented Interactions API. Everything else is a countdown timer.