Gemini CLI Guardrails
Before-tool command guardrails for Gemini CLI
APort configures Gemini CLI guardrails through the same command-hook adapter used by the newer CLI harnesses. The gemini alias installs policy checks for shell, file, web, and MCP-style tool calls before execution.
Quick Start
1. Create passport & config
npx @aporthq/aport-agent-guardrails gemini
2. Install guardrails package
npx @aporthq/aport-agent-guardrails gemini
3. Add to your code
# Gemini CLI setup; gemini is an alias for gemini-cli npx @aporthq/aport-agent-guardrails gemini # Start in warn mode for rollout: npx @aporthq/aport-agent-guardrails mode gemini --enforcement=warn
How It Works
Passport
Your agent gets an OAP passport declaring its identity, capabilities, and operational limits.
Evaluate
Before every tool call, the guardrail evaluates it against the passport's policy. Locally or via hosted API.
Decision
Allow or deny with structured OAP reason codes. Signed decisions create an auditable trail.
Frequently Asked Questions
Why does the installer use gemini instead of gemini-cli?
The CLI is commonly invoked as gemini, so APort supports that alias while keeping gemini-cli as the canonical framework identifier in passports and docs.
Ready to secure your Gemini CLI agents?
Get started in under 2 minutes with a single command.
Start free for local or individual setup. Upgrade to Team for hosted org audit, signed decisions, GitHub guardrails, and shared enforcement across your team.