CLI
@db0-ai/cli provides command-line access to db0 memories for debugging, inspection, and data management.
Install
npm i -g @db0-ai/cli
Commands
list
List memories for an agent:
db0 list --agent-id my-agent --storage ./agent.db
db0 list --agent-id my-agent --scope user
db0 list --agent-id my-agent --json
search
Search memories by query text:
db0 search "user preferences" --agent-id my-agent --storage ./agent.db
stats
Show memory statistics:
db0 stats --agent-id my-agent --storage ./agent.db
export
Export all memories as NDJSON:
db0 export --agent-id my-agent --storage ./agent.db > backup.ndjson
import
Import memories from NDJSON:
db0 import --agent-id my-agent --storage ./agent.db < backup.ndjson
Global options
| Flag | Description |
|---|---|
--storage <path> |
Storage path or PostgreSQL connection string |
--agent-id <id> |
Agent ID (required for all commands) |
--json |
Output as JSON |
--help |
Show usage |