Skip to content

Instantly share code, notes, and snippets.

@justinmoon
Last active August 30, 2026 20:04
Show Gist options
  • Select an option

  • Save justinmoon/0382b3265cc3744b263619832b2c0e6c to your computer and use it in GitHub Desktop.

Select an option

Save justinmoon/0382b3265cc3744b263619832b2c0e6c to your computer and use it in GitHub Desktop.
Hermes Desktop on macOS with Tinfoil verified inference or Venice TEE; no Nix, keys in Keychain

Hermes Desktop with Tinfoil or Venice TEE on macOS

Reproducible setup for a generic Apple Silicon Mac. No Nix. Hermes uses Nous Research's signed macOS launcher. Tinfoil Proxy comes from its GitHub repo. API keys stay in macOS Keychain.

Tested 2026-08-30 with Hermes Agent 0.20.6, Hermes Desktop 0.17.0, and the current Tinfoil Proxy release.

1. Install the official Hermes macOS launcher

Download it from the official Hermes Desktop page, or use the current official asset URL:

curl -fL https://hermes-assets.nousresearch.com/Hermes-Setup.dmg \
  -o /tmp/Hermes-Setup.dmg
hdiutil attach -nobrowse -readonly /tmp/Hermes-Setup.dmg
ditto "/Volumes/Install Hermes/Hermes.app" /Applications/Hermes.app
hdiutil detach "/Volumes/Install Hermes"
open /Applications/Hermes.app

Verify before opening it:

codesign --verify --deep --strict --verbose=2 /Applications/Hermes.app
spctl -a -vv -t exec /Applications/Hermes.app

spctl should report accepted and Notarized Developer ID.

Important: Nous currently ships a small signed launcher/bootstrap, not a full prebuilt Electron bundle. On first launch it installs the Hermes runtime under ~/.hermes/hermes-agent and builds Desktop there. Later launches use the installed runtime at once. The signed app in /Applications gives macOS a normal Spotlight, Dock, and LaunchServices entry.

2. Install and run Tinfoil Proxy

The proxy verifies Tinfoil enclave attestation locally and exposes an OpenAI-compatible endpoint on 127.0.0.1:3301.

mkdir -p ~/.local/bin
curl -fsSL https://github.com/tinfoilsh/tinfoil-proxy/raw/main/install.sh \
  | INSTALL_DIR="$HOME/.local/bin" sh
~/.local/bin/tinfoil-proxy

Keep that terminal open. For a persistent setup, install the signed macOS package from the Tinfoil Proxy releases, or create a per-user LaunchAgent.

Check the proxy without spending inference tokens:

curl -fsS http://127.0.0.1:3301/verification-document \
  | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d["securityVerified"])'
curl -fsS http://127.0.0.1:3301/v1/models \
  | python3 -c 'import json,sys; print("\n".join(x["id"] for x in json.load(sys.stdin)["data"]))'

The first command must print True.

3. Store API keys in macOS Keychain

Run each command, then paste the matching API key twice. The Keychain CLI says password data for new item; it means the API key, not the Mac login password.

security add-generic-password -U -a "$(id -un)" \
  -s hermes-private-inference.tinfoil -w
security add-generic-password -U -a "$(id -un)" \
  -s hermes-private-inference.venice -w

Do not put either key in Git, shell history, config.yaml, or .env.

4. Configure Hermes

Back up an existing ~/.hermes/config.yaml first. Then write this config. The shell expands the local account name into each key_cmd.

account="$(id -un)"
mkdir -p ~/.hermes
chmod 700 ~/.hermes

cat > ~/.hermes/config.yaml <<EOF
providers:
  tinfoil:
    name: Tinfoil
    api: http://127.0.0.1:3301/v1
    key_cmd: /usr/bin/security find-generic-password -w -s hermes-private-inference.tinfoil -a ${account}
    transport: chat_completions
    default_model: glm-5-2
    discover_models: false
    models:
      glm-5-2:
        context_length: 393216

  venice:
    name: Venice TEE
    api: https://api.venice.ai/api/v1
    key_cmd: /usr/bin/security find-generic-password -w -s hermes-private-inference.venice -a ${account}
    transport: chat_completions
    default_model: e2ee-glm-5-2-p
    discover_models: false
    models:
      e2ee-glm-5-2-p:
        context_length: 524288

model:
  provider: custom:tinfoil
  default: glm-5-2
EOF

chmod 600 ~/.hermes/config.yaml

Model IDs and context sizes can change. Query each /v1/models endpoint before copying this setup months later. For Venice, expose only models whose model_spec.capabilities.supportsTeeAttestation value is true.

5. Verify Venice TEE without a completion

key="$(security find-generic-password -w \
  -s hermes-private-inference.venice -a "$(id -un)")"
nonce="$(openssl rand -hex 32)"
export VENICE_TEE_NONCE="$nonce"

curl -fsS --get https://api.venice.ai/api/v1/tee/attestation \
  --data-urlencode model=e2ee-glm-5-2-p \
  --data-urlencode "nonce=$nonce" \
  -H "Authorization: Bearer $key" \
  | python3 -c 'import json,os,sys; d=json.load(sys.stdin); assert d.get("verified") is True; assert d.get("nonce")==os.environ["VENICE_TEE_NONCE"]; print("verified", d.get("model"), d.get("tee_provider"))'

unset key nonce VENICE_TEE_NONCE

This checks Venice's fresh server-verified attestation and nonce. For stronger assurance, verify the TDX/NVIDIA evidence client-side as described in Venice's TEE and E2EE guide.

6. Launch and switch providers

hermes config get model
open /Applications/Hermes.app

Use hermes model to select a provider and model. Or change the final block in config.yaml:

# Tinfoil
model:
  provider: custom:tinfoil
  default: glm-5-2

# Venice TEE
model:
  provider: custom:venice
  default: e2ee-glm-5-2-p

Privacy difference

  • Tinfoil: the local proxy verifies the enclave and pins its attested key. This adds one local process but gives the client a verified enclave path.
  • Venice TEE: simpler direct OpenAI-compatible URL. The selected model runs in a TEE. Hermes does not implement Venice's client-side E2EE protocol, so an e2ee-* model ID alone does not make the request end-to-end encrypted.

No chat completion is needed to test install, authentication, model listing, or attestation. The first real message may incur provider charges.

Prompt for another Codex agent

Install Nous Research's signed Hermes macOS launcher using this guide. Do not use Nix. Keep all provider keys in macOS Keychain and never print them. Install Hermes and Tinfoil from their official GitHub repos. Configure Tinfoil through the local verified proxy and configure Venice with TEE-capable models only. Validate install, model listing, and attestation without sending a paid completion. Report any optional dependency failures separately from inference failures.

Sources: Hermes Agent, Tinfoil Proxy, Venice TEE/E2EE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment