Skip to main content

Module usage_log

Module usage_log 

Source
Expand description

Durable record of run token usage and costs.

Tracks machine-wide runs across sessions and worktrees in a shared JSONL log.

Structs§

Entry
An entry in the usage log recording metadata and token consumption of a single run.

Functions§

append
Appends a usage entry as a single JSON line to path.
default_path
Returns the default path for the usage log.
path_from
Resolves the usage log path from the given environment values.
read
Reads all valid entries from the usage log file at path.
repo_of
Returns the repository root path as a string, stripping any .wt component and everything after it.
session_from
Resolves the session identifier, falling back from blyte to claude.