hmem-sync-setup

A setup guide for synchronizing hmem memory between devices with client-side encryption, which encrypts data before it leaves the device.

In plain words
What is it for?
Creating or restoring an account, connecting a local memory database, pushing, pulling, merging, or skipping data, verifying the result, and using a custom server.
Why use it?
It helps move memories between devices while the sync server receives only encrypted data, and it supports choosing how local and server data should be combined.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/bumblebiber/hmem/hmem-sync-setup
Any agent
npx skills add Bumblebiber/hmem --skill hmem-sync-setup
Clone the repo
git clone --depth 1 https://github.com/Bumblebiber/hmem

Made for: Claude Code, Codex.

Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,947 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00055 $0.01947
Opus 5 $0.00028 $0.00974
Sonnet 5 $0.00011 $0.00389
Haiku 4.5 $0.00006 $0.00195

Measured 3d ago against content hash 3ce6e072df2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

hmem-sync-setup scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

### Step 2: Gather credentials from the original device

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

.hmem-sync-token — auth token (chmod 600, never commit)

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

# Or via curl:
skills/hmem-sync-setup/SKILL.md · 249 lines

How it starts

The opening of the file, as written. The whole thing — 249 lines — stays where its author put it; the contents beside it link to each section on GitHub.

hmem-sync Setup

Zero-knowledge encrypted sync for hmem. Memories are encrypted client-side (AES-256-GCM) before leaving the device — the server only sees opaque blobs.

The connect command replaces setup and restore with a single smart wizard:

npx hmem-sync connect

It automatically:

  1. Asks for credentials (new account or existing)
  2. Detects local DB + server data
  3. Shows entry counts on both sides
  4. Asks the user what to sync (push, pull, merge, or skip)
  5. Verifies the result

Custom / Self-hosted servers: The --server-url flag accepts any hmem-sync compatible server, not just the default. Examples: https://yourdomain.com/hmem-sync for a self-hosted instance, or http://localhost:3100 for a local development server.

For non-interactive use:

# New account
npx hmem-sync connect --user-id myname --passphrase "pass" --hmem-path ~/.hmem/memory.hmem

# Existing account
npx hmem-sync connect --user-id myname --passphrase "pass" --token abc123... --hmem-path ~/.hmem/memory.hmem

# Custom server
npx hmem-sync connect --server-url http://localhost:3100 --user-id myname --passphrase "pass" --hmem-path ~/.hmem/memory.hmem

The legacy setup and restore commands still work for backwards compatibility.

Legacy: Determine the scenario

If not using connect, pick manually:

A) First device — no sync account exists yet → hmem-sync setup B) Additional device — account exists on another machine → hmem-sync restore


Scenario A: First Device Setup

Step 1: Install hmem-sync

npm install -g hmem-sync

Step 2: Run interactive setup

npx hmem-sync setup

This will:

  1. Ask for the sync server URL (default: https://sync.hmem.dev)
  2. Generate a salt + encryption key from a passphrase you choose
  3. Register with the server → receive an auth token
  4. Save config files next to your .hmem file

Important: Remember the passphrase — it's the encryption key. Losing it means losing access to synced data. There is no recovery.

Read the full file on GitHub · 249 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 249 lines · 55 tokens per session scan D 3ce6e072df2b

Subscribe to this mod's changes

hmem-sync-setup is a skill published in the GitHub repository Bumblebiber/hmem (24 stars, last pushed 1mo ago), licensed MIT. It adds 55 tokens to every session and 1,947 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it D with 3 findings (harvests environment variables, asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.