alicli documentation

Store

Store

The local SQLite database is a mirror, with explicit timestamp provenance.

The default directory is ~/.alicli; ALICLI_STORE_DIR overrides it. The database filename is alicli.db. Opening it through the CLI applies versioned migrations. Back up a live database using a consistent SQLite backup procedure before schema work; copying only a live database file can omit WAL data.

Read-only inspection

sqlite3 -readonly "$ALICLI_STORE_DIR/alicli.db" \
  "SELECT thread_id, msg_id, ts, source_ts FROM messages_dated ORDER BY ts DESC LIMIT 20;"

Set ALICLI_STORE_DIR to your chosen directory before using the example. There is no alicli store command. Direct SQL is a local inspection path; applications should prefer the CLI output contract and avoid writing around its guards.

Field or optionMeaning
threads / messagesConversation metadata and stored message rows.
messages_datedTime-sorted view: ts > 0 and provenance not unknown/none. It excludes undatable history without deleting it.
media / media_fetch_failuresCached blobs and recorded fetch failures.
own_sendsAgent send attempts and matched feed echoes.
orders / order_eventsStaged order state and its audit events.
metaPoll/cursor and diagnostic state.

Units and meaning

ts, source_ts and ingested_at use Unix seconds. source_ts is the event-time field; ordering time may be derived. Provenance is retained in raw_json. Do not feed a millisecond timestamp into a seconds query, or use read-time ordering as proof of a recent supplier reply. Search snapshots use their separate vendor timestamp format.

messages · threads · spec