You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7f130ed
Browse filesBrowse the repository at this point in the historyBrowse files
Instead of working out dates, ask for the most recent periods of whatever the report groups by:
27
+
28
+
```bash
29
+
# Today
30
+
ccusage daily --last 1
31
+
32
+
# This week
33
+
ccusage weekly --last 1
34
+
35
+
# This month
36
+
ccusage monthly --last 1
37
+
38
+
# The last seven days, and the last three months
39
+
ccusage daily --last 7
40
+
ccusage monthly --last 3
41
+
```
42
+
43
+
The count is inclusive of the current period, so `--last 2` on a daily report covers yesterday and today. Weeks start on the same day the report buckets by, which is Monday everywhere except `ccusage claude weekly`, where `--start-of-week` decides.
44
+
45
+
`--last` works on every daily, weekly, and monthly report, including the per-agent ones such as `ccusage codex daily --last 1`. It is not available on `session`, `blocks`, or `statusline`, which have no calendar period, and it cannot be combined with `--since`, `--until`, or `--sections`.
Skip the date arithmetic when you only want the days just gone:
73
+
74
+
```bash
75
+
# Today
76
+
ccusage daily --last 1
77
+
78
+
# The last seven days, including today
79
+
ccusage daily --last 7
80
+
```
81
+
82
+
`--last` cannot be combined with `--since` or `--until`. See [Command-Line Options](/guide/cli-options#recent-periods) for how it behaves on the other reports.
The window starts on the same weekday the report buckets by, so `ccusage claude weekly --last 1 -w monday` starts on Monday. `--last` cannot be combined with `--since` or `--until`.
0 commit comments