Local Sync
The feature that makes Hubify sticky. Your local environment and your cloud workspace share the same brain — memory, learnings, skills, and context flow between them automatically. Work in your IDE locally during the day. Your cloud agent works overnight. When you open your laptop in the morning, everything is synced. No manual copy-paste. No stale context.Sync is currently polling-based (every 30 seconds) with last-write-wins semantics. Files created locally are pushed to Convex; files created in the cloud are pulled to your local memory directory. Real-time WebSocket sync and automatic conflict resolution are planned for a future update.
Why Sync?
| Without Sync | With Sync |
|---|---|
| Cloud agent and local agent have separate memory | One shared memory store via Convex |
| Skills installed locally are unknown to your cloud workspace | Skill manifest synced across both |
| Learnings captured overnight are stuck in the cloud | Learnings pulled to your local learnings/ directory |
| You brief your agent twice (once locally, once in the cloud) | Brief once, context propagates everywhere |
Prerequisites
Before running sync, you need:- Hubify CLI installed — see Installation
- Authenticated — run
hubify auth login - HUB.yaml in your workspace — run
hubify initto create one, or have one from a template
Setup
Authenticate
Log in to Hubify from your terminal:This stores your credentials locally for CLI operations.
Connect to your hub
Navigate to your workspace directory (where The CLI reads your
HUB.yaml lives) and run:HUB.yaml, auto-detects your platform, registers your local machine as an agent in your hub, and performs an initial sync.What Syncs
| Synced | Details |
|---|---|
| Memory files | All .md files in memory/ (daily logs, intel files, state files) |
| SOUL.md | Agent identity and personality |
| MEMORY.md | Long-term curated memory |
| AGENTS.md | Agent instructions |
| Skills manifest | Which skills are installed and their versions |
| Learnings | Structured learnings extracted by agents |
What Does Not Sync
| Not Synced | Why |
|---|---|
| Raw project files | Your codebase stays local — sync is for agent context, not source code |
| Local shell environment | Environment variables, PATH, shell history are machine-specific |
| Platform-specific configs | .cursor/, .vscode/, .claude/ stay on their respective machines |
Sync Frequency
The sync loop runs every 30 seconds in the background. When--watch mode is active, file system events also trigger immediate pushes — so changes to memory files are pushed within seconds.
| Direction | Trigger | Frequency |
|---|---|---|
| Local to Cloud | File change detected by fs.watch | Immediate |
| Local to Cloud | Periodic sweep | Every 30 seconds |
| Cloud to Local | Periodic pull | Every 30 seconds |
How hubify connect Works Internally
Here is what happens when you run hubify connect:
Find HUB.yaml
The CLI walks up the directory tree from your current working directory, looking for a
HUB.yaml file. It stops at your home directory. If no HUB.yaml is found, it prompts you to run hubify init or pass --hub-id directly.Read OpenClaw config
The CLI checks for OpenClaw configuration files to get your user identity. It searches these paths in order:
$OPENCLAW_CONFIG(environment variable, if set)~/.config/openclaw/config.yaml~/.config/openclaw/openclaw.json~/Library/Application Support/openclaw/openclaw.json~/.openclaw/config.json
Auto-detect platform
The CLI detects which AI coding platform you are using based on environment variables:
CURSOR_DIRorCURSOR_SESSION— CursorWINDSURF_SESSION— WindsurfCLAUDE_CODEorANTHROPIC_API_KEY— Claude Code~/.config/openclawexists — OpenClaw- Otherwise — unknown
Generate machine ID
A stable machine identifier is generated from a SHA-256 hash of your hostname combined with your platform name. This ensures the same machine always registers as the same agent.
Register agent
The CLI calls the
hubs.connect Convex mutation, registering your local machine as an agent in your hub. The hub records your platform, machine ID, and agent name.Initial sync
All local memory files are compared against the sync cache by file hash. Changed files are pushed to Convex. Recent cloud memory entries (from other agents) are pulled to your local
memory/ directory.State Files
The CLI stores sync state in your home directory:| File | Purpose |
|---|---|
~/.hubify/connect-state.json | Connection metadata: hub ID, machine ID, platform, timestamps |
~/.hubify/sync-cache-{hubId}.json | Per-hub sync cache: filename, content hash, last sync time for each file |
Example Output
A successfulhubify connect session looks like this:
Troubleshooting
- Connection Issues
- Stale Sync Cache
- Wrong Platform Detected
“No hub ID found”The CLI could not find a
HUB.yaml in the current directory or any parent directory. Solutions:- Run
hubify initto create aHUB.yaml - Pass the hub ID directly:
hubify connect --hub-id <id> - Pass the subdomain:
hubify connect --subdomain houston
- You are offline or behind a restrictive firewall
- The
NEXT_PUBLIC_CONVEX_URLenvironment variable is not set - Your Convex deployment is down
Next Steps
Connect OpenClaw
Connect an existing OpenClaw instance to Hubify
Cloud Workspace
What runs in your cloud workspace
Agent Memory
How memory works across local and cloud
CLI Reference
Full CLI command reference