pi-codex-footer 0.1.0 → 0.2.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 +62 -64
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,108 +1,106 @@
|
|
|
1
1
|
# pi-codex-footer
|
|
2
2
|
|
|
3
|
-
A
|
|
3
|
+
A Pi extension that replaces the default footer with a **2-line Codex status footer**:
|
|
4
|
+
- session/context/cost info
|
|
5
|
+
- live OpenAI Codex 5h + 7d quota usage and reset timers
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
---
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
- current folder
|
|
9
|
-
- git branch
|
|
10
|
-
- provider + model
|
|
11
|
-
- thinking level
|
|
12
|
-
- context usage as `used/window`
|
|
13
|
-
- total session cost
|
|
9
|
+
## Install (npm)
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- real 5h reset countdown
|
|
20
|
-
- real 7d reset countdown
|
|
11
|
+
```bash
|
|
12
|
+
pi install npm:pi-codex-footer
|
|
13
|
+
/reload
|
|
14
|
+
```
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
That’s it.
|
|
23
17
|
|
|
24
|
-
|
|
18
|
+
---
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
## What you’ll see
|
|
27
21
|
|
|
28
|
-
|
|
22
|
+
### Line 1
|
|
23
|
+
- current folder
|
|
24
|
+
- git branch
|
|
25
|
+
- provider + model
|
|
26
|
+
- thinking level
|
|
27
|
+
- context usage (`used/window`)
|
|
28
|
+
- total session cost
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
### Line 2
|
|
31
|
+
- tokens/sec for last assistant response
|
|
32
|
+
- Codex 5h usage
|
|
33
|
+
- Codex 7d usage
|
|
34
|
+
- 5h reset countdown
|
|
35
|
+
- 7d reset countdown
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
> Live quota fields appear when your active provider is `openai-codex`.
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
---
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
- write your token into the package
|
|
38
|
-
- store your token in the repo
|
|
39
|
-
- print your token in UI output
|
|
40
|
-
- require manual config edits
|
|
41
|
+
## Commands
|
|
41
42
|
|
|
42
|
-
|
|
43
|
+
- `/codex-footer-on` — enable footer (reloads Pi)
|
|
44
|
+
- `/codex-footer-off` — restore Pi default footer
|
|
45
|
+
- `/codex-footer-status` — show Codex quota/auth status
|
|
43
46
|
|
|
44
|
-
|
|
47
|
+
---
|
|
45
48
|
|
|
46
|
-
|
|
47
|
-
pi install ./pi-codex-footer
|
|
48
|
-
```
|
|
49
|
+
## Troubleshooting
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
If quota shows `n/a`:
|
|
52
|
+
1. Make sure your model provider is `openai-codex`
|
|
53
|
+
2. Run `/codex-footer-status`
|
|
54
|
+
3. If auth is expired/missing, re-authenticate in Pi and `/reload`
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
pi install npm:pi-codex-footer
|
|
54
|
-
```
|
|
56
|
+
Quota refreshes about once per minute, while countdown timers update every second.
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
---
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
pi install git:github.com/glnarayanan/pi-codex-footer
|
|
60
|
-
```
|
|
60
|
+
## Privacy & security
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
This extension **does not bundle or store secrets** in the package.
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
/reload
|
|
66
|
-
```
|
|
64
|
+
At runtime, it reads your existing Pi OAuth credentials from:
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
- `~/.pi/agent/auth.json`
|
|
69
67
|
|
|
70
|
-
|
|
71
|
-
- `/codex-footer-off` — restore Pi's default footer
|
|
72
|
-
- `/codex-footer-status` — show whether live Codex quota data is available
|
|
68
|
+
and calls:
|
|
73
69
|
|
|
74
|
-
|
|
70
|
+
- `https://chatgpt.com/backend-api/codex/usage`
|
|
75
71
|
|
|
76
|
-
|
|
77
|
-
- If the active provider is something else, quota fields show `n/a`.
|
|
78
|
-
- Quota data refreshes roughly once per minute.
|
|
79
|
-
- Reset countdowns update every second.
|
|
72
|
+
It does **not** write tokens to your repo or print raw tokens in the UI.
|
|
80
73
|
|
|
81
|
-
|
|
74
|
+
---
|
|
82
75
|
|
|
83
|
-
|
|
76
|
+
## Other install options
|
|
84
77
|
|
|
78
|
+
### Local folder
|
|
85
79
|
```bash
|
|
86
80
|
pi install ./pi-codex-footer
|
|
81
|
+
/reload
|
|
87
82
|
```
|
|
88
83
|
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
### Git
|
|
91
85
|
```bash
|
|
92
|
-
pi
|
|
86
|
+
pi install git:github.com/glnarayanan/pi-codex-footer
|
|
87
|
+
/reload
|
|
93
88
|
```
|
|
94
89
|
|
|
95
|
-
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## For maintainers
|
|
93
|
+
|
|
94
|
+
Publish a new release:
|
|
96
95
|
|
|
97
96
|
```bash
|
|
98
|
-
|
|
97
|
+
npm version patch
|
|
99
98
|
npm publish --access public
|
|
100
99
|
```
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
Push this folder to a repo, then install with:
|
|
101
|
+
Then users can update with:
|
|
105
102
|
|
|
106
103
|
```bash
|
|
107
|
-
pi install
|
|
104
|
+
pi install npm:pi-codex-footer@latest
|
|
105
|
+
/reload
|
|
108
106
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-codex-footer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Pi extension that adds a 2-line footer with live OpenAI Codex 5h/7d quota usage and reset timers.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "glnarayanan",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "echo 'nothing to build'",
|
|
41
|
-
"check": "echo 'load in pi with pi -e ./extensions/index.ts or pi install ./pi-codex-footer'"
|
|
41
|
+
"check": "echo 'load in pi with pi -e ./extensions/index.ts or pi install ./pi-codex-footer'",
|
|
42
|
+
"release": "bash publish.sh"
|
|
42
43
|
}
|
|
43
44
|
}
|