Gemini CLI
CCE integrates with the Gemini CLI through its settings file and an instruction file.
Quick setup
Section titled “Quick setup”cce init # Auto-detects Gemini CLI if .gemini/ or GEMINI.md existscce init --agent all # Explicitly includes GeminiFiles created
Section titled “Files created”.gemini/settings.json
Section titled “.gemini/settings.json”Registers the CCE MCP server for Gemini CLI.
{ "mcpServers": { "context-engine": { "command": "cce", "args": ["serve", "--project-dir", "/path/to/your/project"] } }}GEMINI.md
Section titled “GEMINI.md”Contains instructions for Gemini to prefer context_search over reading files directly. The CCE block is wrapped in markers so your own content is preserved.
Verify it’s working
Section titled “Verify it’s working”- After
cce init, start a new Gemini CLI session in your project directory - Ask a code question:
What's the main entry point of this project?- Check the tool output for
context_searchcalls - Run
cce savingsto see token savings
Cross-agent memory
Section titled “Cross-agent memory”If you use both Gemini CLI and Claude Code on the same project, decisions recorded in one session are available to the other via session_recall. Memory is stored per-project in memory.db, not per-agent.
Troubleshooting
Section titled “Troubleshooting”Gemini doesn’t use context_search
Section titled “Gemini doesn’t use context_search”Check that GEMINI.md exists and contains the CCE instructions block. Gemini CLI reads this file at session start. If missing, re-run cce init.
”cce: command not found”
Section titled “”cce: command not found””Gemini CLI inherits PATH from your shell. Ensure ~/.local/bin is in your PATH if you installed with uv tool install.
Auto-detection doesn’t find Gemini
Section titled “Auto-detection doesn’t find Gemini”CCE looks for .gemini/ directory or GEMINI.md in the project root. If neither exists, use cce init --agent all to force configuration.