Check token usage from the terminal with /usage added in Codex CLI 0.140.0

Check token usage from the terminal with /usage added in Codex CLI 0.140.0

2026.06.20

This page has been translated by machine translation. View original

Hey there! I'm Yuji Nishimura from the Operations Department!

The /usage command, which lets you check token usage from within the TUI, was added in v0.140.0 of OpenAI Codex CLI. Previously, you had to open the OpenAI dashboard in a browser, but now you can check it without leaving the TUI. I tried the argumentless /usage and the three subcommands daily / weekly / cumulative, so here's a summary.

What is /usage

/usage is a slash command added to the Codex CLI TUI in PR #27925.

When entered, it asynchronously fetches activity data from the API and displays graphs and summary statistics above the composer. A temporary card is shown while loading, and it does not interfere with streaming responses or other processes.

Trying It Out

Environment

  • Codex CLI rust-v0.140.0
  • macOS (Apple Silicon)

1. Checking the Overview with /usage

Launch the TUI with codex, type /usage in the composer, and press Enter.

The screen displayed after loading is divided into two parts.

Summary Statistics (4 items)

Item Content
Lifetime Total lifetime token count
Peak Daily peak token count
Streak Current consecutive days of use (also shows best record. e.g.: 12d (best 54d))
Longest task Longest task duration

CleanShot 2026-06-18 at 12.54.13@2x

Activity Graph

Data for the past 52 weeks is displayed in the same format as GitHub's contributions graph (the so-called "grass"). Days with higher usage appear as darker-colored cells. A color palette adapted to the terminal's light/dark theme is used, resulting in colors that are easy to see against the background color.

2. Viewing the Heatmap with /usage daily

Entering /usage daily displays a heatmap with 7 rows × 52 columns. The vertical axis shows the day of the week (Su / Mo / Tu / We / Th / Fr / Sa), the horizontal axis shows the week, and it is the same display as /usage without arguments.

3. /usage weekly and /usage cumulative

/usage weekly displays a weekly bar chart, and /usage cumulative displays a cumulative bar chart.

CleanShot 2026-06-18 at 12.55.47@2x

CleanShot 2026-06-18 at 12.56.20@2x

Command Display Format
/usage (= /usage daily) Day-of-week heatmap for 52 weeks
/usage weekly Weekly bar chart
/usage cumulative Cumulative bar chart

If you want to get a rough sense of trends from a weekly summary, /usage weekly seems suitable, and if you want to see the overall picture of accumulated usage, /usage cumulative seems to be the way to go.

Impressions After Trying It

Being able to check token usage trends without leaving the terminal is convenient when using Codex as your main tool. The Streak feature is designed to create a sense of "keeping it going," similar to GitHub's contributions graph, and I found it interesting as a way to visualize usage habits.

Summary

I tried the /usage command in Codex CLI 0.140.0.

  • Typing /usage within a TUI session displays an activity graph for the past 52 weeks and four statistics: Lifetime, Peak, Streak, and Longest task
  • You can switch graph formats with the three subcommands /usage daily, /usage weekly, and /usage cumulative
  • You can get a complete picture of usage trends right from the terminal

I hope this is helpful to someone.


Reference Links:


国内企業 AI活用実態調査2026 配布中

クラスメソッドが独自に行なったAI診断調査をもとに、企業のAI活用の現在地を調査レポートとしてまとめました。企業規模別の活用度傾向に加え、規模を超えてAI活用を進める企業に共通する取り組みまで、自社の現在地を捉えるためのヒントにぜひ。

国内企業 AI活用実態調査2026

無料でダウンロードする

Share this article