Skip to main content
The CLI is for self-hosted SenseLab. On the managed platform, use the Dashboard or REST API instead.
The SenseLab CLI provides commands for inspecting, diffing, and snapshotting local memory from the terminal.

Installation


Initialize a Project

Creates amfs.yaml, .amfs/, and updates .gitignore. Run this once per project.

Inspect Memory

List Entries

Read an Entry

Diff Version History

See how an entry changed across versions:

Snapshots

Export

Export all memory to a JSON file:
Export a single entity:
Include superseded versions:

Restore

Restore memory from a snapshot:
Restore writes entries into the current adapter. Existing entries with the same keys will get new versions via CoW — nothing is overwritten destructively.

Custom Config Path

All commands accept a -c / --config flag:

Connecting to SenseLab

CLI commands work against local storage by default. To interact with the managed platform, use the HTTP API directly or configure the MCP server with AMFS_HTTP_URL.

Environment Variables

With these set, the MCP server and HTTP server automatically route through the authenticated HTTP API. CLI inspection commands (amfs inspect, amfs snapshot) still read from the local adapter — use the Dashboard or REST API for remote inspection.
Never use AMFS_POSTGRES_DSN for external agents in multi-tenant mode. Always use AMFS_HTTP_URL + AMFS_API_KEY.
See the Connect to SenseLab guide and Environment Variables for details.

MCP Server

The MCP server has its own executable:
See the MCP Setup guide for full details.