@jiawang1209/codex-hud 0.1.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/.codex-plugin/plugin.json +41 -0
- package/CHANGELOG.md +9 -0
- package/LICENSE +21 -0
- package/README.md +342 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +206 -0
- package/dist/cli.js.map +1 -0
- package/dist/codex-statusline.d.ts +9 -0
- package/dist/codex-statusline.js +96 -0
- package/dist/codex-statusline.js.map +1 -0
- package/dist/config.d.ts +62 -0
- package/dist/config.js +199 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/installer.d.ts +17 -0
- package/dist/installer.js +125 -0
- package/dist/installer.js.map +1 -0
- package/dist/native-runner.d.ts +28 -0
- package/dist/native-runner.js +122 -0
- package/dist/native-runner.js.map +1 -0
- package/dist/render.d.ts +11 -0
- package/dist/render.js +149 -0
- package/dist/render.js.map +1 -0
- package/dist/snapshot.d.ts +12 -0
- package/dist/snapshot.js +32 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/sources/codex.d.ts +50 -0
- package/dist/sources/codex.js +182 -0
- package/dist/sources/codex.js.map +1 -0
- package/dist/sources/git.d.ts +2 -0
- package/dist/sources/git.js +37 -0
- package/dist/sources/git.js.map +1 -0
- package/dist/sources/session.d.ts +14 -0
- package/dist/sources/session.js +278 -0
- package/dist/sources/session.js.map +1 -0
- package/dist/tmux-runner.d.ts +26 -0
- package/dist/tmux-runner.js +203 -0
- package/dist/tmux-runner.js.map +1 -0
- package/dist/types.d.ts +42 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/docs/installation.md +42 -0
- package/docs/native-codex-cli-patch.md +55 -0
- package/docs/plugin-marketplace.md +42 -0
- package/docs/release.md +35 -0
- package/docs/superpowers/plans/2026-05-23-codex-hud-mvp.md +234 -0
- package/docs/superpowers/plans/2026-05-23-productized-native-bundle.md +431 -0
- package/docs/superpowers/specs/2026-05-23-codex-hud-design.md +197 -0
- package/docs/upstream/codex-command-backed-statusline.md +101 -0
- package/package.json +49 -0
- package/patches/codex-cli-command-statusline.patch +459 -0
- package/plugins/codex-hud/.codex-plugin/plugin.json +41 -0
- package/plugins/codex-hud/skills/codex-hud/SKILL.md +153 -0
- package/skills/codex-hud/SKILL.md +153 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codex-hud
|
|
3
|
+
description: Use when the user wants to inspect, configure, or run Codex HUD for Codex CLI terminal telemetry.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codex HUD
|
|
7
|
+
|
|
8
|
+
Codex HUD is a terminal HUD for Codex CLI sessions. It is currently packaged as a standalone CLI plus this Codex plugin wrapper.
|
|
9
|
+
|
|
10
|
+
## Commands
|
|
11
|
+
|
|
12
|
+
From the repository root:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install
|
|
16
|
+
npm run build
|
|
17
|
+
node dist/index.js status
|
|
18
|
+
node dist/index.js run
|
|
19
|
+
node dist/index.js setup
|
|
20
|
+
node dist/index.js doctor
|
|
21
|
+
node dist/index.js config
|
|
22
|
+
node dist/index.js config init
|
|
23
|
+
node dist/index.js watch
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
After package installation, use:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
codex-hud status
|
|
30
|
+
codex-hud run
|
|
31
|
+
codex-hud native
|
|
32
|
+
codex-hud install-shim
|
|
33
|
+
codex-hud uninstall-shim
|
|
34
|
+
codex-hud setup
|
|
35
|
+
codex-hud doctor
|
|
36
|
+
codex-hud config
|
|
37
|
+
codex-hud config init
|
|
38
|
+
codex-hud watch
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Default `codex-hud status` output uses the expanded HUD style:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
[gpt-5.5 medium] │ codex-hud git:(main*)
|
|
45
|
+
Context ████░░░░░░ 42% │ Usage ███████░░░ 68% (3h 24m / 5h) │ Weekly █████████░ 86%
|
|
46
|
+
Todos 2/5 │ Exec active, Plan x2
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Configuration
|
|
50
|
+
|
|
51
|
+
Codex HUD uses `~/.codex-hud/config.json`. Users can customize display order, visibility, git details, and Claude HUD-like colors:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"language": "zh",
|
|
56
|
+
"lineLayout": "expanded",
|
|
57
|
+
"pathLevels": 2,
|
|
58
|
+
"elementOrder": ["model", "project", "context", "usage", "weekly", "tools", "todos"],
|
|
59
|
+
"gitStatus": {
|
|
60
|
+
"enabled": true,
|
|
61
|
+
"showDirty": true,
|
|
62
|
+
"showAheadBehind": true,
|
|
63
|
+
"showFileStats": false
|
|
64
|
+
},
|
|
65
|
+
"display": {
|
|
66
|
+
"showModel": true,
|
|
67
|
+
"showProject": true,
|
|
68
|
+
"showGit": true,
|
|
69
|
+
"showContext": true,
|
|
70
|
+
"showUsage": true,
|
|
71
|
+
"showWeekly": true,
|
|
72
|
+
"showTools": true,
|
|
73
|
+
"showTodos": true
|
|
74
|
+
},
|
|
75
|
+
"colors": {
|
|
76
|
+
"model": "magenta",
|
|
77
|
+
"project": "cyan",
|
|
78
|
+
"git": "magenta",
|
|
79
|
+
"gitBranch": "cyan",
|
|
80
|
+
"context": "yellow",
|
|
81
|
+
"usage": "magenta",
|
|
82
|
+
"weekly": "magenta",
|
|
83
|
+
"label": "dim",
|
|
84
|
+
"custom": "#FF6600"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Use `codex-hud config init` to create the default config. Existing legacy keys such as `layout`, `display.usage`, and `display.tools` remain supported.
|
|
90
|
+
|
|
91
|
+
Use `codex-hud run` to launch Codex in a tmux session with a persistent HUD pane:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
codex-hud run
|
|
95
|
+
codex-hud run -- --model gpt-5.5 --sandbox danger-full-access
|
|
96
|
+
codex-hud run --session my-work --height 5
|
|
97
|
+
codex-hud run --terminal iterm
|
|
98
|
+
codex-hud run --terminal terminal
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`codex-hud pane` is the internal refresh command used by the HUD pane/window. `--terminal tmux` is the portable default; `--terminal iterm` uses iTerm2 split panes; `--terminal terminal` uses macOS Terminal.app sessions.
|
|
102
|
+
|
|
103
|
+
## Auto-Launch Model
|
|
104
|
+
|
|
105
|
+
Use `codex-hud install-shim` when the user wants `codex` itself to open with Codex HUD automatically:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
codex-hud install-shim --codex /path/to/patched/codex
|
|
109
|
+
codex
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The shim writes a reversible wrapper at `~/.local/bin/codex`:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
codex-hud native --codex /path/to/patched/codex -- "$@"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`codex-hud native` launches the patched Codex binary with command-backed status-line config:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
-c 'tui.status_line=["command: codex-hud status"]'
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Remove the wrapper with:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
codex-hud uninstall-shim
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
This requires `~/.local/bin` to appear before the official Codex binary in `PATH`. The shim refuses to overwrite a non-Codex-HUD `codex` file in that directory.
|
|
131
|
+
|
|
132
|
+
## Current Integration Model
|
|
133
|
+
|
|
134
|
+
Run `codex-hud setup` to configure Codex CLI's native in-window status line in `~/.codex/config.toml`. This uses Codex's supported `[tui].status_line` built-in items:
|
|
135
|
+
|
|
136
|
+
- `model-with-reasoning`
|
|
137
|
+
- `task-progress`
|
|
138
|
+
- `current-dir`
|
|
139
|
+
- `git-branch`
|
|
140
|
+
- `context-used`
|
|
141
|
+
- `five-hour-limit`
|
|
142
|
+
- `weekly-limit`
|
|
143
|
+
- `fast-mode`
|
|
144
|
+
|
|
145
|
+
Restart Codex CLI after setup. Users can run `/statusline` inside Codex to inspect or reorder these items.
|
|
146
|
+
|
|
147
|
+
Claude HUD uses Claude Code's command-backed `statusLine` API. Codex CLI 0.131.0 does not currently expose an equivalent arbitrary command provider, so the richer `codex-hud status/watch` renderer remains the stable CLI core and future native integration point.
|
|
148
|
+
|
|
149
|
+
The upstream command-backed status-line proposal is documented in `docs/upstream/codex-command-backed-statusline.md`.
|
|
150
|
+
|
|
151
|
+
## Safety
|
|
152
|
+
|
|
153
|
+
Codex HUD reads local configuration, git metadata, and environment signals. It should not upload data or parse private transcript message bodies for the MVP.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codex-hud
|
|
3
|
+
description: Use when the user wants to inspect, configure, or run Codex HUD for Codex CLI terminal telemetry.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Codex HUD
|
|
7
|
+
|
|
8
|
+
Codex HUD is a terminal HUD for Codex CLI sessions. It is currently packaged as a standalone CLI plus this Codex plugin wrapper.
|
|
9
|
+
|
|
10
|
+
## Commands
|
|
11
|
+
|
|
12
|
+
From the repository root:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install
|
|
16
|
+
npm run build
|
|
17
|
+
node dist/index.js status
|
|
18
|
+
node dist/index.js run
|
|
19
|
+
node dist/index.js setup
|
|
20
|
+
node dist/index.js doctor
|
|
21
|
+
node dist/index.js config
|
|
22
|
+
node dist/index.js config init
|
|
23
|
+
node dist/index.js watch
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
After package installation, use:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
codex-hud status
|
|
30
|
+
codex-hud run
|
|
31
|
+
codex-hud native
|
|
32
|
+
codex-hud install-shim
|
|
33
|
+
codex-hud uninstall-shim
|
|
34
|
+
codex-hud setup
|
|
35
|
+
codex-hud doctor
|
|
36
|
+
codex-hud config
|
|
37
|
+
codex-hud config init
|
|
38
|
+
codex-hud watch
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Default `codex-hud status` output uses the expanded HUD style:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
[gpt-5.5 medium] │ codex-hud git:(main*)
|
|
45
|
+
Context ████░░░░░░ 42% │ Usage ███████░░░ 68% (3h 24m / 5h) │ Weekly █████████░ 86%
|
|
46
|
+
Todos 2/5 │ Exec active, Plan x2
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Configuration
|
|
50
|
+
|
|
51
|
+
Codex HUD uses `~/.codex-hud/config.json`. Users can customize display order, visibility, git details, and Claude HUD-like colors:
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"language": "zh",
|
|
56
|
+
"lineLayout": "expanded",
|
|
57
|
+
"pathLevels": 2,
|
|
58
|
+
"elementOrder": ["model", "project", "context", "usage", "weekly", "tools", "todos"],
|
|
59
|
+
"gitStatus": {
|
|
60
|
+
"enabled": true,
|
|
61
|
+
"showDirty": true,
|
|
62
|
+
"showAheadBehind": true,
|
|
63
|
+
"showFileStats": false
|
|
64
|
+
},
|
|
65
|
+
"display": {
|
|
66
|
+
"showModel": true,
|
|
67
|
+
"showProject": true,
|
|
68
|
+
"showGit": true,
|
|
69
|
+
"showContext": true,
|
|
70
|
+
"showUsage": true,
|
|
71
|
+
"showWeekly": true,
|
|
72
|
+
"showTools": true,
|
|
73
|
+
"showTodos": true
|
|
74
|
+
},
|
|
75
|
+
"colors": {
|
|
76
|
+
"model": "magenta",
|
|
77
|
+
"project": "cyan",
|
|
78
|
+
"git": "magenta",
|
|
79
|
+
"gitBranch": "cyan",
|
|
80
|
+
"context": "yellow",
|
|
81
|
+
"usage": "magenta",
|
|
82
|
+
"weekly": "magenta",
|
|
83
|
+
"label": "dim",
|
|
84
|
+
"custom": "#FF6600"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Use `codex-hud config init` to create the default config. Existing legacy keys such as `layout`, `display.usage`, and `display.tools` remain supported.
|
|
90
|
+
|
|
91
|
+
Use `codex-hud run` to launch Codex in a tmux session with a persistent HUD pane:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
codex-hud run
|
|
95
|
+
codex-hud run -- --model gpt-5.5 --sandbox danger-full-access
|
|
96
|
+
codex-hud run --session my-work --height 5
|
|
97
|
+
codex-hud run --terminal iterm
|
|
98
|
+
codex-hud run --terminal terminal
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`codex-hud pane` is the internal refresh command used by the HUD pane/window. `--terminal tmux` is the portable default; `--terminal iterm` uses iTerm2 split panes; `--terminal terminal` uses macOS Terminal.app sessions.
|
|
102
|
+
|
|
103
|
+
## Auto-Launch Model
|
|
104
|
+
|
|
105
|
+
Use `codex-hud install-shim` when the user wants `codex` itself to open with Codex HUD automatically:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
codex-hud install-shim --codex /path/to/patched/codex
|
|
109
|
+
codex
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The shim writes a reversible wrapper at `~/.local/bin/codex`:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
codex-hud native --codex /path/to/patched/codex -- "$@"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`codex-hud native` launches the patched Codex binary with command-backed status-line config:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
-c 'tui.status_line=["command: codex-hud status"]'
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Remove the wrapper with:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
codex-hud uninstall-shim
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
This requires `~/.local/bin` to appear before the official Codex binary in `PATH`. The shim refuses to overwrite a non-Codex-HUD `codex` file in that directory.
|
|
131
|
+
|
|
132
|
+
## Current Integration Model
|
|
133
|
+
|
|
134
|
+
Run `codex-hud setup` to configure Codex CLI's native in-window status line in `~/.codex/config.toml`. This uses Codex's supported `[tui].status_line` built-in items:
|
|
135
|
+
|
|
136
|
+
- `model-with-reasoning`
|
|
137
|
+
- `task-progress`
|
|
138
|
+
- `current-dir`
|
|
139
|
+
- `git-branch`
|
|
140
|
+
- `context-used`
|
|
141
|
+
- `five-hour-limit`
|
|
142
|
+
- `weekly-limit`
|
|
143
|
+
- `fast-mode`
|
|
144
|
+
|
|
145
|
+
Restart Codex CLI after setup. Users can run `/statusline` inside Codex to inspect or reorder these items.
|
|
146
|
+
|
|
147
|
+
Claude HUD uses Claude Code's command-backed `statusLine` API. Codex CLI 0.131.0 does not currently expose an equivalent arbitrary command provider, so the richer `codex-hud status/watch` renderer remains the stable CLI core and future native integration point.
|
|
148
|
+
|
|
149
|
+
The upstream command-backed status-line proposal is documented in `docs/upstream/codex-command-backed-statusline.md`.
|
|
150
|
+
|
|
151
|
+
## Safety
|
|
152
|
+
|
|
153
|
+
Codex HUD reads local configuration, git metadata, and environment signals. It should not upload data or parse private transcript message bodies for the MVP.
|