cxstatusline 0.1.1 → 0.3.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
@@ -37,12 +37,11 @@ Independent project; not an official OpenAI product.
37
37
 
38
38
  ## Requirements
39
39
 
40
- - **macOS 14 (Sonoma) or newer** on Apple Silicon (`darwin-arm64`) or Intel (`darwin-x64`). Clean-macOS-14 acceptance is unproven and evidenced only by build metadata (`MACOSX_DEPLOYMENT_TARGET=14.0`, `vtool` `minos`, and system-only `otool -L` linkage).
40
+ - **macOS 14 (Sonoma) or newer** (Apple Silicon or Intel).
41
41
  - **Node.js 22+**.
42
- - **Stock Codex CLI install** kept in place (`~/.codex/` and original launcher).
42
+ - **Existing Codex CLI installation** kept in place (`~/.codex/`).
43
43
  - **Git**.
44
- - **Bun 1.4+** is required only for building/linking from a git checkout.
45
- - **Rust toolchain** (1.95.0+) is required only for `cxstatusline install --compile`.
44
+ - **Rust toolchain** (1.95.0+) is required only if building from source (`--compile`).
46
45
 
47
46
  ## 🚀 Install
48
47
 
@@ -54,7 +53,7 @@ cxstatusline install
54
53
  cxstatusline doctor
55
54
  ```
56
55
 
57
- `install` downloads the release matching your exact Codex version and CPU, verifies every byte against `manifest.json`, and activates it. Nothing is signed or notarized; see [Security and trust](#security-and-trust).
56
+ `install` downloads the verified prebuilt binary matching your exact Codex version and architecture, verifies checksums against `manifest.json`, and activates it.
58
57
 
59
58
  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.
60
59
 
@@ -110,14 +109,14 @@ it never opens the TUI.
110
109
  ## Update
111
110
 
112
111
  ```sh
113
- codex update
114
- # or
115
112
  cxstatusline update
116
113
  ```
117
114
 
118
- `codex update` (or `cxstatusline update`) runs Codex's upstream updater, then downloads the matching prebuilt; never compiles.
115
+ `cxstatusline update` runs a pre-flight check: if upstream Codex has a new version but prebuilts have not yet been published, it warns and stops before touching your active installation.
119
116
 
120
- If no verified prebuilt release exists for the new version, cxstatusline fails closed: the working pair is left in place and the command says so. The SessionStart hook retries daily according to update policy.
117
+ Options:
118
+ - `cxstatusline update --compile`: updates upstream Codex and compiles the statusline from source for the new version.
119
+ - `cxstatusline update --force`: updates upstream Codex to stock immediately, even if prebuilt binaries are not yet published.
121
120
 
122
121
  ## Revert
123
122
 
@@ -127,43 +126,35 @@ cxstatusline revert
127
126
 
128
127
  `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.
129
128
 
130
- ## How it works
131
-
132
- **Renderer and settings:** The statusline is powered by a Node CLI renderer that receives session metadata from Codex, formats ANSI rows according to your `settings.json`, and writes the footer.
133
-
134
- **The additive Rust patch:** Because the Codex CLI does not yet provide an external statusline hook ([openai/codex#17827](https://github.com/openai/codex/issues/17827)), cxstatusline applies a minimal additive patch to `codex-tui` and builds synchronized binaries (`codex` and companion `codex-code-mode-host`). The patch invokes the local renderer without altering Codex's networking or command evaluation.
135
-
136
- **Generations and atomic activation:** Each verified pair installs into an immutable generation directory under `~/.local/libexec/cxstatusline/generations/<id>/`. An atomic rename switches the `~/.local/libexec/cxstatusline/current` symlink. The wrapper in `~/.local/bin/codex` resolves `current` once before execution, ensuring running sessions and their companion host stay locked to the same generation. Previous generations accumulate until explicit `cxstatusline revert`.
137
-
138
- **SessionStart hook and update policy:** A hook registered in Codex's `hooks.json` checks for upstream version drift on session start. When drift is detected, a detached child process downloads the matching prebuilt release without interrupting your active terminal session.
139
-
129
+ ## 🔍 How it works
130
+
131
+ 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.
132
+
133
+ Updates use an immutable **generation-based layout** (`~/.local/libexec/cxstatusline/generations/`) with atomic symlink swaps, ensuring your active terminal sessions are never interrupted.
134
+
135
+ 👉 For a full architectural breakdown of how Codex is patched with Rust, check out the **[Architecture & Technical Deep Dive (wiki.md)](wiki.md)**.
136
+
140
137
  ## Supported versions
141
-
142
- cxstatusline matches exact stable releases. Supported versions in `patches/manifest.json`:
143
- - **0.152.1**
138
+
139
+ cxstatusline matches exact stable releases. Supported versions:
140
+ - **0.154.0**
141
+ - **0.153.4**
144
142
  - **0.153.0**
145
- - **0.153.4** (candidate)
146
-
143
+ - **0.152.1**
144
+
147
145
  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.
148
-
146
+
149
147
  ## 🩺 Troubleshooting
150
-
148
+
151
149
  - **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.
152
150
  - **Unsupported version:** Wait for an explicitly supported patch. `--force` does not bypass version compatibility. Keep a working stock Codex installation.
153
151
  - **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.
154
152
  - **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.
155
-
156
- ## Security and trust
157
-
158
- - **Unsigned and unnotarized:** cxstatusline binaries are not signed or notarized by Apple; macOS Gatekeeper warnings are expected. Do not disable Gatekeeper globally; clear the quarantine attribute for these two files only, or build from source with `install --compile`.
159
- - **Integrity vs. identity:** Checksums and manifests prove integrity relative to the GitHub release, not publisher identity.
160
- - **Archive contents:** Each prebuilt release archive contains exactly five files: `codex`, `codex-code-mode-host`, upstream `LICENSE` (Apache-2.0), upstream `NOTICE`, and `THIRD_PARTY_NOTICES.md` (combining cxstatusline notices and generated Rust dependency notices). No extra directories, files, or telemetry.
161
- - **Security policy:** See [SECURITY.md](SECURITY.md) for full trust boundaries, file layout, and vulnerability reporting.
162
-
163
- ## Contributing and license
164
-
165
- See [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and [CHANGELOG.md](CHANGELOG.md).
166
-
167
- Inspired by [ccstatusline](https://github.com/sirmalloc/ccstatusline) for Claude Code. Its renderer and configuration UI are adapted here for Codex. Thanks to its creators and contributors!
168
-
169
- cxstatusline is [MIT licensed](LICENSE). [NOTICE](NOTICE) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) preserve upstream attribution. The build includes dependency license texts in `dist/THIRD_PARTY_LICENSES.txt`. OpenAI Codex remains separately licensed under Apache-2.0.
153
+
154
+ ## 🙏 Acknowledgments
155
+
156
+ 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.
157
+
158
+ ## License
159
+
160
+ 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.