gemini-cli

A setup command for using Google's Gemini CLI, an open-source terminal tool for AI-assisted coding, with Marko projects. It adds project guidance, connected tools, and Marko skills for Gemini CLI.

In plain words
What is it for?
Use it to create or update GEMINI.md, register the Marko MCP server, and distribute Marko skills to Gemini CLI.
Why use it?
It saves you from configuring Gemini CLI by hand and gives it Marko-specific instructions. The generated guidance can be refreshed while keeping your edits outside its marked section.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/marko-php/marko/gemini-cli
Clone the repo
git clone --depth 1 https://github.com/marko-php/marko
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00025 $0.00836
Opus 5 $0.00013 $0.00418
Sonnet 5 $0.00005 $0.00167
Haiku 4.5 $0.00003 $0.00084

Measured 2d ago against content hash 2ab457b47e8f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gemini-cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/docs-markdown/docs/ai-assisted-development/agents/gemini-cli.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Gemini CLI is Google's open-source agentic terminal tool powered by Gemini models. devai:install configures it with a GEMINI.md project guidelines file, MCP server registration via the gemini mcp add CLI, and Marko skills distributed to .gemini/skills/.

Prerequisites

  • Gemini CLI installed: npm install -g @google/gemini-cli
  • Authenticated: gemini auth login (Google account or API key)
  • marko/devai installed (see Installation)

What devai:install writes

Running marko devai:install with Gemini CLI detected produces the following:

GEMINI.md                          # Project guidelines for Gemini CLI
.gemini/skills/                    # Marko skill files distributed for Gemini CLI
AGENTS.md                          # Shared guidelines file (devai-managed marker block)

MCP registration is performed via the Gemini CLI (gemini mcp add) rather than by writing a config file. Gemini CLI does not implement LSP registration.

GEMINI.md

The root GEMINI.md file receives Marko project guidelines inside a <!-- BEGIN/END marko:devai --> marker block, so your own edits outside the markers survive re-runs (see Editing generated files):

  • Module structure and naming conventions
  • Available MCP tools and their usage patterns
  • Project-specific guidelines from every installed package's resources/ai/guidelines.md

MCP registration

The installer calls gemini mcp add -s project -t <transport> <serverName> <command> [args] to register marko mcp:serve as a project-scoped MCP server. Gemini CLI stores this registration in its own configuration; no .gemini/settings.json file is written by devai:install.

Skills

Marko skill bundles are written to .gemini/skills/ so Gemini CLI can reference them during agentic tasks.

AGENTS.md

devai:install writes the shared AGENTS.md guidelines inside a <!-- BEGIN/END marko:devai --> marker block: created if absent, and on later runs only the marked region is refreshed, so content you add outside the markers is preserved. Remove the markers to take full ownership — devai then leaves the file alone. See Editing generated files.

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 64 lines · 25 tokens per session scan A 2ab457b47e8f

Subscribe to this mod's changes

gemini-cli is an agent published in the GitHub repository marko-php/marko (393 stars, last pushed 3d ago), licensed MIT. It adds 25 tokens to every session and 836 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.