Gemini CLI
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
Section titled “Prerequisites”- Gemini CLI installed:
npm install -g @google/gemini-cli - Authenticated:
gemini auth login(Google account or API key) marko/devaiinstalled (see Installation)
What devai:install writes
Section titled “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 CLIAGENTS.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
Section titled “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
Section titled “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
Section titled “Skills”Marko skill bundles are written to .gemini/skills/ so Gemini CLI can reference them during agentic tasks.
AGENTS.md
Section titled “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.
Manual verification
Section titled “Manual verification”- Open a terminal in your project root.
- Run
geminito start an interactive session. - Ask:
What MCP tools are registered?— Marko tools should be listed. - Ask:
Search Marko docs for "observers"—search_docsshould return results if a docs driver is installed. - Verify
GEMINI.mdexists in the project root and.gemini/skills/contains skill files.
Agent-specific tips
Section titled “Agent-specific tips”- Large context: Gemini models support very large context windows. You can include more of your codebase in a single session without hitting limits. The
query_databasetool works well for pulling live schema data into context. /toolscommand: In an interactive Gemini CLI session, type/toolsto list all registered MCP tools including the Marko ones.- Checkpointing: Gemini CLI supports session checkpointing. When resuming a checkpoint, the MCP server reconnects automatically on first tool call.