Skip to content

Cloud sync — TLDR (one page)

Goal: run aiDimag in your repo, sync a shared team brain through aiDimag Cloud, and keep agents reading local memory (fast, offline) while changes replicate in the background.

Local-first

Agents always query your local SQLite copy. Cloud is sync only — not a remote database you search over the network.

At a glance

StepWhoWhat
1Once (you)Sign up at cloud.aidimag.com → create project → get API key
2Per repodim initdim cloud linkdim sync
3DailyCapture → review → verify → sync (auto-sync runs too)
4TeammatesClone repo → dim init → paste token → dim sync

1. Create your cloud account

  1. Go to cloud.aidimag.com
  2. Sign up with email/password or GitHub
  3. Create a new project — one project = one shared brain for your team
  4. In your project → Keys tab → Create API key → copy the aidimag_sk_… token (shown once)

Keep your API key secret

The key goes in ~/.aidimag/credentials.json on your machine, never in git. Each team member gets their own key from the dashboard.

Self-hosting?

If you're running your own aiDimag Cloud instance instead of using cloud.aidimag.com, see Team sync (self-hosted) for deployment instructions.


2. Install the CLI

sh
npm install -g aidimag
dim --version

3. Set up your repo

sh
cd /path/to/your-app
dim init

dim init creates .aidimag/ (memory DB, gitignored) and installs hooks.


Use the brain ID and API key from your dashboard:

sh
dim cloud link \
  --server https://cloud.aidimag.com \
  --brain YOUR_BRAIN_ID \
  --token aidimag_sk_...

dim sync
  • Committed: .aidimag/config.json (server URL + brain ID only)
  • Private: token in ~/.aidimag/credentials.json

Verify the connection:

sh
dim cloud status
dim cloud remote --summary

You should see memory counts (server vs local) and pending proposals.


5. Fill the brain (first time)

Pick one or more:

sh
dim bootstrap              # LLM reads repo layout → review queue
dim mine --full            # mine git commits (fast heuristics)
dim mine --llm --full      # mine commits with LLM (needs Ollama or OPENAI_API_KEY)

Nothing becomes memory until you approve:

sh
dim review                 # interactive: keep / reword / drop
# or
dim review list
dim review approve all

After review, sync pushes new memories:

sh
dim sync

6. Day-to-day workflow

sh
dim remember "…" -k CONVENTION -p src/…     # write a claim (+ optional evidence)
dim verify                                   # run evidence; VERIFIED or STALE
dim recall "…"                               # search local memory
dim brief                                    # session briefing for agents
dim ui                                       # local web dashboard

Sync runs automatically (~30s debounce) after remember, review, verify, refute, and forget. Disable with AIDIMAG_AUTO_SYNC=off.

Manual sync when you want to be sure:

sh
dim sync              # incremental
dim sync --full       # re-upload everything (after server reset / cursor issues)

MCP (Claude Code, Cursor, etc.) — see MCP integration:

json
{
  "mcpServers": {
    "aidimag": {
      "command": "npx",
      "args": ["-y", "aidimag", "mcp"],
      "env": { "AIDIMAG_REPO": "/path/to/your-app" }
    }
  }
}

Context files (for non-MCP tools like Copilot, Cursor, Windsurf, etc.):

sh
dim generate-context --format all --auto

This creates CLAUDE.md, .cursorrules, .windsurfrules, AGENTS.md, and .github/copilot-instructions.md with all verified/unverified memories, and enables auto-regeneration so these files stay fresh after dim review, dim verify, dim sync, etc.

Auto-regeneration is opt-in

By default, context files are not automatically updated. Use --auto to enable it. Without --auto, you must manually run dim generate-context after approving memories.


8. Onboard a teammate

They clone the repo (config already has server + brain ID):

sh
git clone && cd your-app
dim init
dim cloud link --server https://cloud.aidimag.com --brain YOUR_BRAIN_ID --token aidimag_sk_…
dim sync

Each person gets their own API key from the dashboard (don’t share keys). Their machine pulls the full team brain into local SQLite.


9. Useful checks

CommandWhat it tells you
dim statusLocal memory counts
dim cloud statusLinked server + brain
dim cloud remote --summaryRemote vs local counts
dim cloud remote --proposalsPending proposals on server
dim proposals gcRemove legacy resolved proposal rows locally, then dim sync

Troubleshooting (quick)

SymptomFix
connection refused on syncCheck server URL in .aidimag/config.json — should be https://cloud.aidimag.com (or your self-hosted URL)
nothing to send but local has datadim sync --full
Remote shows old proposal countdim proposals gc then dim sync
Debug detailAIDIMAG_DEBUG=1 dim sync

More: FAQ · Configuration · Team sync (self-hosted)


Licensed under Elastic License 2.0 — free for teams of 10 or fewer users.