A Gemini CLI extension that brings Symbiont's zero-trust AI agent governance to your development workflow. Enforce Cedar authorization policies, verify MCP tool integrity with SchemaPin, maintain cryptographic audit trails, and manage governed agents -- all from within Gemini CLI.
- Gemini CLI installed
symbibinary on PATH (optional -- extension degrades gracefully without it)jqfor JSON parsing in hook scripts (apt install jq/brew install jq)
Install symbi:
# From source
cargo install symbi
# Or via Docker
docker pull ghcr.io/thirdkeyai/symbi:latestOr run the included install script:
./install.shgemini extensions install https://github.com/thirdkeyai/symbi-gemini-cliFor development:
git clone https://github.com/thirdkeyai/symbi-gemini-cli
cd symbi-gemini-cli
gemini extensions link .- Install the extension (see above)
- Run
/symbi:initto scaffold a governed project - Define agents in
agents/*.dsl - Create Cedar policies in
policies/*.cedar - Use
/symbi:statusto verify everything is connected
Skills require experimental.skills to be enabled in Gemini CLI settings.
| Skill | Description |
|---|---|
/symbi-init |
Scaffold a governed agent project with starter files |
/symbi-policy |
Create, edit, or validate Cedar authorization policies |
/symbi-verify |
Verify MCP tool schemas using SchemaPin |
/symbi-audit |
Query and analyze cryptographic audit logs |
/symbi-dsl |
Parse, validate, and create Symbiont DSL agent definitions |
/symbi-agent-sdk |
Generate boilerplate for Gemini CLI + ORGA governance |
| Command | Description |
|---|---|
/symbi:status |
Check health of the Symbiont runtime and installed components |
/symbi:init |
Quick project scaffold (command fallback when skills aren't enabled) |
/symbi:verify |
Verify MCP tool schemas |
Agents are a preview feature in Gemini CLI.
| Agent | Description |
|---|---|
symbi-governor |
Governance-aware coding agent. Enforces policies and maintains audit trails. |
symbi-dev |
DSL development specialist for writing agents and Cedar policies. |
The extension provides three progressive levels of protection, plus Gemini CLI native enforcement:
All tool calls proceed. State-modifying actions are logged to .symbiont/audit/tool-usage.jsonl for post-hoc review.
Create .symbiont/local-policy.toml to block dangerous patterns:
[deny]
paths = [".env", ".ssh/", ".aws/"]
commands = ["rm -rf", "git push --force"]
branches = ["main", "master", "production"]The policy-guard.sh hook blocks matching operations. Built-in patterns (destructive commands, force pushes, writes to sensitive files) are always blocked regardless of config.
No symbi binary required. Works with both symbi-gemini-cli and symbi-claude-code.
If symbi is on PATH and policies/ exists, the hook evaluates Cedar policies for formal authorization decisions.
The extension also leverages Gemini CLI's native enforcement -- features not available in other AI assistants:
excludeTools: Manifest-level blocking of destructive commands. Enforced by Gemini CLI runtime, cannot be bypassed by hooks or prompts.- Native policies (
policies/symbi-guard.toml): Platform-level rule matching enforced by Gemini CLI itself, independent of hook scripts.
This gives the Gemini CLI extension three independent enforcement layers: manifest exclusions, native policies, and hook-based deny lists.
Hooks apply to write_file, replace, run_shell_command, and all symbi__* tools:
- PreToolUse (
policy-guard.sh): Blocks dangerous operations (exit code 2) - PreToolUse (
policy-log.sh): Advisory logging of state-modifying tool calls - PostToolUse (
audit-log.sh): Logs tool usage to.symbiont/audit/tool-usage.jsonl
When symbi is on PATH, the extension connects to the Symbiont MCP server exposing:
symbi__invoke_agent-- Run a governed agent with a promptsymbi__list_agents-- List available agents fromagents/*.dslsymbi__parse_dsl-- Parse and validate DSL filessymbi__get_agent_dsl-- Read an agent's DSL definitionsymbi__get_agents_md-- Get the project's AGENTS.md contentsymbi__verify_schema-- Verify a tool schema with SchemaPin
The extension supports two integration patterns:
Developer installs the extension directly into Gemini CLI. The extension spawns its own symbi mcp server, provides policy checking via hooks and native policies, and logs to local audit files.
Developer -> Gemini CLI + symbi extension -> symbi mcp (stdio)
Best for: individual developers adding governance awareness to their workflow.
Symbiont's CliExecutor spawns Gemini CLI as a governed subprocess. The extension detects SYMBIONT_MANAGED=true and defers to the outer ORGA Gate for hard enforcement that cannot be bypassed.
Symbiont Runtime (ORGA Loop)
-> CliExecutor (sandbox + budget enforcement)
-> Gemini CLI (with symbi extension)
-> Extension connects back to parent MCP server
Best for: automated pipelines, dark factory deployments, enterprise governance.
See examples/ for complete setups of each mode.
| Directory | Description |
|---|---|
examples/standalone/ |
Mode A setup for individual developers |
examples/cli-executor/ |
Mode B setup with DSL + Cedar policy for ORGA-wrapped Gemini CLI |
examples/agent-sdk/ |
Headless agent wrapper pattern for programmatic use |
Capabilities available in Gemini CLI that the Claude Code plugin doesn't have:
- Native policy engine:
policies/*.tomlfiles provide governance without the symbi binary excludeToolsin manifest: Declaratively block dangerous tools at the extension level- Pattern-specific tool exclusion: e.g.,
run_shell_command(rm -rf)blocking - Secure settings storage:
"sensitive": truefor API keys in system keychain
Project-level configuration lives in symbiont.toml (created by /symbi:init).
| Path | Purpose |
|---|---|
agents/*.dsl |
Agent DSL definitions |
policies/*.cedar |
Cedar authorization policies |
symbiont.toml |
Symbiont runtime configuration |
AGENTS.md |
Agent manifest |
.symbiont/audit/ |
Audit log output |
.symbiont/local-policy.toml |
Developer-defined deny rules (Tier 2) |
policies/symbi-guard.toml |
Gemini CLI native policy rules |
This extension delivers the same Symbiont governance capabilities as symbi-claude-code, adapted for Gemini CLI's extension format. Key differences:
| Aspect | Claude Code | Gemini CLI |
|---|---|---|
| Commands | Markdown files | TOML files |
| MCP tool prefix | mcp__symbi__ |
symbi__ |
| Native policies | No | Yes (policies/*.toml) |
| Tool restriction | Allow list | Deny list (excludeTools) |
| Context file | CLAUDE.md |
GEMINI.md |
Apache 2.0 -- see LICENSE.
This project is not affiliated with, endorsed by, or sponsored by Google LLC. "Gemini" and "Gemini CLI" are trademarks of Google LLC. "Symbiont" and "ThirdKey" are trademarks of ThirdKey AI.
