Skip to content

CLI Companion Export

github-actions[bot] edited this page Aug 16, 2026 · 2 revisions

ed companion export

Saves everything the companion remembers into a directory you choose: one bundle.json holding episodes, observations, conversations, beliefs, claims, facts, core memory and the non-secret reasoner settings, plus, with --include-media, a media/ directory of the original voice notes, PDFs, images and videos.

Usage:

ed companion export <directory> [--include-media] [--json] [--endpoint <url>]
Name Type / values Default What it does
<directory> path required Where the bundle is written. Created if missing; ~ expands.
--include-media flag off Also download every media file behind the episodes.
--json flag off Emit JSON on stdout.
--endpoint URL resolution order Companion API base URL.

Examples:

ed companion export ~/backups/companion
ed companion export ~/backups/companion --include-media
ed companion export /tmp/before-wipe --json

--json shape:

{
  "counts": {
    "beliefs": 17,
    "episodes": 42,
    "observations": 64
  },
  "directory": "/Users/me/backups/companion",
  "mediaFailed": [],
  "mediaSaved": 39
}

Tokens and API keys never leave the companion: the bundle carries the reasoner provider, URL and model, but not its key and not the connector tokens. Without --include-media the bundle still lists every media file it left behind, and the command says how many stayed, so a later --include-media run completes the backup. The bundle restores with ed companion import, and importing is idempotent, so exporting before a risky operation is cheap insurance. Media files land as media/<sha256>-<name>, which is exactly the layout import expects.

The destination directory may already exist. bundle.json and media files with matching names are overwritten; unrelated or stale files are not removed. Export validates that the API response decodes as a companion manifest before writing it. A media download failure does not discard the bundle or fail the whole command: failed basenames appear in mediaFailed and in a stderr note. For a complete backup, require that mediaFailed is empty and compare mediaSaved with the length of the media manifest in bundle.json.

Where to go next

CLI reference

Getting Started
Config
App
Extensions
Permissions
Usage
System
Music
Calendar
Clipboard
Color
Download
Apps
Tools
Shelf
Cleaner
Machines
Machines Remote
Machines Docker
Machines Files
Machines Power
Machines Workspace
Companion
Herdr
Lid Awake
Machines Thermal

Guides

Clone this wiki locally