CLI Commands — Manage AI Agent Memory from Terminal
Commands
Section titled “Commands”npx toon-memory # Interactive installer (agent selection)npx toon-memory init # Interactive setup with agent selectionnpx toon-memory init --agent opencode # Non-interactive: configure specific agentnpx toon-memory init --agent opencode --agent claude # Configure multiple agentsnpx toon-memory init --agent opencode --scope global # Configure globallynpx toon-memory mcp # Run MCP server directlynpx toon-memory status # Check installation statusnpx toon-memory stats # View memory statisticsnpx toon-memory export # Export memory to JSONnpx toon-memory import <file> # Import memory from JSONnpx toon-memory viewer [opts] # Open the memory graph viewer (HTTP server)npx toon-memory watch [opts] # Auto-backup with optionsnpx toon-memory upgrade # Update to latest versionnpx toon-memory uninstall # Remove from all agentsInit Options
Section titled “Init Options”| Option | Description | Default |
|---|---|---|
--agent <name> |
Non-interactive: configure specific agent(s). Repeat for multiple. | interactive |
--scope <scope> |
local or global — where to store agent config |
interactive |
Viewer Options
Section titled “Viewer Options”| Option | Description | Default |
|---|---|---|
--port <n> |
HTTP server port | 3000 |
--export |
Save static HTML file instead of starting server | — |
Watch Options
Section titled “Watch Options”| Option | Description | Default |
|---|---|---|
[interval] |
Backup interval in minutes | 5 |
-c, --compress |
Enable gzip compression | off |
-l, --log [path] |
Enable file logging | off |
-m, --max-backups <n> |
Max backups to keep (0=unlimited) | 10 |
Examples
Section titled “Examples”$ npx toon-memory stats
🧠 toon-memory stats
📊 Memory Stats━━━━━━━━━━━━━━━━━━Total entries: 45├── decision: 12├── pattern: 18├── bug: 8└── knowledge: 7Last updated: 2026-07-10File size: 12.4 KBExport
Section titled “Export”$ npx toon-memory export
🧠 toon-memory export
Exported 45 entries to: /path/to/project/toon-memory-export.jsonImport
Section titled “Import”$ npx toon-memory import backup.json
🧠 toon-memory import
Imported 3 new entriesSkipped 2 duplicates$ npx toon-memory watch 15 -c -m 20
🧠 toon-memory watch
Watching memory file every 15 minutes...Max backups: 20Compression: enabledLogging: disabledPress Ctrl+C to stop
📦 Backup #1 created: 2026-07-11T16-00-00-000Z📦 Backup #2 created: 2026-07-11T16-15-00-00-000Z^C✅ Watch stopped. 2 backups created.