cxreset
v0.1.1
Published
Display OpenAI Codex usage reset time for statusline
Maintainers
Readme
cxreset
A CLI tool to display OpenAI Codex usage reset time. Ideal for statusline display. Can also be used as a display component for ccstatusline.

Red circle: cxreset in action. Used alongside the awesome ccstatusline
Installation
# Recommended: run without global install
bunx cxreset
# or with npx
npx cxreset
# or with pnpm
pnpm dlx cxresetOptional: Global install
bun add -g cxreset
# or
npm install -g cxresetUsage
Package execution
bunx cxreset
# or
npx cxreset
# or
pnpm dlx cxresetLocal execution (from source)
npm install
npm run build
node dist/index.jsOutput
Codex: 5h:2h30m(5%) | 7d:3d12h(11%)| Field | Description |
|-------|-------------|
| Codex: | Prefix (distinguishes from ccreset) |
| 5h: | 5-hour reset window |
| 2h30m | Time remaining until reset |
| (5%) | Current usage |
| 7d: | 7-day (weekly) reset window |
| 3d12h | Time remaining until reset |
| (11%) | Current usage |
When the secondary window is not available, only the 5-hour window is shown:
Codex: 5h:2h30m(5%)Claude Code Statusline
Add the following to ~/.claude/settings.json.
Bun runtime
{
"statusLine": {
"type": "command",
"command": "bunx cxreset"
}
}Node.js-only runtime
{
"statusLine": {
"type": "command",
"command": "npx cxreset"
}
}With ccstatusline
When using cxreset as a ccstatusline addon, it is recommended to set the timeout to 2000ms. cxreset communicates with the Codex app-server via JSON-RPC, which may take longer than typical HTTP requests.
Requirements
How it works
Launches the Codex CLI's app-server and communicates via JSON-RPC to fetch usage information.
npm Auto Publish (GitHub Actions)
This repo includes CI (.github/workflows/npm-publish.yml) that automatically publishes to npm when you push a tag like v1.2.3.
Prerequisites:
- Add a Trusted Publisher in your npm package settings
- Select
GitHub Actionsas the provider and bind this repository and workflow (.github/workflows/npm-publish.yml) - No
NPM_TOKENGitHub secret is required
Release flow:
# Example: release 0.1.0
npm version 0.1.0
git push origin main --follow-tagsIf the Git tag (for example v0.1.0) and package.json version do not match, the workflow fails and does not publish.
License
MIT
GitHub Pages
The landing page (docs/) is deployed by .github/workflows/pages.yml. In GitHub Settings > Pages, set Source to GitHub Actions.
