Guard get started
Install hol-guard to protect AI coding agents on your machine. Guard reviews shell commands, file access, package installs, and MCP tool calls before they run, and records what it decided.
Guard is local-first. Protection, approvals, and receipts work without signing in. Guard Cloud is optional and adds shared history and team controls. See Local-first and optional cloud.
The Guard source, issue tracker, and releases are in hashgraph-online/hol-guard.
InstallDirect link to Install
Guard needs Python 3.10 or newer. Install it with pipx so it gets its own environment:
pipx install hol-guard
hol-guard --version
pip install hol-guard in a virtual environment you manage also works.
Guard's native runtime ships in platform wheels for macOS (Apple silicon and Intel), Linux x86_64, and Windows (x64 and ARM64). Other platforms get a pure-Python wheel that does not include the runtime. The stable native wheels for Intel macOS and Windows ARM64 are attached to the GitHub release instead of PyPI.
Other ways to install and update:
- The install page at hol.org/guard/install lists the current install options.
hol-guard updateupdates thehol-guardpackage in the environment it runs from. Use--dry-runto preview it and--alphato move to the newest alpha release. On Intel macOS and Windows ARM64, or when the bundled runtime is missing, it installs the matching native wheel from the GitHub release and checks it against the digest manifest published in the PyPI wheel.--wheel <path>installs a local wheel file.hol-guard uninstall --selfdisconnects the harnesses Guard manages, removes package shims and local Guard state, then removes the package. Use--dry-runfirst.
Guard Desktop is a separate native application that shows Guard's state. It reads from an installed Guard Core through hol-guard desktop bootstrap --json and does not replace the CLI install. Core stays the only authority for detection, policy, and approvals.
First runDirect link to First run
Run the guided setup:
hol-guard init
hol-guard init prints a plan, then asks before each side effect. The steps are:
- Open the local dashboard.
- Install Guard into the harnesses it detects.
- Optionally pair with Guard Cloud.
- Set up desktop notifications so approval prompts reach you outside the terminal.
Skip a step with --skip-apps, --skip-cloud, or --skip-notifications. Use --yes to approve every step without prompting, for automation only.
Then check the result:
hol-guard status
hol-guard doctor
hol-guard status shows what Guard is watching and the next recommended action. hol-guard doctor emits diagnostics. Pass a harness name (hol-guard doctor codex) for adapter-specific checks, or --harnesses to list every supported harness with its protection contract.
Supported harnessesDirect link to Supported harnesses
Use these IDs with install, run, detect, diff, and doctor:
| Harness | ID |
|---|---|
| Codex | codex |
| Claude Code | claude-code |
| GitHub Copilot CLI | copilot |
| Cursor | cursor |
| Cline | cline |
| Gemini CLI | gemini |
| Antigravity | antigravity |
| Grok | grok |
| Hermes | hermes |
| Kimi Code | kimi |
| Pi | pi |
| oh-my-pi | omp |
| OpenClaw | openclaw |
| OpenCode | opencode |
| ZCode | zcode |
| Devin | devin |
Paseo is covered through the native provider integrations above, with per-provider coverage. The harness support matrix lists the events, enforcement path, and approval delivery for each one.
Set up one harness manuallyDirect link to Set up one harness manually
Use this path when you want to control each step or skipped hol-guard init:
hol-guard detect codex --json
hol-guard install codex
hol-guard run codex --dry-run
hol-guard run codex
hol-guard detectlists the harnesses and artifacts Guard can find.hol-guard install <harness>enables Guard management for a harness. It accepts several harness names, or--all, and--dry-runpreviews the change.hol-guard run <harness> --dry-runrecords the current artifact state without launching.hol-guard run <harness>evaluates local policy, then launches. Guard stops and asks when a tool is new or changed.
hol-guard bootstrap is an older all-in-one discovery path that detects a harness, starts the approval center, and installs Guard for the best local target. Prefer hol-guard init.
To test or repair one harness integration later:
hol-guard apps test codex
hol-guard apps repair codex
hol-guard uninstall codex disables Guard management for that harness.
What install changesDirect link to what-install-changes
hol-guard install <harness> creates a launcher shim under Guard's home directory:
- macOS and Linux:
~/.hol-guard/bin/guard-<harness> - Windows:
~/.hol-guard/bin/guard-<harness>.cmd
Each harness also gets its own Guard-owned hooks or overlay. Examples:
- Codex: Guard-owned
PreToolUseandPermissionRequesthooks in.codex/config.toml, and the Codex hooks feature turned on.hol-guard run codexrefuses to launch if those hooks are missing or disabled. - Claude Code: Guard hook entries in
.claude/settings.local.jsonwhen you install from a workspace. - GitHub Copilot CLI: a Guard-owned repo hook file at
.github/hooks/hol-guard-copilot.jsonwhen you install from a workspace. - OpenCode: a Guard-owned runtime overlay under Guard's home directory, passed in when you launch through Guard, so your checked-in
opencode.jsonis not edited.
The harness guides list the files each integration touches.
Where Guard keeps state and configDirect link to Where Guard keeps state and config
Guard's home directory is ~/.hol-guard. Override it per command with --home or --guard-home, and point at a different workspace with --workspace.
| Path | Contents |
|---|---|
~/.hol-guard/config.toml | Home config: mode, default actions, per-harness, publisher, and artifact rules |
~/.hol-guard/guard.db | SQLite store for snapshots, diffs, receipts, saved decisions, and sync state |
~/.hol-guard/bin/ | Launcher shims |
<workspace>/.hol-guard.toml | Optional project override |
Older installs used ~/.config/.ai-plugin-scanner-guard, ~/.ai-plugin-scanner-guard, or ~/.holguard. Guard migrates one of those into ~/.hol-guard on first use. If the migration cannot complete, it keeps using the old directory. Guard still reads a legacy .ai-plugin-scanner-guard.toml project override, but new overrides should use .hol-guard.toml.
The local dashboardDirect link to The local dashboard
hol-guard dashboard opens the local dashboard in your browser. It is served from 127.0.0.1. The sidebar has these tabs:
| Tab | What it shows |
|---|---|
| Home | Protection overview and next actions |
| Inbox | Actions waiting for a Guard decision |
| Protect | Apps, integrations, and protection health |
| Extensions | Tools and capabilities protected on this device |
| Rules & exceptions | Remembered decisions, Guard Cloud rules, and exceptions |
| Supply chain | Packages, audits, and feed health |
| Settings | Local Guard preferences and security |
| Evidence | Receipts, commands, and security insights |
| Releases | Published Guard versions and what each one changed |
| About | Version, support, and diagnostics |
The Releases tab opens on the release you have installed when it is in the loaded page of the archive, and on the newest release otherwise. The local Guard daemon fetches the release list from hol.org on the tab's behalf, so the browser page itself does not contact hol.org. The same release notes are published at hol.org/guard/releases.
Resolve a paused actionDirect link to Resolve a paused action
By default Guard does not interrupt you. An action that needs review is denied, the agent receives the reason and guidance to continue with a permitted alternative, and Guard saves the denial in the Inbox. Hard blocks and sandbox-required actions stay enforced in every mode.
To get approval prompts instead, choose Ask me for approval under Settings, Approval gate, When Guard blocks a request in the dashboard, or set this in the home config:
blocked_request_mode = "ask"
The default is "safe-alternative". A workspace config cannot switch a machine to prompts. With ask, there are three approval paths:
- The harness's native approval prompt, where the harness already has a strong permission model.
- The local approval center on
127.0.0.1, which is the Inbox tab of the dashboard. - The terminal, with
hol-guard approvals.
hol-guard approvals
hol-guard approvals approve <request-id>
hol-guard approvals deny <request-id>
hol-guard diff codex
On macOS and Windows, Guard also sends a desktop notification for a new request. Set desktop_notifications = false in config.toml to turn that off.
How each harness delivers approvals differs. Codex answers in the same chat through MCP elicitation in the interactive CLI and the Codex app, and falls back to the approval center for headless sessions such as codex exec. See Local-first runtime and approvals and the harness support matrix.
Review what Guard decidedDirect link to Review what Guard decided
hol-guard receipts
hol-guard status
hol-guard inventory
hol-guard events
hol-guard receiptslists recorded decisions.hol-guard inventorylists tracked artifacts.hol-guard eventsshows a local lifecycle timeline. Use--name <event>to filter it.
Inspect commands before they runDirect link to Inspect commands before they run
hol-guard command test and hol-guard command explain classify a command and show the matching rules. They do not run the command or create an approval.
hol-guard command test 'git push --force'
hol-guard command explain 'git clean -ndx'
hol-guard command extensions
Check packagesDirect link to Check packages
hol-guard supply-chain sync
hol-guard supply-chain scan
hol-guard supply-chain explain [email protected] --ecosystem npm
hol-guard protect npm install <package> --dry-run
hol-guard supply-chain sync pulls the signed advisory bundle and sends no local paths or workspace data. hol-guard protect previews whether Guard would allow, warn, review, or block one install request. To intercept package managers on your PATH, use the dashboard's Protect tab or hol-guard package-shims install --manager npm. hol-guard package-shims status shows what is installed.
Fine-tune local policyDirect link to Fine-tune local policy
Guard resolves a decision in this order:
- Saved decisions, from
hol-guard allow,hol-guard deny, or an approval you chose to remember. - The project override file.
- The home config.
- Guard's built-in recommendation.
Home config example (~/.hol-guard/config.toml):
mode = "prompt"
default_action = "warn"
changed_hash_action = "require-reapproval"
desktop_notifications = true
[harnesses.codex]
default_action = "allow"
[publishers.hashgraph-online]
default_action = "allow"
[artifacts."codex:project:workspace_tools"]
default_action = "sandbox-required"
Project override example:
# .hol-guard.toml
[artifacts."codex:project:workspace_tools"]
default_action = "block"
Actions you can set:
allowwarnblocksandbox-requiredrequire-reapproval
mode is observe, prompt, or enforce. The default is prompt.
For everyday tuning, use the protection posture instead of editing files:
hol-guard settings set protection protected
hol-guard settings set protection extra-careful
hol-guard settings set protection watch
Protected is the default. Extra careful also asks the first time a project reaches a new site or installs a new tool. Watch records what Guard would have stopped without stopping anything, so use it only while debugging. Add --harness <id> to apply a posture to one harness. hol-guard settings explain describes the current settings in plain language.
Connect Guard Cloud laterDirect link to Connect Guard Cloud later
Cloud is optional. When you want shared history or team policy:
hol-guard connect
hol-guard connect status
hol-guard connect repair
hol-guard sync
hol-guard login remains as a compatibility alias for the same browser sign-in and pairing. See Guard Cloud command center.
TroubleshootingDirect link to Troubleshooting
| Symptom | Start here | Then try |
|---|---|---|
| Guard did not find a harness | hol-guard detect --json | hol-guard doctor <harness> --json |
hol-guard run paused a launch | hol-guard diff <harness> | hol-guard approvals, then run again |
| You want proof of a past decision | hol-guard receipts | hol-guard explain <artifact-id> |
| A harness stopped being protected | hol-guard doctor <harness> | hol-guard apps repair <harness> |
| The approval link shows an API error | hol-guard daemon status | hol-guard daemon repair |
| Cloud pairing looks wrong | hol-guard connect status | hol-guard connect repair |
hol-guard daemon repair keeps pending approvals. The troubleshooting guide in the Guard repository covers more cases.