Oko/Docs

Command reference

oko telemetry tokens

What the member's tokens would cost, day by day, from the same transcripts, priced from the token price catalogue; with --by, which session, subscription account or model used them, and in which UTC hour or day, call by call from every harness's own transcript tree.

Invocation#

Command
oko telemetry tokens --days N [--limit N] [--root DIR ...] | oko telemetry tokens --by session|account|model|hour|day --since WINDOW [--limit N] [--root DIR ...]

Inputs and options#

  • As `work`.
  • The catalogue is the file `OKO_TOKEN_PRICING_PATH` names when it is set, else `~/.oko/token-pricing.json` when it exists, else the one Oko ships.
  • --by takes session, account, model, hour or day; --since (required with --by) takes 7d, 48h, a day as YYYY-MM-DD or an RFC 3339 time.

Output and state effect#

  • Reads only; prints `{files, summary, days}`. Each `days` row is one model on one day with its four counters, `costUSD` and `costExact`; a model no catalogue entry prices carries `unpriced: true` and no `costUSD`, is listed in `summary.unpricedModels`, and sorts after the priced models of its day, instead of being shown as costing nothing. `summary.catalogSource` names the catalogue that priced; when the chosen catalogue does not exist, or a chosen or installed one cannot be read, is not JSON, is not priced in USD per 1M tokens or holds no rates, nothing is priced and `summary.catalogRefused` names the file and the cause instead of another catalogue silently pricing in its place. Assignment plans then state `no token pricing catalogue: <cause>` as their cost basis.
  • With --by, prints `{by, since, roots, files, unreadable, leftOut, rows}`: per group its calls, the four counters, the context of its largest and newest call, cost, models and credentials, under `group` and under `session`, `account` (with the account's limit readings), `model` or `period` (`YYYY-MM-DDTHH` or `YYYY-MM-DD`). Oko Desktop's Activity › Token usage shows the same.

Refusals and safe exits#

  • As `work`.
  • `oko telemetry tokens requires --since <text>`; `oko telemetry tokens --since takes a window like 7d or 48h, a day as YYYY-MM-DD or an RFC 3339 time, not <value>`; ``oko telemetry tokens --by: unknown variant `<value>`, expected one of `session`, `account`, `model`, `hour`, `day` ``.

CLI reference#