Count used tokens and estimate project cost.
mot # scoped to current directory
mot --all # aggregation across all local sessions
mot --since 7d # only count tokens in last week
mot --session 019d8e7f # only count one local session by id, id prefix, file name, or path
mot --select-session # choose a scoped local session with an arrow-key picker
mot --no-activity-calendar # hide the activity calendar
mot --exclude-unknown-models # drop usage records whose model is missing or unpriced
mot --all --since 1m # all sessions, only count tokens in past month
mot --all --host vm-a --host vm-b # include remote VM sessions over SSHSample output:
Scanned: codex 1440 files, claude 339 files in 273 ms
Counted: codex 26 sessions, claude 250 assistant responses
Provider Input Output Thinking Cache Read Cache Write Est. Cost
Codex 143,995,252 785,532 467,276 135,731,584 0 $286.74
Claude 10,123 981 0 19,440,609 343,559 $10.01
Total 144,005,375 786,513 467,276 155,172,193 343,559 $296.75
By model:
Provider Model Input Output Thinking Cache Read Cache Write Est. Cost
Codex gpt-5.3-codex 137,210,240 677,634 395,340 129,502,336 0 $272.27
Codex gpt-5.2-codex 6,785,012 107,898 71,936 6,229,248 0 $14.47
Claude claude-opus-4-5-20251101 1,396 336 0 17,359,560 108,704 $9.37
Claude claude-haiku-4-5-20251001 8,723 168 0 2,059,925 213,354 $0.4822
Claude claude-opus-4-6 4 477 0 21,124 21,501 $0.1569
When stdout is an interactive terminal, table output also renders a GitHub-style
Ratatui activity calendar for the last 53 weeks. Squares are shaded by daily
token activity. Activity days and peak hour are bucketed with the current local
timezone offset of the mot process. Activity days come from the same
timestamped usage records as the daily rollups:
- Codex: token-count event deltas are assigned to each event timestamp, so a session that spans multiple days contributes to each active day.
- Claude: assistant responses are deduplicated by request/message id, then assigned to their response timestamp.
The calendar footer shows favorite model, total tokens, sessions, largest session by token volume, current and longest streaks, active days since first activity in the displayed calendar range, longest session by duration, and peak hour.
The footer also includes a randomly selected book-scale comparison. Book word counts are converted to estimated tokens using the English rule of thumb that one token is roughly three quarters of a word.
# Linux/macOS quick install
curl -fsSL https://github.com/daulet/mot/releases/latest/download/install.sh | sh
# Ubuntu/Debian package install
curl -fsSL https://github.com/daulet/mot/releases/latest/download/install.sh | sh -s -- --deb
# Homebrew on macOS
brew install daulet/tap/mot
# From source (latest main)
cargo install --git https://github.com/daulet/motLinux release artifacts include x86_64-unknown-linux-gnu builds produced on
Ubuntu 22.04, matching Ubuntu 22.04 x86_64 VMs, plus aarch64-unknown-linux-gnu
for ARM Linux hosts. The quick installer verifies checksums.txt before
installing.
mot can aggregate sessions from remote hosts over SSH:
mot --all --host user@vm-a --host user@vm-bNotes:
- Remote scanning reads the same default directories as local mode:
~/.codex/sessionsand~/.claude/projects. - To bootstrap a Linux remote, run
curl -fsSL https://github.com/daulet/mot/releases/latest/download/install.sh | shon that host. - It shells out to local
sshand runsmot --jsonon the remote host, somotmust be installed remotely and available inPATH. - Remote activity stats are requested with the caller's local timezone offset so calendar days, streaks, and peak hour use one shared boundary before reports are merged.
- If a remote host has an older/incompatible
mot(or missingmot), that host is skipped and surfaced inWarningsoutput. - For cross-host aggregation,
--allis usually the right choice because scoped mode still filters by the recorded sessioncwd. - Compatibility aliases still work:
--global,--window, and--ssh-host.
