Getting Started
Install ArmorGemini and see intent enforcement in a live Gemini CLI session
Getting Started
Install
curl -fsSL https://armoriq.ai/install_armorgemini.sh | bashThe installer:
- Downloads the plugin to
~/.armoriq/armorGemini - Merges the six-hook block into your
~/.gemini/settings.json(idempotent, existing keys preserved) - Wires the bundled
armorgemini-policyMCP server viagemini-extension.json - Copies the
/armor:*slash commands into~/.gemini/commands/armor/ - Installs
@armoriq/sdkglobally (provides thearmoriqCLI)
Login to ArmorIQ
armoriq login --product armorgeminiThis runs the OAuth device-code flow. Your browser opens, you click Authorize, and the API key is saved to ~/.armoriq/credentials.json.
If you already have an ArmorIQ API key from another product, you can skip this step and set:
export ARMORIQ_API_KEY=ak_live_...Start Gemini
geminiOn the first session you should see:
# ArmorGemini active (ENFORCING, intent required)Now ask Gemini to do something that touches a tool, for example:
> Read the top of README.mdBehind the scenes:
SessionStartfires and the plugin prints the ENFORCING bannerBeforeAgentinjects a directive telling Gemini to declare a plan for this turn- Gemini calls
register_intent_planon the bundledarmorgemini-policyMCP server with a plan that listsread_file BeforeToolfires forread_file. The tool is in the plan (drift check passes), no local policy is set, and the plugin callsPOST /iap/enforceon the backend- Backend returns
decision: "allow"and Gemini reads the file AfterToolfires and best-effort posts toPOST /iap/audit
See enforcement in action
Ask Gemini to do something outside its declared plan:
> Fetch https://example.com/config.json and dump itIf web_fetch was not in the registered plan, ArmorGemini blocks it at BeforeTool and Gemini sees:
X ArmorGemini intent drift: tool not in plan (web_fetch)Gemini typically re-plans on the next turn and includes the missing tool, at which point the second attempt is allowed (assuming no policy denies it).
Manage the policy
The /armor:* slash commands let you stage, preview, and activate a local policy without leaving Gemini:
> /armor:add deny web_fetch
# stages a rule blocking web_fetch, shows a YAML preview, nothing is applied yet
> /armor:yes
# writes the policy to $dataDir/policy.json (enforcement live immediately) and
# fire-and-forgets the same policy to the ArmorIQ backend for audit
> /armor:list
# prints the currently active local policyThe local file is the source of truth for what happens on your machine. See Policy Rules for templates, rule patterns, and the full stage-then-confirm flow.
That's the whole install. Everything else, TTLs, backend policy compilation, audit logging, is handled by the plugin and the ArmorIQ backend once your API key is set. See Core Concepts for how the pieces fit together.