cxstatusline 0.10.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <picture>
4
4
  <source media="(prefers-color-scheme: dark)" srcset="docs/banner-dark.png">
5
- <img alt="cxstatusline - Customizable statusline & powerline status bar for OpenAI Codex CLI" src="docs/banner-light.png" width="720">
5
+ <img alt="cxstatusline - Customizable statusline & status bar for OpenAI Codex CLI" src="docs/banner-light.png" width="720">
6
6
  </picture>
7
7
 
8
8
  # cxstatusline
@@ -23,31 +23,17 @@
23
23
 
24
24
  </div>
25
25
 
26
- ## 📑 Table of Contents
27
-
28
- - [✨ Features](#-features)
29
- - [🌐 Interactive Web Playground](#-interactive-web-playground)
30
- - [📋 Requirements](#requirements)
31
- - [🚀 Install](#-install)
32
- - [🎛️ Configure](#️-configure)
33
- - [🧩 Widgets Catalog](#widgets)
34
- - [🔄 Update, Upgrade & Revert](#update)
35
- - [🔍 How it Works](#-how-it-works)
36
- - [🏷️ Supported Versions](#supported-versions)
37
- - [🩺 Troubleshooting](#-troubleshooting)
38
- - [🙏 Acknowledgments](#-acknowledgments)
39
-
40
26
  ## ✨ Features
41
27
 
42
- **cxstatusline** is a configurable, one-to-three-row statusline & status bar for the [OpenAI Codex CLI](https://github.com/openai/codex) (bringing the rich statusbar experience of [ccstatusline](https://github.com/sirmalloc/ccstatusline) for Anthropic Claude Code to OpenAI Codex).
28
+ **cxstatusline** is a configurable, multi-row statusline & status bar for the [OpenAI Codex CLI](https://github.com/openai/codex).
43
29
 
44
- - **⚡ Live Codex Telemetry**: Monitor active model, reasoning effort, context token window usage (`k/200k`), session duration, and rate limit reset countdowns in real time.
45
- - **🌿 Git Status & Branch**: Always see current branch and unstaged/staged change counters (`+42, -10`) right in your Codex prompt.
30
+ - **⚡ Live Codex Telemetry**: Monitor active model, reasoning effort, context token window (`k/200k`), session duration, and rate limit reset countdowns in real time.
31
+ - **🌿 Git Status & Branch**: Always see current branch and unstaged/staged change counters (`+42, -10`) directly in your Codex prompt.
46
32
  - **🎨 Powerline Themes & ANSI Colors**: Choose from built-in Powerline separators (arrows, angled, curved, flame), 16/256/TrueColor palettes, or design custom rows.
47
33
  - **🖥️ Interactive Terminal TUI**: Configure your layout visually inside your terminal (`cxstatusline`) or in the web playground.
48
- - **🔄 ccstatusline Compatibility**: Preset syntax and widget IDs match ccstatusline, making transition from Claude Code seamless.
34
+ - **🧩 36 Built-in Widgets**: From token speed to session clocks, working directory, and custom shell command outputs.
49
35
 
50
- Independent project; not an official OpenAI product.
36
+ *Note: cxstatusline is an independent open-source project and is not affiliated with or endorsed by OpenAI.*
51
37
 
52
38
  ## 🌐 Interactive Web Playground
53
39
 
@@ -61,17 +47,16 @@ Try out themes, arrange widgets, and preview your custom OpenAI Codex statusline
61
47
 
62
48
  </details>
63
49
 
64
- ## Requirements
50
+ ## 📋 Requirements
65
51
 
66
- - **macOS 14 (Sonoma) or newer** (Apple Silicon or Intel) or **Linux** (x86_64 or aarch64).
52
+ - **macOS 14 (Sonoma)+** (Apple Silicon or Intel) or **Linux** (x86_64 or aarch64).
67
53
  - **Node.js 22+**.
68
- - **Existing Codex CLI installation** kept in place (`~/.codex/`).
69
- - **Git**.
70
- - **Rust toolchain** (1.95.0+) is required only if building from source (`--compile`).
54
+ - **Existing Codex CLI installation** (`~/.codex/`).
55
+ - Prebuilt installs require no extra dependencies beyond Node.js.
71
56
 
72
- ## 🚀 Install
57
+ ## 🚀 Quick Start
73
58
 
74
- Install globally with npm:
59
+ Install globally with npm and run the interactive setup:
75
60
 
76
61
  ```sh
77
62
  npm install -g cxstatusline
@@ -79,47 +64,24 @@ cxstatusline install
79
64
  cxstatusline doctor
80
65
  ```
81
66
 
82
- `cxstatusline install` downloads the verified prebuilt binary matching your Codex version, verifies checksums against `manifest.json`, and activates it.
83
- - **Interactive selection**: Running `cxstatusline install` opens a keyboard-driven version picker. Use ↑/↓ and Enter to select, or Escape/Ctrl+C to cancel. Prebuilt availability is shown per version; source-only choices require confirmation (unless you already passed `--compile`).
84
- - **Upgrade choices**: `cxstatusline upgrade` uses the same keyboard controls to choose the latest supported prebuilt, a supported source build, or cancellation. It does not update upstream Codex first.
85
- - **Live progress**: Ink renders download progress in terminals while completed stages remain in the transcript. Source builds report their phases; redirected output retains plain milestone logs.
86
- - **Target a specific version**: `cxstatusline install --codex-version <version>` (e.g. `cxstatusline install --codex-version 0.154.0`).
87
- - **Non-interactive / CI**: Pass `-y` or `--yes` to accept the default without prompting.
88
-
89
- Start Codex, accept its cxstatusline hook trust prompt, and open a new session after installation. An already-running process does not switch binaries when installation finishes.
90
-
91
- <details>
92
- <summary>Install from git checkout</summary>
93
-
94
- ```sh
95
- git clone https://github.com/adrijshikhar/cxstatusline.git
96
- cd cxstatusline
97
- bun install --frozen-lockfile
98
- bun run link:local
99
- export PATH="$HOME/.local/bin:$PATH"
100
- cxstatusline install
101
- cxstatusline doctor
102
- ```
67
+ - **Interactive Selection**: `cxstatusline install` opens a keyboard-driven version picker showing verified prebuilts matching your Codex release.
68
+ - **Target a Version**: Target a specific version directly with `cxstatusline install --codex-version <version>` (e.g. `cxstatusline install --codex-version 0.159.3`).
69
+ - **Non-Interactive / CI**: Pass `-y` or `--yes` to accept defaults automatically.
103
70
 
104
- </details>
71
+ After installation, start Codex and accept its hook trust prompt.
105
72
 
106
73
  <details>
107
74
  <summary>Build from source instead</summary>
108
75
 
109
- If you prefer to compile the patched Codex binaries locally from source:
76
+ If you prefer to compile patched Codex binaries locally from source:
110
77
 
111
78
  ```sh
112
79
  rustup toolchain install 1.95.0 --component clippy --component rustfmt --component rust-src
113
- git clone https://github.com/adrijshikhar/cxstatusline.git
114
- cd cxstatusline
115
- bun install --frozen-lockfile
116
- bun run link:local
117
- export PATH="$HOME/.local/bin:$PATH"
80
+ npm install -g cxstatusline
118
81
  cxstatusline install --compile
119
82
  cxstatusline doctor
120
83
  ```
121
-
122
- `install --compile` clones the exact upstream tag for your Codex version into `~/.local/share/cxstatusline/codex/`, applies the tested patch, builds both `codex` and `codex-code-mode-host`, verifies them, and activates them. Local compilation requires at least 20 GiB of free disk space and takes tens of minutes on a cold build.
84
+ *(Requires Rust 1.95.0+, Python 3.10+, and ~20 GiB free disk space).*
123
85
 
124
86
  </details>
125
87
 
@@ -129,145 +91,65 @@ cxstatusline doctor
129
91
  cxstatusline
130
92
  ```
131
93
 
132
- The bare command opens the configuration TUI in an interactive terminal. Choose widgets, colors
133
- and themes, preview, then save explicitly or press Ctrl+S. Settings live at
134
- `~/.config/cxstatusline/settings.json` (or your XDG config location).
135
-
136
- For scripts, `cxstatusline render` reads a versioned JSON payload on stdin and prints ANSI rows;
137
- it never opens the TUI.
138
-
139
- ## Widgets
94
+ Running `cxstatusline` opens the interactive configurator TUI right in your terminal. Select widgets, change colors and Powerline symbols, preview changes live, and press `Ctrl+S` to save. Settings are stored at `~/.config/cxstatusline/settings.json`.
140
95
 
141
- 36 widgets: model and thinking effort, Git branch and changes, context and token counts, token speed,
142
- 5-hour and weekly usage and reset, session clock and name, working directory, terminal width, memory, plus three
143
- custom widgets that show your own text, symbol, or the output of a shell command.
96
+ For automated scripting, `cxstatusline render` reads a JSON payload on stdin and prints ANSI strings without launching the TUI.
144
97
 
145
- Type IDs match ccstatusline's, so a ccstatusline preset imports without translation.
98
+ ## 🧩 Widgets Catalog
146
99
 
147
- 👉 The full catalog, and how Custom Command handles timeouts, colours and background caching, are in
148
- the **[Usage guide](docs/usage.md)**.
100
+ Includes 36 modular widgets across several categories:
101
+ - **Telemetry & Models**: Active model, reasoning effort, context token progress, token speed (input/output/total).
102
+ - **Git & Workspace**: Branch, dirty indicators, staged/unstaged diff stats, current working directory.
103
+ - **Session & Limits**: 5-hour & weekly usage quotas, reset countdown timers, session clock, and duration.
104
+ - **Custom Widgets**: Show your own static text, custom glyphs, or run arbitrary shell commands with background caching.
149
105
 
150
- ## Update & Upgrade
106
+ 👉 See the **[Usage Guide (docs/usage.md)](docs/usage.md)** for full widget options, custom command caching, and color configuration.
151
107
 
152
- cxstatusline follows the Homebrew paradigm for managing updates:
153
- - **`cxstatusline update`**: Updates the **cxstatusline CLI tool itself** to the latest release (via npm, bun, or git).
154
- - **`cxstatusline upgrade`**: Upgrades the **patched Codex binary pair** to the latest supported release.
108
+ ## 🔄 Update, Upgrade & Revert
155
109
 
156
- ### Updating cxstatusline (The Tool)
110
+ cxstatusline follows the Homebrew paradigm:
157
111
 
158
112
  ```sh
159
- cxstatusline update # Updates cxstatusline to the latest version
160
- cxstatusline update --check # Checks for available tool updates without installing
161
- ```
162
-
163
- `cxstatusline update` automatically detects your install method (`npm`, `bun`, or `git checkout`) and updates the CLI tool.
164
-
165
- ### Upgrading Patched Codex
113
+ # Update cxstatusline CLI tool
114
+ cxstatusline update
166
115
 
167
- ```sh
116
+ # Upgrade patched Codex binary to the latest supported release
168
117
  cxstatusline upgrade
169
- ```
170
118
 
171
- `cxstatusline upgrade` downloads and verifies the latest published prebuilt supported by your cxstatusline package, then activates the complete patched Codex pair. It does not run Codex's self-updater or modify your original Codex installation. Open a new Codex session afterward.
172
-
173
- The same Codex version is checked for rebuilt patch assets; a newer installed version is never downgraded. If discovery or verification fails, the active pair stays in place. When running `upgrade`, if a newer version of `cxstatusline` is available, it will display a friendly reminder to run `cxstatusline update` first.
174
-
175
- Options:
176
- - `cxstatusline upgrade --compile`: builds the latest locally supported Codex patch from source instead.
177
- - `--force`, `-y`, and `--yes` remain accepted for compatibility; updates already run without a prompt and always verify the pair.
178
- - Note: Running `cxstatusline update --compile` or `--force` will automatically forward to `cxstatusline upgrade` with a notice.
179
-
180
- Session-start updates also leave a newer patched pair in place when the original Codex installation is older, including under the `every` policy.
181
-
182
- ## Revert
183
-
184
- ```sh
119
+ # Safely revert and restore your original stock Codex launcher
185
120
  cxstatusline revert
186
121
  ```
187
122
 
188
- `cxstatusline revert` restores the stock launcher, removes CX-owned executables, generations, and the hook, and keeps settings and source. Generations are kept until revert; close Codex sessions first.
123
+ - `cxstatusline update`: Checks for and updates the CLI tool via npm, bun, or git.
124
+ - `cxstatusline upgrade`: Downloads and verifies the latest published prebuilt for your Codex installation.
125
+ - `cxstatusline revert`: Restores the original unmodified Codex binaries and removes all cxstatusline hooks and generations.
189
126
 
190
- ## 🔍 How it works
191
-
192
- Codex CLI does not yet provide a native statusline extension hook ([openai/codex#17827](https://github.com/openai/codex/issues/17827)). `cxstatusline` bridges this with a lightweight additive Rust patch that captures session telemetry (model, context tokens, Git branch, rate limits) and invokes a local Node/TypeScript ANSI renderer.
193
-
194
- Updates use an immutable **generation-based layout** (`~/.local/libexec/cxstatusline/generations/`) with atomic symlink swaps, ensuring your active terminal sessions are never interrupted.
195
-
196
- 👉 For a full architectural breakdown of how Codex is patched with Rust, check out the **[Architecture & Technical Deep Dive (wiki.md)](wiki.md)**.
197
-
198
- ## Supported versions
127
+ ## 🏷️ Supported Versions
199
128
 
200
- cxstatusline matches exact stable releases of OpenAI Codex.
129
+ cxstatusline supports official releases of the OpenAI Codex CLI on macOS and Linux.
201
130
 
202
- ### Latest Supported Version
203
- | Codex Target | Prebuilt Release | Supported Architecture | Status |
204
- |---|---|---|---|
205
- | **0.155.0** | [`codex-v0.155.0`](https://github.com/adrijshikhar/cxstatusline/releases/tag/codex-v0.155.0) | Apple Silicon (`darwin-arm64`) | ✅ Verified Prebuilt |
131
+ 👉 **View the full interactive list**: **[cxstatusline.adrijshikhar.dev/#compatibility](https://cxstatusline.adrijshikhar.dev/#compatibility)**
206
132
 
207
- <details>
208
- <summary><b>Previous Supported Versions</b></summary>
209
- <br>
133
+ You can also run `cxstatusline install` at any time to browse supported releases interactively in your terminal. If your version isn't listed, you can [request support on GitHub](https://github.com/adrijshikhar/cxstatusline/issues/new?template=request-version.md).
210
134
 
211
- | Codex Target | Prebuilt Release | Supported Architecture | Status |
212
- |---|---|---|---|
213
- | **0.154.0** | [`codex-v0.154.0`](https://github.com/adrijshikhar/cxstatusline/releases/tag/codex-v0.154.0) | Apple Silicon (`darwin-arm64`) | ✅ Verified Prebuilt |
214
- | **0.153.4** | [`codex-v0.153.4`](https://github.com/adrijshikhar/cxstatusline/releases/tag/codex-v0.153.4) | Apple Silicon (`darwin-arm64`) | ✅ Verified Prebuilt |
215
- | **0.153.0** | [`codex-v0.153.0`](https://github.com/adrijshikhar/cxstatusline/releases/tag/codex-v0.153.0) | Apple Silicon (`darwin-arm64`) | ✅ Verified Prebuilt |
216
- | **0.152.1** | [`codex-v0.152.1`](https://github.com/adrijshikhar/cxstatusline/releases/tag/codex-v0.152.1) | Apple Silicon (`darwin-arm64`) | ✅ Verified Prebuilt |
135
+ ## 🔍 How it Works
217
136
 
218
- To install a specific version:
219
- ```sh
220
- cxstatusline install --codex-version 0.154.0
221
- ```
222
- </details>
137
+ OpenAI Codex does not yet provide a native statusline extension API ([openai/codex#17827](https://github.com/openai/codex/issues/17827)). `cxstatusline` bridges this with a lightweight additive Rust patch in `codex-tui` that extracts runtime session telemetry (model, tokens, Git branch, rate limits) and sends it over stdio to a high-performance local TypeScript ANSI renderer.
223
138
 
224
- Rust patch versions are independent of Codex and cxstatusline package versions. Each supported Codex version belongs to exactly one patch version:
139
+ Updates use an immutable **generation-based directory layout** (`~/.local/libexec/cxstatusline/generations/`) with atomic symlink swaps, ensuring active terminal sessions are never interrupted.
225
140
 
226
- | Rust patch | Tested Codex versions |
227
- | --- | --- |
228
- | v1 | 0.152.1, 0.153.0, 0.153.1, 0.153.4, 0.154.0, 0.155.0, 0.155.1 |
229
- | v2 | 0.156.0, 0.156.1 |
141
+ 👉 For full architectural diagrams and deep dive, see **[wiki.md](wiki.md)**.
230
142
 
231
- Codex 0.153.1 is validated on macOS ARM64; its prebuilt release is pending. Compatibility entries do not imply that a prebuilt has already been published.
232
-
233
- `patches/manifest.json` records that ownership with `patchVersion` on each compatibility entry. Its `version: 2` is the manifest format, not the Rust patch version. Entries can describe inclusive ranges, but we currently list only the exact tested versions. Version-specific patch files remain separate because upstream source layouts differ.
234
-
235
- Add newly tested Codex versions to the existing patch version while it continues to work. When a newer Codex needs a changed Rust integration, introduce the next patch version for that Codex version and future compatible releases. Do not backport it or reassign older Codex versions. Overlapping entries are rejected.
236
-
237
- New builds record the patch version in release and installation metadata; `cxstatusline doctor` displays it. Older releases remain readable and report `unknown (legacy)` rather than guessing. New prebuilt manifests use schema 2, so installing them requires a cxstatusline package that supports this format. Release tags remain `codex-v<version>`.
238
-
239
- Rebuilding an existing Codex tag replaces its complete release asset set. The workflow verifies the new build, downloads and verifies every old asset, and saves a 90-day workflow artifact before mutation. The Git tag remains; the release may be briefly unavailable while the replacement is uploaded and verified. If automatic recovery fails, download the matching `release-backup-<tag>-<run-id>` artifact and restore it with `bun scripts/prebuilt.ts restore --tag codex-v0.156.1 --codex-version 0.156.1 --backup-dir ./release-backup --repo adrijshikhar/cxstatusline`.
143
+ ## 🩺 Troubleshooting
240
144
 
241
- If your Codex version is not listed, cxstatusline fails closed: it will neither download an unverified prebuilt nor attempt source compilation. New versions require a tested patch file, an entry in `patches/manifest.json`, and a release workflow run.
145
+ - **No statusline visible?** Run `cxstatusline doctor`, verify `which codex` points to `~/.local/bin/codex`, check your `PATH`, accept the hook prompt inside Codex, and restart your terminal session.
146
+ - **Interrupted installation?** Run `cxstatusline doctor`. You can run `cxstatusline revert` at any time to safely restore stock Codex before reinstalling.
147
+ - **Diagnostics**: Run `cxstatusline doctor` to inspect active generation symlinks, daemon status, and binary checksums.
242
148
 
243
- The daily upstream watcher audits every stable release in the newest Codex major.minor series and only the `.0` baseline of older series, at or above the support floor. For example, while 0.156.x is newest, 0.156.0 and 0.156.1 are required alongside 0.155.0; 0.155.1 is not a backfill requirement. Existing published assets and tested compatibility mappings are retained. It updates one `Codex release coverage gaps` issue and uploads a machine-readable report. A separate watchdog fails if no successful scheduled watcher run has completed in the last 36 hours. Enable repository **Settings → Notifications → Actions** and select failed workflow runs (or enable email notifications for Actions) to receive these failures. The watchdog runs inside GitHub Actions, so a GitHub-wide scheduling outage cannot be detected from within GitHub.
244
-
245
- ## 🩺 Troubleshooting
246
-
247
- - **No footer:** Run `cxstatusline doctor`, verify `which codex` points to `~/.local/bin/codex`, check your `PATH`, accept the hook prompt in Codex, and start a fresh session.
248
- - **Unsupported version:** Wait for an explicitly supported patch. `--force` does not bypass version compatibility. Keep a working stock Codex installation.
249
- - **Failed build:** Inspect `~/.local/state/cxstatusline/patch.log`, fix the prerequisite, then run `cxstatusline patch --force`. Redact personal paths, session identifiers, and secrets before sharing logs.
250
- - **Missing companion / interrupted install:** Run `cxstatusline doctor`. Use `cxstatusline revert` to return to stock before reinstalling if unhealthy. Do not manually replace only one binary.
251
-
252
149
  ## 🙏 Acknowledgments
253
-
254
- Huge shout-out to **[ccstatusline](https://github.com/sirmalloc/ccstatusline)** by [@sirmalloc](https://github.com/sirmalloc)! The interactive configurator TUI, widget architecture, Powerline themes, and overall statusline UX in `cxstatusline` are directly adapted and inspired by `ccstatusline`'s fantastic work for Claude Code.
255
-
256
- ## License
257
-
258
- cxstatusline is [MIT licensed](LICENSE). See [SECURITY.md](SECURITY.md) for security boundaries and reporting. [NOTICE](NOTICE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) preserve upstream attribution. OpenAI Codex remains separately licensed under Apache-2.0.
259
150
 
260
- ---
261
-
262
- - 🌐 **Web Playground:** [cxstatusline.adrijshikhar.dev](https://cxstatusline.adrijshikhar.dev)
263
- - 💬 **Discussions & Ideas:** [github.com/adrijshikhar/cxstatusline/discussions](https://github.com/adrijshikhar/cxstatusline/discussions)
264
- - 📦 **npm Package:** [npmjs.com/package/cxstatusline](https://www.npmjs.com/package/cxstatusline)
151
+ Huge shout-out to **[ccstatusline](https://github.com/sirmalloc/ccstatusline)** by [@sirmalloc](https://github.com/sirmalloc)! The interactive configurator TUI, widget architecture, Powerline themes, and overall statusline UX in `cxstatusline` are directly adapted and inspired by `ccstatusline`'s fantastic work for Claude Code.
265
152
 
266
- ### Prebuilt build machine
153
+ ## 📄 License
267
154
 
268
- All Codex prebuilt jobs run on the owner's M5 Pro (`192.168.1.65`, Actions labels
269
- `self-hosted`, `macOS`, `ARM64`, `m5-pro`). macOS builds natively; Linux builds in
270
- Docker on that same M5. Keep the laptop and runner active until the workflow finishes.
271
- An offline M5 leaves jobs queued; there is no hosted fallback. Platform builds run
272
- sequentially, preserving 3 native Rust compiler jobs and 8 inside Docker. Dispatch from a ref containing this policy;
273
- older release tags may still contain the removed hosted-runner option.
155
+ MIT © [Adrij Shikhar](https://github.com/adrijshikhar). See [LICENSE](LICENSE) for details. OpenAI Codex remains separately licensed under Apache-2.0.