This guide is for developers who want to answer “How much Claude Code or Codex did I actually use?” It walks through the command, explains the report and helps diagnose missing history. It does not require a Ganivra account or connecting a team dashboard.
How do I check both tools with one command?
Open a terminal on the computer where you use Claude Code or Codex and run:
curl -fsSL https://ganivra.com/check.sh | shThe command downloads and runs the checker. It looks for supported local session logs for both tools, downloads public model prices and prints a report for the tools with recorded usage. The default period is the rolling last 30 days, not the previous calendar month.
You need curl, a compatible shell and Python 3.8 or later. If you prefer to inspect the code first, read the shell script and Python source.
If prompted, select your plan and enter the monthly payment where required. Price comparisons use US dollars, so convert a non-USD payment consistently. You can skip plan selection and still inspect usage. Verify the selected plan if you have changed it since a previous run.
How do I check only Claude Code or only Codex?
Pass a tool filter after the shell command. For Claude Code only:
curl -fsSL https://ganivra.com/check.sh | sh -s -- --tool claude --days 30For Codex only:
curl -fsSL https://ganivra.com/check.sh | sh -s -- --tool codex --days 30Can I check the last seven days instead?
Yes. Change the lookback with --days, which accepts 1 to 90:
curl -fsSL https://ganivra.com/check.sh | sh -s -- --days 7A longer requested window cannot recover deleted logs or activity from another machine. A seven-day report is useful for investigating a recent change, but its projected monthly amount may exaggerate an unusually busy week. Compare like periods when assessing trends.
What does each number in the usage report mean?
Read coverage and unpriced usage before interpreting the dollar total. The report summarizes the supported records it can find; it cannot certify that every activity on your account was captured.
| Report field | Meaning | Important limitation |
|---|---|---|
| Usage at API prices | Recorded, priced usage valued using model rates | Not an invoice or an extra subscription charge |
| Active days | Days with supported recorded calls | Not hours worked or proof of a complete history |
| Logs cover fewer days | Available records start within the requested window | The monthly figure is a projection, not a full month measured |
| Model breakdown | Token categories and estimated cost by model | Token categories can have different prices |
| Busiest five hours | The API-equivalent cost of a recorded burst | Not quota remaining or a limit-reset timer |
| Top projects | Estimated costs grouped by project folder name | Identical folder names may group separate projects together |
| Unpriced calls | Records the checker could not assign a price | Excluded from the priced total; not free usage |
Why does the report show both a usage total and a monthly estimate?
When the available span is shorter than 30 days, the checker can scale the recorded cost to a monthly amount. For example, $40 across a ten-day span projects to approximately $120 over 30 days. Only the $40 was measured in this illustrative example. The projection assumes a similar pace and is not a forecast of your bill.
Why are there so many cached tokens?
Repeated context can produce substantial cached usage. The checker distinguishes cached input from uncached input and supports Claude cache-write records. Pricing all tokens at one headline rate can misstate costs. For Codex, the checker uses recorded output counts, including reasoning, without adding reasoning a second time. See the calculation source for the rules and inspect the price source and date printed in your report.
How do I export the last 30 days as JSON?
Use the JSON and non-interactive options to save a local report:
curl -fsSL https://ganivra.com/check.sh | sh -s -- --days 30 --json --no-input > ganivra-usage-30d.jsonThis writes the report to ganivra-usage-30d.json in your current directory, replacing an existing file with that name. JSON includes model and project breakdowns, coverage, price metadata and unpriced calls. With no saved or supplied plan, the usage report remains available but the plan comparison may be absent.
You can use the file for your own analysis or retain it as a dated snapshot. Review it before sharing: project folder names and work patterns may be sensitive even though prompt and source-code text are not included.
Why is my usage history missing or incomplete?
Check the device, account, period and log location first. “No usage found” means the checker found no supported records for the selected tool and time window on this machine. It does not establish that you never used the service.
- Different computer: run the check where the sessions occurred.
- Different local user: each user can have a different home directory and log history.
- New installation or deleted files: older records may no longer be present.
- Custom configuration directory: ensure the environment matches the setup used to create the logs.
- Unsupported or incomplete records: activity without usable model, timestamp or token fields may not appear.
Where does Ganivra look for the logs?
Claude Code records are read under ~/.claude/projects, or the projects directory beneath CLAUDE_CONFIG_DIR when configured. Codex records are read from supported files under ~/.codex/sessions and ~/.codex/archived_sessions, respecting CODEX_HOME when configured.
Can I combine reports from two laptops?
Review both, but do not simply add totals if session files were copied or synchronized between machines. The checker handles supported duplicate records within a run; separate reports are not automatically reconciled with each other. Local logs also do not guarantee coverage of browser conversations or cloud activity.
What if the price list cannot be downloaded?
The checker can fall back to a saved local price list when one is available. Check the reported source and date. If no usable list is available, it stops with a download error; restore connectivity and retry. A cached list may omit newer models or use older prices.
Does this send anything from my session logs to Ganivra?
The default check does not upload your usage data. It parses local session files to extract usage metadata and does not print, store or upload prompt, response or code text. It does make network requests to download the checker and public prices, so “local reporting” does not mean “no network connection.”
The checker may save prices and plan settings locally. Its optional --import mode sends usage metadata to a Ganivra workspace; none of the commands in this article enable that mode. Running the local check also does not disable any telemetry or integration you configured separately.
What should I do after checking my usage?
Choose the next step based on the question the report raises. If you are reviewing a renewal, compare actual payments, other benefits and busy-period requirements as well as token value:
If you want to understand Claude Code’s starting context and what drives its cost, use the free Ganivra Claude Code plugin. After installation, /ganivra:audit examines context and /ganivra:report provides usage breakdowns. The plugin is for Claude Code; the checker above supports both tools.
For team reporting, explore Claude Code and Codex cost tracking by developer and project. One machine’s report should not be treated as the whole team’s activity.
Where can I learn more about costs and tracker choices?
Frequently asked questions about Claude Code and Codex usage history
How do I check my last 30 days of Claude Code and Codex usage?
Run curl -fsSL https://ganivra.com/check.sh | sh in a terminal on the machine where you use the tools. The default window is the rolling last 30 days. The checker reports supported local usage separately for Claude Code and Codex, including active days, model costs and a comparison with your selected plan.
Can I check only Claude Code or only Codex?
Yes. Append -s -- --tool claude --days 30 after sh for Claude Code, or -s -- --tool codex --days 30 for Codex. Without a tool filter, the checker looks for both tools and reports those with supported usage records.
Does last 30 days mean the previous calendar month?
No. It is a rolling lookback from the time you run the command. It may not match your invoice dates. Compare the same period before drawing conclusions about billing or subscription value.
Does the usage checker send my prompts, code or usage to Ganivra?
The default command does not upload usage data, prompt text or code. It downloads the checker and public model prices, processes local session logs and may save the price list and selected plan locally. The separate --import option uploads usage metadata to a workspace and is not included in this guide’s commands.
Do I need an account or an API key for the local report?
No Ganivra account or API key is required for the default local check. You need curl, a shell environment compatible with the command, Python 3.8 or later, and supported local session logs. Downloading the checker and a fresh price list requires a network connection.
Where does the checker find Claude Code and Codex logs?
It looks under ~/.claude/projects for Claude Code and ~/.codex/sessions plus supported ~/.codex/archived_sessions files for Codex. It respects CLAUDE_CONFIG_DIR and CODEX_HOME when configured. These local records are not a complete account-wide activity history.
Why does the report say no usage was found?
The selected tool and time window may have no supported logs on this machine. Check that you are using the correct device and user account, that local history is present, and that any custom configuration directory is set correctly. No records found is not proof of zero activity across your account.
Why does the checker show fewer than 30 days?
The available records may start later than the requested window because of a new installation, deleted logs or missing history. The checker can project a monthly amount from that available span. Treat the recorded total and monthly projection as different figures; neither proves the history is complete.
Is the dollar amount my actual Claude or ChatGPT bill?
No. It is an API-equivalent estimate based on supported token records and model prices. Subscription payments, purchased credits and provider quota accounting are separate. Consult your provider’s invoices for actual charges and account usage for remaining allowances.
Are cached tokens and unknown models handled?
The checker separates cached and uncached usage and supports Claude cache-write records. Calls it cannot price are identified as unpriced and excluded from the priced total. Review those omissions and the price date before relying on a cost comparison.
Can I export my Claude Code and Codex usage as JSON?
Yes. Append -s -- --days 30 --json --no-input after sh to produce a non-interactive JSON report. Redirect the output to a local file if you want to save it. Exported metadata can contain project folder names and usage patterns, so review it before sharing.
Does this include browser chats, cloud tasks and other computers?
Only when their supported records are present in the local files being read. Do not assume it covers all Claude browser chats, ChatGPT conversations, cloud tasks or another computer. Review each source separately and avoid counting copied sessions twice.
Can the report tell me which subscription to buy?
It provides a heuristic comparison of API-equivalent usage and your selected monthly payment. Check missing history, unpriced usage, bursts, other plan benefits and future work before acting. API-equivalent dollars are not a direct conversion to subscription limits.
Ready to check your own last 30 days?
Run the command on your coding machine, then review coverage and unpriced usage before interpreting the estimate.
curl -fsSL https://ganivra.com/check.sh | shRead the plan checker guide or inspect the checker source. Command options and reporting behavior reviewed November 25, 2026.