pass-secrets
pass (password-store) secret source for Hermes Agent — resolves secrets from your local GPG-encrypted password store into environment variables at startup. Local filesystem, git-tracked, no network dependency, no token expiry.
Why
Hermes ships Bitwarden Secrets Manager and 1Password sources. If your secrets already live in pass — GPG-encrypted, git-backed, fully offline — this lets Hermes read them as a first-class secret source instead of migrating to a hosted vault.
How it works
The plugin registers a SecretSource with the Hermes orchestrator. You fetch; the orchestrator applies — the plugin never writes os.environ itself, never prompts, never raises. Each pass entry's leaf name becomes the env var name (UPPER_SNAKE_CASE enforced).
# profile config.yaml
secrets:
sources: [pass, bitwarden] # pass primary, BWS fallback
pass:
enabled: true
store_path: ~/.password-store # default
subdirs: [shared, work] # pass directories to pull
override_existing: true # pass wins over .env/shell
timeout_seconds: 30
Resolution flow:
register(ctx)runs at plugin discovery →ctx.register_secret_source(PassSource())- The orchestrator re-pulls enabled secret sources at startup (
reset_secret_source_cache+ dotenv load) fetch()walks each configured subdirectory, runspass show <path>per.gpgentry (10s timeout, GPG agent env preserved)- Merged
{ENV_VAR: value}returns to the orchestrator, which handles precedence, conflict detection, and provenance
Storing a secret from chat — !secret
The same plugin can write to the store without a shell, from any Hermes chat
channel:
!secret <name> <value>
!secret rather than /secret: a slash-prefixed word is claimed by the chat
platform's own command registry first. Mattermost answers "Command with a
trigger of secret not found" and never posts the message, so the hook never
runs. !secret is plain text and always reaches the gateway. /secret still
works on platforms that pass unknown slash commands through as ordinary text.
Examples:
!secret shared/MY_API_KEY sk-abc123 # every agent/profile
!secret agentname/MY_API_KEY sk-abc123 # one profile's directory only
The name is a pass path, so the leaf becomes the environment-variable name
(UPPER_SNAKE enforced for injection — anything else is stored but warned
about). Everything after the first space is the value, verbatim.
The command registers as a pre_gateway_dispatch hook, which fires at ingress
before Hermes' sender-authorisation check and before any session exists, so
the plugin decides who may store. !secret is off until you list yourself: only
senders named in the plugin setting chat_allowed_users (as
<platform>:<user_id>) can store. Anyone else's !secret is dropped without a
reply, and its text still never reaches the agent.
plugins:
entries:
pass-secrets:
settings:
chat_allowed_users: ["telegram:123456789"]
!secret writes to secrets.pass.store_path, the same store the source reads.
A shared/ entry becomes an environment variable inside every agent process,
so list only people you would hand a shell to.
Values are passed to pass insert on stdin and are never logged, never written
to conversation state, and never echoed back.
What you'll see in session prompts
The plugin also registers a conditional system-prompt note teaching agents where secrets resolve from (declared names are injected into child process env; provider credentials are runtime-only by upstream design). It appears only when secrets.pass.enabled is true and the pass binary is resolvable — a disabled plugin contributes nothing to the prompt. The note is ~900 characters of the 4000-char prompt budget, no dynamic content.
Disclosures
- Reads your GPG-encrypted pass store by shelling out to the
passbinary per entry, withGNUPGHOME/GPG_AGENT_INFOpreserved. If your GPG key prompts a passphrase,gpg-agenthandles it — the plugin never prompts. - Bulk injection: everything in the configured subdirs becomes env vars. Configure narrowly (
subdirs:) — don't point it at a store subdirectory containing material you wouldn't put in a process environment. - No network. Ever. Pure local: subprocess + filesystem only.
- No protected env vars: pass uses GPG agent, not an env-var bootstrap token.
Requirements
passon PATH (GPG-based password store initialized:pass init <GPG_KEY_ID>)- Hermes Agent
>=0.21.4(SecretSource plugin API withregister_secret_source;!secretneeds thepre_gateway_dispatchhook andctx.get_config) - No Python dependencies beyond stdlib
Missing/broken secrets fail cleanly
passnot on PATH → typedBINARY_MISSINGerror with platform-specific install hint- Store path missing →
NOT_CONFIGUREDwithpass inithint - Individual entry fails → warning collected, remaining entries still load
License
MIT — see LICENSE.
README from the reviewed commit fb5dc93; it updates when the author re-pins.

dyiapanis

