DEV Community

Alex Morgan
Alex Morgan

Posted on • Originally published at saaswithalex.pages.dev

Gemini CLI for Rails: The Terminal Agent That Got Pulled

Google's open-source Gemini CLI amassed over 100,000 GitHub stars and 6,000 merged pull requests before the company cut off free consumer access on June 18, 2026, leaving Rails developers who'd built terminal workflows around it scrambling for alternatives. If you were using it for codebase exploration, refactoring monoliths, or automating test generation in a Rails project, that tool is effectively dead unless you're on an enterprise license or paying for API keys. The Apache 2.0 repo still exists. The model serving that made it useful does not.

This matters for Rails teams specifically because terminal-native agents fit the framework's workflow patterns well — you live in the shell, you run generators, you pipe things. But what I call the Rented Engine Trap means you're not actually in control of your tooling. You're borrowing the engine from a vendor who can repossess it. If you're evaluating terminal AI agents for a Rails codebase right now, you need to understand what happened, what still works, and where the real costs hide.

What happened to Gemini CLI for Rails developers?

On June 18, 2026, Google stopped serving Gemini CLI requests for free, Google AI Pro, and Google AI Ultra individual accounts, as well as individual Gemini Code Assist users, per the official transition announcement. The code didn't vanish — the repository is still Apache 2.0 — but the free model access that made the tool useful did. If you had gemini wired into shell scripts, CI pipelines, or cron jobs for your Rails app, those calls started failing silently that day with no grace period.

Gemini CLI continues to work for teams only via an enterprise Gemini Code Assist license or a paid Gemini API key after June 18, 2026, per Tembo's pricing analysis. So the open-source CLI isn't gone — it's gated. The distinction matters: you can still fork the code, install the binary, and configure it. You just can't get model responses without paying.

The replacement is Antigravity CLI, which became available on May 19, 2026 and retains Agent Skills, Hooks, Subagents, and Extensions as plugins, but is closed-source and built in Go, per the Google Developers Blog. Google explicitly stated there's no 1:1 feature parity at launch. For Rails teams that had invested time in configuring custom subagents or MCP servers, that's a migration, not an upgrade.

The contrarian read here is hard to avoid: those 6,000 merged PRs and 100k+ stars weren't community empowerment. They were free product development labor that Google absorbed and then abandoned when launching a closed-source successor with tighter limits. If you contributed to that repo, your work is now funneling users toward a tool you can't inspect.

How does Gemini CLI pricing work for Rails teams?

The pricing landscape shifted fundamentally on June 18. Here's what the current state looks like for a Rails team trying to budget for terminal AI tooling:

Tool Pricing Key Features Target Audience
Gemini CLI (paid API key) Pay-as-you-go usage-based per Tembo Subagents, plan mode, MCP support, open-source Apache 2.0 Teams with API budget who need the open-source agent
Gemini CLI (enterprise) Enterprise Gemini Code Assist license per Tembo Same features, org-level access, CI/CD integration Organizations with Google Cloud contracts
Antigravity CLI (free) $0, ~20 requests/week per 7minAI Async multi-agent, Go binary, closed-source Individual developers on tight budgets

The free tier collapse is the number that should make you pause. The pre-cutoff Gemini CLI free tier was 1,000 requests per day on a personal Google account; the post-cutoff Antigravity CLI free tier is reported at roughly 20 requests per week by third-party trackers — a ~98% reduction, though Google does not publish an exact figure, per 7minAI's coverage. You went from a number you could plan around to a meter you can't read.

For paid paths, Gemini Code Assist offers Standard and Enterprise licenses that retain Gemini CLI access for organizations after the June 18, 2026 cutoff, per Tembo's breakdown. The Standard tier runs $19 per user per month and Enterprise at $45 per user per month, per DEV Community's cost analysis. But the real spend hides in thinking tokens — Gemini bills reasoning as output, so the background thinking a model does before answering is charged at full output rate. On Gemini 3.1 Pro Preview, that's $12.00 per million tokens for prompts up to 200k, rising to $18.00 above 200k. Developers on Google's AI developer forum have reported daily costs of $100 to $140 after switching to thinking models.

Here's why that matters for Rails specifically: if you're pointing a terminal agent at a large monolith with a deep test suite and asking it to reason across models, controllers, and services, you're generating far more output tokens than the code you see. A heavy refactoring session emitting 3 million output tokens on Gemini 3.1 Pro costs about $36 in output alone. Run three or four sessions like that in a day and you're at $100+. For a deeper dive into the full pricing arc and hidden billing risks, check out our Gemini CLI pricing breakdown.

Which Gemini CLI features matter most for Rails codebases?

Two features stood out for Rails work before the cutoff, and both survive in the paid path: subagents and plan mode.

Subagents, introduced April 15, 2026, allow Gemini CLI to delegate complex tasks to specialized agents with isolated context windows, per the Google Developers Blog. For a Rails codebase, this means you could spin up a subagent to investigate your ActiveRecord models while another handles route mapping — each with its own context, tools, and system instructions. The main session stays lean. You define custom subagents as Markdown files with YAML frontmatter, and you can commit them to .gemini/agents in your repo so the whole team shares the same specialist agents.

Plan mode, introduced March 11, 2026, restricts the agent to read-only tools — it can navigate your codebase, search for patterns, and read documentation, but can't modify files, per the Google Developers Blog. For Rails, this is genuinely useful when you want to understand how a complex has_many :through chain works across your domain models before committing to a refactor. The agent maps dependencies, proposes a strategy, and asks clarifying questions via the ask_user tool before you switch to edit mode.

The tradeoff is that these advanced agent features require meaningful request volume to be useful. The free quota reduction to roughly 20 requests per week makes subagent workflows — which might spawn multiple parallel agents per task — effectively unusable on the free tier. You'll burn through a week's quota in a handful of prompts. For more on what still works after the shutdown, see our commands reference.

What security risks should Rails teams watch for?

Two security threads are running simultaneously for Rails teams using AI agents, and they're independent enough that you need to address both.

First, a prompt injection attack named 'Comment and Control' was confirmed to affect Gemini CLI Action via crafted GitHub comments, allowing extraction of API keys; Google awarded a $1,337 bug bounty, per SecurityWeek. The attack works by crafting GitHub issue comments or PR titles that trick the AI agent into executing arbitrary commands and revealing secrets. If you have Gemini CLI Action running on your Rails repo's GitHub Actions, an attacker can inject a prompt via a PR comment that bypasses guardrails and extracts your API key. The pattern applies to any AI agent that ingests untrusted GitHub data and has access to execution tools in the same runtime as production secrets.

Second, Ruby on Rails released security patches 7.2.3.2, 8.0.5.1, 8.1.3.1 on July 29, 2026 to fix CVE-2026-66066, a critical Active Storage vulnerability allowing arbitrary file read and potential RCE via crafted image uploads when libvips is used, per the Rails security advisory. This is a 9.5 severity CVE. An unauthenticated attacker can upload a specially crafted image to read arbitrary files from your server — including secret_key_base, database credentials, and cloud storage keys. libvips is the default processor in official Rails Docker images, Debian, and Ubuntu setups. If your Rails app handles user-uploaded images and you haven't patched yet, this is more urgent than your AI tooling choices.

The intersection of these two risks is where it gets nasty. If an attacker can exploit CVE-2026-66066 to read your environment variables, and you have a Gemini API key stored there for CI automation, they've got access to your AI agent's credentials too. Patch your Rails app first. Then audit your GitHub Actions for agent integrations.

When should you use Gemini CLI vs alternatives for Rails?

The honest answer depends on your team's size, budget, and tolerance for vendor dependency. Here's the decision framework:

Use Gemini CLI with a paid API key if: You need the open-source Apache 2.0 license for compliance or forkability reasons, you want subagents and plan mode for complex Rails refactoring workflows, and you can absorb usage-based costs that might spike during heavy reasoning sessions. You're paying for transparency and control over the agent layer.

Use enterprise Gemini Code Assist if: Your organization already has a Google Cloud contract, you need org-level access controls, and your team is large enough that $19–$45 per user per month is cheaper than pay-as-you-go API pricing for high-volume usage. This is the path that keeps CI/CD integration intact.

Use Antigravity CLI if: You're an individual developer who needs a free terminal agent and can work within ~20 requests per week. The async multi-agent workflows are genuinely new — you can spawn background subagents for concurrent research or refactoring tasks. But you're trading open-source transparency for a closed-source Go binary with unpublishable quotas.

Use Claude Code instead if: Code quality and multi-file reasoning matter more than cost, and you can absorb $20/month for Pro or $100–$200/month for Max. Claude Code isn't open source, but it's also not pretending to be — and Anthropic hasn't pulled a bait-and-switch on its access model. For a head-to-head breakdown, see our Gemini CLI vs Claude Code comparison.

The pattern I've observed is straightforward: terminal AI agents authenticated via vendor OAuth are rented infrastructure. The 6,000 community PRs didn't change that. Teams that need reliable CI integration should use paid API keys or self-hosted models to avoid silent breakage when vendors reshuffle their product strategy. The tools that win long-term integrate transparently into existing workflows rather than demanding workflow rewrites — and right now, Gemini CLI demands a rewrite whether you stay or migrate.

The open question for Rails teams: is any vendor-controlled terminal agent worth building CI automation around, or should we be looking at self-hosted models for the automation path specifically? The answer probably depends on how much you trust the vendor not to repossess the engine.


Originally published at SaaS with Alex

Top comments (0)