cxstatusline 0.1.1
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/LICENSE +21 -0
- package/NOTICE +17 -0
- package/README.md +169 -0
- package/THIRD_PARTY_NOTICES.md +62 -0
- package/dist/THIRD_PARTY_LICENSES.txt +888 -0
- package/dist/cxstatusline.js +65110 -0
- package/package.json +51 -0
- package/patches/codex-0.152.1.patch +1482 -0
- package/patches/codex-0.153.0.patch +1482 -0
- package/patches/codex-0.153.4.patch +1482 -0
- package/patches/ink@6.2.0.patch +17 -0
- package/patches/manifest.json +10 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Adrij Shikhar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
cxstatusline
|
|
2
|
+
|
|
3
|
+
Portions of src/utils/{ansi,colors,gradient,powerline-settings,powerline-theme-index,renderer,separator-index,terminal}.ts
|
|
4
|
+
are derived from ccstatusline at commit 6a3d855b82faf75b249155dcfa1624780f89cbbd.
|
|
5
|
+
|
|
6
|
+
Portions of src/{types/RenderContext.ts,utils/widget-manifest.ts,utils/widgets.ts,widgets/}
|
|
7
|
+
are derived from ccstatusline at commit 6a3d855b82faf75b249155dcfa1624780f89cbbd.
|
|
8
|
+
|
|
9
|
+
Portions of src/tui/components/{PowerlineSetup,PowerlineSeparatorEditor,PowerlineThemeSelector,GlobalOverridesMenu}.tsx
|
|
10
|
+
are derived from ccstatusline at commit 6a3d855b82faf75b249155dcfa1624780f89cbbd.
|
|
11
|
+
|
|
12
|
+
Portions of src/tui/components/{ExportConfigDialog,ImportConfigDialog,ImportPreviewDialog}.tsx
|
|
13
|
+
are derived from ccstatusline at commit 6a3d855b82faf75b249155dcfa1624780f89cbbd.
|
|
14
|
+
|
|
15
|
+
Copyright (c) 2025 Matthew Breedlove (https://github.com/sirmalloc)
|
|
16
|
+
Original repository: https://github.com/sirmalloc/ccstatusline
|
|
17
|
+
Licensed under the MIT License.
|
package/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/banner-dark.png">
|
|
5
|
+
<img alt="cxstatusline" src="docs/banner-light.png" width="720">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
# cxstatusline
|
|
9
|
+
|
|
10
|
+
**⚡ Your Codex session, at a glance.**
|
|
11
|
+
|
|
12
|
+
*Model, context, Git, usage, and reset timers. Your terminal, your layout.*
|
|
13
|
+
|
|
14
|
+
[](https://github.com/adrijshikhar/cxstatusline/actions/workflows/ci.yml)
|
|
15
|
+
[](LICENSE)
|
|
16
|
+
[](https://nodejs.org/)
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
## ✨ Features
|
|
23
|
+
|
|
24
|
+
A configurable, one-to-three-row statusline for [OpenAI Codex CLI](https://github.com/openai/codex),
|
|
25
|
+
with an interactive configuration TUI, colors, Powerline themes and preset import/export.
|
|
26
|
+
See model, context, Git, session duration, usage percentages and reset times without leaving Codex.
|
|
27
|
+
Available data depends on your session and account.
|
|
28
|
+
|
|
29
|
+
Independent project; not an official OpenAI product.
|
|
30
|
+
|
|
31
|
+
<details>
|
|
32
|
+
<summary>See the footer inside Codex</summary>
|
|
33
|
+
|
|
34
|
+

|
|
35
|
+
|
|
36
|
+
</details>
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
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).
|
|
41
|
+
- **Node.js 22+**.
|
|
42
|
+
- **Stock Codex CLI install** kept in place (`~/.codex/` and original launcher).
|
|
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`.
|
|
46
|
+
|
|
47
|
+
## 🚀 Install
|
|
48
|
+
|
|
49
|
+
Install globally with npm:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
npm install -g cxstatusline
|
|
53
|
+
cxstatusline install
|
|
54
|
+
cxstatusline doctor
|
|
55
|
+
```
|
|
56
|
+
|
|
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).
|
|
58
|
+
|
|
59
|
+
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
|
+
|
|
61
|
+
<details>
|
|
62
|
+
<summary>Install from git checkout</summary>
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
git clone https://github.com/adrijshikhar/cxstatusline.git
|
|
66
|
+
cd cxstatusline
|
|
67
|
+
bun install --frozen-lockfile
|
|
68
|
+
bun run link:local
|
|
69
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
70
|
+
cxstatusline install
|
|
71
|
+
cxstatusline doctor
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
</details>
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary>Build from source instead</summary>
|
|
78
|
+
|
|
79
|
+
If you prefer to compile the patched Codex binaries locally from source:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
rustup toolchain install 1.95.0 --component clippy --component rustfmt --component rust-src
|
|
83
|
+
git clone https://github.com/adrijshikhar/cxstatusline.git
|
|
84
|
+
cd cxstatusline
|
|
85
|
+
bun install --frozen-lockfile
|
|
86
|
+
bun run link:local
|
|
87
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
88
|
+
cxstatusline install --compile
|
|
89
|
+
cxstatusline doctor
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`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.
|
|
93
|
+
|
|
94
|
+
</details>
|
|
95
|
+
|
|
96
|
+
## 🎛️ Configure
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
cxstatusline
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The bare command opens the configuration TUI in an interactive terminal. Choose widgets, colors
|
|
103
|
+
and themes, preview, then save explicitly or press Ctrl+S. Settings live at
|
|
104
|
+
`~/.config/cxstatusline/settings.json` (or your XDG config location).
|
|
105
|
+
Custom command/weather widgets and unsupported Claude-only widgets are not included.
|
|
106
|
+
|
|
107
|
+
For scripts, `cxstatusline render` reads a versioned JSON payload on stdin and prints ANSI rows;
|
|
108
|
+
it never opens the TUI.
|
|
109
|
+
|
|
110
|
+
## Update
|
|
111
|
+
|
|
112
|
+
```sh
|
|
113
|
+
codex update
|
|
114
|
+
# or
|
|
115
|
+
cxstatusline update
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`codex update` (or `cxstatusline update`) runs Codex's upstream updater, then downloads the matching prebuilt; never compiles.
|
|
119
|
+
|
|
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.
|
|
121
|
+
|
|
122
|
+
## Revert
|
|
123
|
+
|
|
124
|
+
```sh
|
|
125
|
+
cxstatusline revert
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`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
|
+
|
|
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
|
+
|
|
140
|
+
## Supported versions
|
|
141
|
+
|
|
142
|
+
cxstatusline matches exact stable releases. Supported versions in `patches/manifest.json`:
|
|
143
|
+
- **0.152.1**
|
|
144
|
+
- **0.153.0**
|
|
145
|
+
- **0.153.4** (candidate)
|
|
146
|
+
|
|
147
|
+
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
|
+
|
|
149
|
+
## 🩺 Troubleshooting
|
|
150
|
+
|
|
151
|
+
- **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
|
+
- **Unsupported version:** Wait for an explicitly supported patch. `--force` does not bypass version compatibility. Keep a working stock Codex installation.
|
|
153
|
+
- **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
|
+
- **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.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
## ccstatusline-derived artifact provenance
|
|
4
|
+
|
|
5
|
+
The Ink patch and selected renderer/configuration components are adapted from
|
|
6
|
+
[`sirmalloc/ccstatusline`](https://github.com/sirmalloc/ccstatusline), pinned to upstream commit
|
|
7
|
+
`6a3d855b82faf75b249155dcfa1624780f89cbbd`.
|
|
8
|
+
|
|
9
|
+
Included patch:
|
|
10
|
+
|
|
11
|
+
- `patches/ink@6.2.0.patch` — the Ink macOS backspace fix, copied byte-for-byte from that pinned
|
|
12
|
+
upstream checkout.
|
|
13
|
+
|
|
14
|
+
The settings, rendering, widget, and configuration TUI ports derive selected behavior from
|
|
15
|
+
`src/types/`, `src/utils/`, `src/widgets/`, and `src/tui/` at that pinned commit. In particular,
|
|
16
|
+
`src/tui/{App,index}.tsx` and `src/tui/components/` retain the Ink navigation, picker, color,
|
|
17
|
+
override, confirmation, and preview behavior adapted for the closed Codex widget catalog.
|
|
18
|
+
The Powerline setup, separator/cap editor, theme selector, and gradient override controls are
|
|
19
|
+
adapted from the same pinned source.
|
|
20
|
+
The export/import path dialogs and import-preview interaction are adapted from the same source;
|
|
21
|
+
cxstatusline's strict mapping and confirmation-only save policy are local adaptations.
|
|
22
|
+
Claude-specific integrations, font installation, update flows, external-browser actions, and
|
|
23
|
+
excluded widgets are not copied.
|
|
24
|
+
|
|
25
|
+
## Bundled dependencies and Codex
|
|
26
|
+
|
|
27
|
+
`bun run build` generates `dist/THIRD_PARTY_LICENSES.txt` from the bundle's actual
|
|
28
|
+
dependency inputs. This file is included in the npm tarball alongside these notices.
|
|
29
|
+
It preserves dependency license and notice files, including notices within distributed
|
|
30
|
+
dependency bundles. Review this inventory when updating dependencies.
|
|
31
|
+
|
|
32
|
+
OpenAI Codex is separately licensed under Apache-2.0. The current source installer
|
|
33
|
+
fetches its source and builds it locally; the npm package does not contain Codex binaries.
|
|
34
|
+
Native prebuilt distribution requires its own upstream and dependency license audit.
|
|
35
|
+
|
|
36
|
+
## ccstatusline license
|
|
37
|
+
|
|
38
|
+
Copyright (c) 2025 Matthew Breedlove (https://github.com/sirmalloc)
|
|
39
|
+
|
|
40
|
+
The upstream code is available under the following MIT License:
|
|
41
|
+
|
|
42
|
+
MIT License
|
|
43
|
+
|
|
44
|
+
Copyright (c) 2025 Matthew Breedlove (https://github.com/sirmalloc)
|
|
45
|
+
|
|
46
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
47
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
48
|
+
in the Software without restriction, including without limitation the rights
|
|
49
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
50
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
51
|
+
furnished to do so, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
The above copyright notice and this permission notice shall be included in all
|
|
54
|
+
copies or substantial portions of the Software.
|
|
55
|
+
|
|
56
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
57
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
58
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
59
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
60
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
61
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
62
|
+
SOFTWARE.
|