Skip to content

Store and Ledger

Alper Sarıtaş edited this page Dec 4, 2026 · 2 revisions

Where the store is

What omo keeps about your sources lives in the store:

  1. $OMO_DIR/data/, when OMO_DIR is set;
  2. else $XDG_DATA_HOME/omo/, when that variable is an absolute path;
  3. else ~/.omo/data/.

OMO_DIR alone therefore moves both the settings and the store. Folders and files are created readable by their owner only. Sign-ins and settings are in the separate settings folder.

Path Holds
folders/<hash of the sources folder's path>/room/ The reading copies of one sources folder: the folder the guide sees
folders/<hash>/room.json Which copy came from which file or address, and each source's id and text fingerprint. Written whole, then renamed into place. Rebuilt if lost or unreadable
web/ The originals of web pages and PDFs, shared by every folder. A page fetched for one folder is not fetched again for another
ledger.jsonl The ledger
ledger-<time>.jsonl Ledgers set aside, named for when. omo does not read them
renders/ PDF page images shown in the terminal
captures/ Your files that were transcribed, each named by a hash of its content
readings/ The transcribed text of each image source, named by a hash of the image, so an image is read once for every folder
pasted/ Images pasted with ctrl+v
logs/ pi-tui's crash log, written when a line is wider than the terminal

The ledger

There is one ledger per person, ledger.jsonl, for every folder they open. It is append-only: one JSON event per line, and nothing in it is ever rewritten. The understanding graph and each folder's history are rebuilt from it at every start.

What it records

  • Queries, each with the folder it was typed in. The same text typed again there, up to case and spacing, keeps its id and becomes the current query again. A folder's current query is its latest one in the ledger, so what you read or note is recorded under it, also after omo is opened again.
  • The guide's maps: passages, needs and restatements, with the query they were proposed under.
  • Offered paths, and passages read.
  • Your notes, with the passage each was written on, and the transcription a note came from and whether you changed it.
  • The guide's judgements, and your verdicts on them, passage by passage.
  • Sources added from outside, by the guide with its search words and service, or by you.
  • Failed tasks, with whether the provider returned the error. The graph ignores these. Tasks you cancel are not recorded.
  • The text of each unit pointed at, with a little of its surroundings, the first time it is pointed at, so it can be found again after an edit.

Pointers in the ledger are lists of unit ids. The guide's own words are never recorded. There is no transcript of its messages anywhere.

Format and safety

  • The first line names the ledger's format.
  • A ledger in another format, or with a broken line, is never read in part. At start, omo says so and offers to set it aside and begin a new one, or to quit.
  • If omo stopped while writing, a cut-off last line is dropped the next time the ledger is opened.
  • Two omo processes on different folders can share the ledger. Each appends its lines in one write. There is no lock between processes.

History

A folder's history is built from the ledger: one entry per query, with what was read, noted and judged under it, ordered by last activity. A folder opens with its last 10 queries. /history lists all of them and takes one up again.

Managing your data

/data shows:

  • where the store is and its size;
  • the number of ledger entries;
  • the ledgers set aside.

It offers to:

  • start a new ledger, setting the current one aside;
  • delete the ledgers set aside;
  • delete the whole store.

Deleting asks again and cannot be undone. Sign-ins and settings are in the settings folder and stay. After a new ledger or a deleted store, omo opens the folder again.

To back up everything omo knows about you, copy ledger.jsonl. The reading rooms can be rebuilt from your sources and the web/ originals.

Clone this wiki locally