# Feature catalog — google-gemini/gemini-cli

> Canonical page: https://codevetter.com/unpack/gemini-cli/feature-catalog

# Feature catalog — google-gemini/gemini-cli

Scanned commit d5b3e3accb26000d273abf16e0f1dd83aa5428a9 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

User-facing surface is broad: a yargs-driven CLI with subcommands (mcp, extensions, skills, hooks, gemma) plus ~45 built-in slash commands, custom TOML commands, and MCP-prompt commands. The agent can call ~20 built-in tools (file IO, shell, grep/glob/ripgrep, web fetch/search, todos, plan mode, tracker tasks, skills, subagents incl. a browser agent). Auth supports Google OAuth, Gemini API key, Vertex AI, compute ADC, and gateway modes. Features include session resume/checkpointing/rewind, GEMINI.md hierarchical memory, hooks, policies, extensions, skills, ACP editor mode, A2A server, voice mode, IDE integration, worktrees, and multiple output formats (text/json/stream-json).
- CLI flags are defined with yargs in parseArguments: --model, --prompt/-p (headless), --prompt-interactive/-i, --sandbox, --yolo, --approval-mode, --policy, --admin-policy, --acp, --allowed-tools, --allowed-mcp-server-names, --extensions, --resume, --session-id, --session-file, --list-sessions, --delete-session, --include-directories, --output-format, --fake-responses, --record-responses, --raw-output, plus positional query. — [packages/cli/src/config/config.ts#L282-495](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/config/config.ts#L282-L495)
- Five yargs subcommands are registered alongside the default '$0 [query..]' launcher: mcpCommand, extensionsCommand, skillsCommand, hooksCommand, gemmaCommand. — [packages/cli/src/config/config.ts#L275-282](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/config/config.ts#L275-L282) [packages/cli/src/commands/mcp.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/commands/mcp.ts) [packages/cli/src/commands/extensions.tsx](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/commands/extensions.tsx) [packages/cli/src/commands/skills.tsx](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/commands/skills.tsx)
- BuiltinCommandLoader registers ~45 slash commands (/about /agents /auth /bug /chat /clear /compress /copy /directory /docs /editor /extensions /help /hooks /ide /init /mcp /memory /model /permissions /plan /policies /privacy /quit /restore /resume /stats /theme /tools /skills /settings /tasks /vim /rewind ...), many gated by config flags such as isAgentsEnabled, isPlanEnabled, isSkillsSupportEnabled, getFolderTrust, or nightly/dev builds. — [packages/cli/src/services/BuiltinCommandLoader.ts#L123-242](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/services/BuiltinCommandLoader.ts#L123-L242)
- Config.createToolRegistry registers the built-in tool set conditionally via maybeRegister (honoring the coreTools allowlist): UpdateTopic, LS, ReadFile, RipGrep-or-Grep fallback, Glob, ActivateSkill, Edit, WriteFile, WebFetch, ReadMcpResource, ListMcpResources, Shell, background-process tools, WebSearch, AskUser, WriteTodos, Enter/ExitPlanMode, Tracker* tools, and AgentTool. — [packages/core/src/config/config.ts#L3932-4087](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/config/config.ts#L3932-L4087) [packages/core/src/tools/tool-names.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/tools/tool-names.ts)
- Six AuthType values are supported (oauth-personal LOGIN_WITH_GOOGLE, gemini-api-key, vertex-ai, legacy cloud-shell, compute-default-credentials, gateway); getAuthTypeFromEnv auto-detects via GOOGLE_GENAI_USE_GCA, GOOGLE_GENAI_USE_VERTEXAI, GOOGLE_GEMINI_BASE_URL, GEMINI_API_KEY, CLOUD_SHELL/GEMINI_CLI_USE_COMPUTE_ADC. — [packages/core/src/core/contentGenerator.ts#L63-100](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/core/contentGenerator.ts#L63-L100)
- Sessions are recorded as JSONL files named session-<ts>-<id>.jsonl under the project's temp 'chats' dir; they can be resumed via --resume/--session-id, imported via --session-file (filtering to user/gemini messages), listed via --list-sessions, and deleted via --delete-session. — [packages/cli/src/gemini.tsx#L336-407](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/gemini.tsx#L336-L407) [packages/cli/src/gemini.tsx#L799-826](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/gemini.tsx#L799-L826) [packages/core/src/services/chatRecordingService.ts#L28-40](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/services/chatRecordingService.ts#L28-L40)
- Custom slash commands are user-defined TOML files (required 'prompt', optional 'description' per TomlCommandDefSchema) scanned from user, project, and extension command dirs by FileCommandLoader, with !{...} shell injection and @file injection prompt processors that can require confirmation. — [packages/cli/src/services/FileCommandLoader.ts#L55-90](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/services/FileCommandLoader.ts#L55-L90) [packages/cli/src/services/prompt-processors/shellProcessor.ts#L24-53](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/services/prompt-processors/shellProcessor.ts#L24-L53) [docs/cli/custom-commands.md](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/docs/cli/custom-commands.md)
- MCP servers from settings/extensions are connected by McpClientManager during Config._initialize; MCP prompts become slash commands via McpPromptLoader and MCP tools enter the ToolRegistry as DiscoveredMCPTool instances. — [packages/core/src/config/config.ts#L1506-1531](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/config/config.ts#L1506-L1531) [packages/core/src/tools/mcp-client-manager.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/tools/mcp-client-manager.ts) [packages/core/src/tools/mcp-tool.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/tools/mcp-tool.ts) [packages/cli/src/services/McpPromptLoader.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/services/McpPromptLoader.ts)
- An extension system (ExtensionManager) installs/loads extensions from git clones or GitHub releases, hydrates variables, manages consent and per-extension settings/env files, contributes MCP servers, commands, agents, skills, hooks, themes, and TOML policies, and enforces admin allowlists and integrity checks. — [packages/cli/src/config/extension-manager.ts#L1-110](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/config/extension-manager.ts#L1-L110) [packages/cli/src/config/extensions/github.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/config/extensions/github.ts) [packages/cli/src/config/extensions/consent.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/config/extensions/consent.ts) [docs/extensions/index.md](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/docs/extensions/index.md)
- A hook system (HookSystem/HookRegistry/HookRunner/HookAggregator/HookPlanner) fires lifecycle events — SessionStart/End, Before/AfterAgent, Before/AfterModel, BeforeToolSelection, Before/AfterTool — whose outputs can inject context, block/stop execution, synthesize model responses, or modify tool/config. — [packages/core/src/hooks/hookSystem.ts#L38-120](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/hooks/hookSystem.ts#L38-L120) [packages/core/src/hooks/hookRegistry.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/hooks/hookRegistry.ts) [packages/cli/src/gemini.tsx#L937-958](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/gemini.tsx#L937-L958) [docs/hooks/index.md](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/docs/hooks/index.md)
- Subagents are a feature: AgentRegistry loads local agent definitions (built-ins include CodebaseInvestigatorAgent, CliHelpAgent, GeneralistAgent, BrowserAgentDefinition) plus remote A2A agents, exposes them through AgentTool, and supports hot reload with new/updated/deleted summaries. — [packages/core/src/agents/registry.ts#L50-120](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/agents/registry.ts#L50-L120) [packages/core/src/agents/agent-tool.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/agents/agent-tool.ts) [packages/core/src/agents/codebase-investigator.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/agents/codebase-investigator.ts) [docs/core/subagents.md](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/docs/core/subagents.md)
- ACP mode (--acp) runs the CLI as an Agent Client Protocol stdio server via runAcpClient with session management, RPC dispatch, and a filesystem bridge for editor clients such as Zed. — [packages/cli/src/acp/acpStdioTransport.ts#L15](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/acp/acpStdioTransport.ts#L15) [packages/cli/src/acp/acpSessionManager.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/acp/acpSessionManager.ts) [packages/cli/src/acp/acpFileSystemService.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/acp/acpFileSystemService.ts) [docs/cli/acp-mode.md](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/docs/cli/acp-mode.md) [packages/cli/src/gemini.tsx#L874-876](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/gemini.tsx#L874-L876)
- Headless mode supports three output formats — TEXT (ANSI-stripped via stripAnsi unless --raw-output), JSON (JsonFormatter with stats), and STREAM_JSON (StreamJsonFormatter emitting INIT/MESSAGE/TOOL_USE/TOOL_RESULT/ERROR/RESULT events). — [packages/cli/src/nonInteractiveCli.ts#L65-72](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/nonInteractiveCli.ts#L65-L72) [packages/cli/src/nonInteractiveCli.ts#L118-121](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/nonInteractiveCli.ts#L118-L121) [packages/cli/src/nonInteractiveCli.ts#L252-260](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/nonInteractiveCli.ts#L252-L260) [docs/cli/headless.md](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/docs/cli/headless.md)
- Hierarchical memory loads GEMINI.md-style context files discovered upward/downward from the project (memoryDiscovery), surfaced through MemoryContextManager and the /memory command, with a memoryTool letting the model save facts. — [packages/core/src/utils/memoryDiscovery.ts#L248-458](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/utils/memoryDiscovery.ts#L248-L458) [packages/core/src/config/memory.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/config/memory.ts) [packages/core/src/tools/memoryTool.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/tools/memoryTool.ts) [docs/cli/gemini-md.md](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/docs/cli/gemini-md.md)
- Additional user-facing features include git worktree startup (--worktree via setupWorktree which chdirs before config load), checkpointing/rewind via GitService, a local Gemma model router (LiteRtServerManager, user-scope-only binary path), voice mode transcription providers, and IDE context sharing with the VS Code companion. — [packages/cli/src/gemini.tsx#L496-505](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/gemini.tsx#L496-L505) [packages/cli/src/gemini.tsx#L848-863](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/gemini.tsx#L848-L863) [packages/core/src/config/config.ts#L3835](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/config/config.ts#L3835) [packages/core/src/voice/transcriptionFactory.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/core/src/voice/transcriptionFactory.ts) [packages/cli/src/utils/worktreeSetup.ts](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/packages/cli/src/utils/worktreeSetup.ts) [docs/cli/git-worktrees.md](https://github.com/google-gemini/gemini-cli/blob/d5b3e3accb26000d273abf16e0f1dd83aa5428a9/docs/cli/git-worktrees.md)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
