memories.sh
CLI Reference

memories import

Import memories from JSON or YAML file.

memories import <file> [options]

Import memories from a JSON or YAML file previously exported with memories export or manually created.

Arguments

ArgumentDescription
fileInput file path (required)

Options

OptionDescription
-f, --format <format>Input format: json, yaml (auto-detected from extension)
-g, --globalImport all as global memories (override file scope)
--dry-runShow what would be imported

Examples

memories import backup.json
memories import rules.yaml --global
memories import shared-rules.json --dry-run

File Format

The import file must contain a memories array:

{
  "memories": [
    {
      "content": "Always use TypeScript strict mode",
      "type": "rule",
      "scope": "global",
      "tags": "typescript"
    }
  ]
}

Each memory must have:

  • content — Non-empty string, at least 10 characters
  • type — One of: rule, decision, fact, note

Optional fields: scope, tags, created_at.