Export & transfer
Export packages the portable brain — the knowledge an agent accumulates that
isn’t derivable from your codebase — and raph import loads it back on another
machine. Indexed files, code symbols, and document chunks are deliberately
not exported: they regenerate the next time you index.
What travels:
- Memory and rules (rules are memory with
knowledge_type=rule). - Handoffs (documents marked
--type handoff).
Export the brain
Section titled “Export the brain”raph export --bundle --out brain.json # portable: global + shared scopes (default)raph export --bundle --scope all --out brain.json # also include project-scoped memoryraph export --bundle --scope global --out brain.jsonraph export --bundle --out-format md --out brain.md # human-readable digest (not importable)--scope selects which memory scopes to gather: portable (default, global +
shared), all, global, shared, or project. Handoffs are always included.
Export defaults to JSON — a versioned, round-trippable envelope:
{ "raph_export_version": 1, "kind": "brain", "memory": [ /* memory + rule records with scope, type, key, tags */ ], "handoffs": [ /* handoff documents */ ]}It is plain JSON with no binary blobs and no embedded vectors, so a file drops straight onto a raw URL or disk and reads back cleanly.
Import the brain
Section titled “Import the brain”raph import brain.json # from a local fileraph import https://example.com/raw/brain.json # from a raw JSON URLcat brain.json | raph import - # from stdinMemory and rules are restored under their original scope (idempotent — a
re-import updates records in place via their natural key); handoffs are
reconstructed, regenerating chunks and embeddings locally. Use --no-embed to
skip embedding regeneration.
Share a single document
Section titled “Share a single document”For ad-hoc sharing of one document (any type), export it on its own:
raph export --doc <id> --out doc.json # single document as JSONraph export --doc <id> --out-format md --out notes.md # as readable MarkdownPublish
Section titled “Publish”raph export --doc <id> --gist --public # GitHub gist (via gh)raph export --doc <id> --repo owner/name --repo-path docs/notes.mdraph export --doc <id> --s3 s3://bucket/key # S3raph export --doc <id> --s3 s3://bucket/key \ --r2-endpoint https://<account>.r2.cloudflarestorage.com # Cloudflare R2Uploads shell out to gh (gist/repo) and aws (S3/R2), so they use your
existing credentials and keep the binary dependency-light.