Skip to main content

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 update updates the hol-guard package in the environment it runs from. Use --dry-run to preview it and --alpha to 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 --self disconnects the harnesses Guard manages, removes package shims and local Guard state, then removes the package. Use --dry-run first.

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:

  1. Open the local dashboard.
  2. Install Guard into the harnesses it detects.
  3. Optionally pair with Guard Cloud.
  4. 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:

HarnessID
Codexcodex
Claude Codeclaude-code
GitHub Copilot CLIcopilot
Cursorcursor
Clinecline
Gemini CLIgemini
Antigravityantigravity
Grokgrok
Hermeshermes
Kimi Codekimi
Pipi
oh-my-piomp
OpenClawopenclaw
OpenCodeopencode
ZCodezcode
Devindevin

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 detect lists 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-run previews the change.
  • hol-guard run <harness> --dry-run records 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 PreToolUse and PermissionRequest hooks in .codex/config.toml, and the Codex hooks feature turned on. hol-guard run codex refuses to launch if those hooks are missing or disabled.
  • Claude Code: Guard hook entries in .claude/settings.local.json when you install from a workspace.
  • GitHub Copilot CLI: a Guard-owned repo hook file at .github/hooks/hol-guard-copilot.json when 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.json is 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.

PathContents
~/.hol-guard/config.tomlHome config: mode, default actions, per-harness, publisher, and artifact rules
~/.hol-guard/guard.dbSQLite store for snapshots, diffs, receipts, saved decisions, and sync state
~/.hol-guard/bin/Launcher shims
<workspace>/.hol-guard.tomlOptional 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:

TabWhat it shows
HomeProtection overview and next actions
InboxActions waiting for a Guard decision
ProtectApps, integrations, and protection health
ExtensionsTools and capabilities protected on this device
Rules & exceptionsRemembered decisions, Guard Cloud rules, and exceptions
Supply chainPackages, audits, and feed health
SettingsLocal Guard preferences and security
EvidenceReceipts, commands, and security insights
ReleasesPublished Guard versions and what each one changed
AboutVersion, 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:

  1. The harness's native approval prompt, where the harness already has a strong permission model.
  2. The local approval center on 127.0.0.1, which is the Inbox tab of the dashboard.
  3. 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 receipts lists recorded decisions.
  • hol-guard inventory lists tracked artifacts.
  • hol-guard events shows 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:

  1. Saved decisions, from hol-guard allow, hol-guard deny, or an approval you chose to remember.
  2. The project override file.
  3. The home config.
  4. 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:

  • allow
  • warn
  • block
  • sandbox-required
  • require-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​

SymptomStart hereThen try
Guard did not find a harnesshol-guard detect --jsonhol-guard doctor <harness> --json
hol-guard run paused a launchhol-guard diff <harness>hol-guard approvals, then run again
You want proof of a past decisionhol-guard receiptshol-guard explain <artifact-id>
A harness stopped being protectedhol-guard doctor <harness>hol-guard apps repair <harness>
The approval link shows an API errorhol-guard daemon statushol-guard daemon repair
Cloud pairing looks wronghol-guard connect statushol-guard connect repair

hol-guard daemon repair keeps pending approvals. The troubleshooting guide in the Guard repository covers more cases.

Next guidesDirect link to Next guides​