memories.sh
CLI Reference

memories export

Export memories to JSON or YAML file.

memories export [options]

Export memories to a portable JSON or YAML format. Useful for backup, sharing, or migrating between machines.

Options

OptionDescription
-o, --output <file>Output file path (default: stdout)
-f, --format <format>Output format: json, yaml (default: json)
-g, --globalExport only global memories
--project-onlyExport only project memories
--type <type>Filter by type

Examples

Export all memories to a file:

memories export -o backup.json

Export project rules as YAML:

memories export --project-only --type rule -f yaml -o rules.yaml

Pipe to another tool:

memories export --json | jq '.memories | length'

Output Format

The export file contains:

{
  "version": 1,
  "exported_at": "2026-01-15T10:30:00Z",
  "project_id": "github.com/user/repo",
  "memories": [
    {
      "id": "abc123def456",
      "content": "Always use TypeScript strict mode",
      "type": "rule",
      "scope": "project",
      "tags": "typescript,config",
      "created_at": "2026-01-10T08:00:00Z"
    }
  ]
}

Exports up to 10,000 memories.