Oko/Docs

Command reference

oko index occurrences

Counts every message that says WORDS: per session and in total, with each message's session, record number, speaker, time and an excerpt. `oko index list --query` answers which sessions match; this answers how many times.

Invocation#

Command
oko index occurrences WORDS [--role assistant|operator] [--session ID ...] [--limit N] [--json]

Inputs and options#

  • WORDS are matched as given, lowercased and diacritic-folded on both sides. --role counts only the assistant's answers or only the operator's genuine turns. --session names the sessions to read and may repeat; without it every session the catalogue matches is read, best match first, or the first N with --limit N (a positive whole number). --json prints {words, role, total, sessions, messages, notOnThisMachine}.

Output and state effect#

  • Reads each session's transcript on this machine with the shared decoder; tool results, thinking and synthetic wrappers are not messages. A session the catalogue names but this machine does not hold is listed under notOnThisMachine instead of being counted as zero. The native API's transcripts domain (action occurrences, OkoKit `occurrences(of:role:)`) and Oko Desktop's Rulings screen (Count what was said) run the same count.

Refusals and safe exits#

  • Refuses without WORDS, a --role other than assistant or operator, an unknown flag, or a transcript that cannot be read, naming the file and the error. `oko transcripts` is retired: `oko index` (sync, list, coverage, occurrences) and `oko lake` (sources, adopt) are the catalogue's commands, and the transcript-index launch agent of older releases is retired by `oko serve`.

CLI reference#