Resources

Codextime guide

Codex CLI install and tracking command

Codextime works through a local npx command. Run the tracker on the machine where Codex stores session logs, and it uploads usage metadata such as token counts, model names, and timestamps. It does not upload conversation text or project files.

Direct answer

To track Codex CLI usage with Codextime, run `npx codextime-tracker@latest <userId>` on the same machine where you use Codex. The command scans local usage metadata, skips rows already synced, and uploads token counts, model names, timestamps, and optional labels.

Tracker command
npx codextime-tracker@latest <userId>

Uploaded vs never uploaded

Uploaded usage metadata
Token countsBuild usage totals, heatmaps, and token-burned views.
Model namesShow model mix and API-equivalent usage context.
TimestampsPlace usage on daily, weekly, and all-time timelines.
Optional account labelSeparate seats or machines when the user chooses to label them.
Never uploaded
PromptsConversation input is not needed for usage analytics.
ResponsesGenerated output text is not needed for token totals.
Source codeProject files stay on the user machine.
SecretsCredentials and private environment data are outside the tracking scope.

Tracker flow

  1. 1

    Local usage metadata

    Codex writes session usage metadata on the machine where the user runs Codex.

  2. 2

    Tracker command

    The user runs the Codextime npx command to scan usage metadata and skip already-synced rows.

  3. 3

    Usage upload

    Codextime receives token counts, model names, timestamps, and optional labels.

  4. 4

    Dashboard and leaderboard

    The app renders private usage views and optional public ranking from the uploaded metadata.

What this page can answer

  • codex cli install
  • install codex cli
  • codex cli tracker
  • what happens when npx codextime runs

Before you run the tracker

Use the command on the same machine and user account where you run Codex. That gives the tracker access to the local session usage files it needs to summarize token activity.

What happens when npx runs

The package starts locally, scans known Codex usage log locations, compares against the last uploaded cursor, and uploads new usage rows to Codextime.

  • Reads local Codex session usage metadata
  • Deduplicates previously uploaded rows
  • Uploads token counts, model names, and timestamps
  • Leaves prompts, responses, source code, and secrets local

When to rerun it

Rerun the tracker when you want the dashboard refreshed. Repeated runs should only upload new usage rows that were not already synced.

Privacy boundary

Usage metadata

Codextime uploads token counts, model names, timestamps, and optional labels used to build analytics views.

Never uploaded

Prompts, responses, source code, and secrets are not uploaded by the tracker.

FAQ

Do I need to manually export Codex data?

No. The tracker is intended to read local Codex session usage metadata directly when available.

Can I label different accounts?

Yes. Account labels can be added as optional metadata so multiple seats or machines can be separated in reporting.

Does npx give Codextime access to my codebase?

No. The tracker should upload usage metadata only. It should not upload source code, prompt text, response text, or secrets.

Source notes

  • This page is based on Codextime product behavior and Google Trends query clusters saved under /Users/dodo/Downloads/ctime-queries.
  • Codextime is independent and not affiliated with OpenAI.
  • API-equivalent usage is educational context, not a bill or official OpenAI pricing statement.