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
| Argument | Description |
|---|---|
file | Input file path (required) |
Options
| Option | Description |
|---|---|
-f, --format <format> | Input format: json, yaml (auto-detected from extension) |
-g, --global | Import all as global memories (override file scope) |
--dry-run | Show what would be imported |
Examples
memories import backup.json
memories import rules.yaml --global
memories import shared-rules.json --dry-runFile 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 characterstype— One of:rule,decision,fact,note
Optional fields: scope, tags, created_at.