---
slug: "pi-codex-footer"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/glnarayanan/pi-codex-footer@main/README.md"
repo: "https://github.com/glnarayanan/pi-codex-footer"
source_file: "README.md"
branch: "main"
---
# pi-codex-footer

A Pi extension that replaces the default footer with a **2-line Codex status footer**:
- session/context/cost info
- live OpenAI Codex 5h + 7d quota usage and reset timers

---

## Install (npm)

```bash
pi install npm:pi-codex-footer
/reload
```

That’s it.

---

## What you’ll see

### Line 1
- current folder
- git branch
- provider + model
- thinking level
- context usage (`used/window`)
- total session cost

### Line 2
- tokens/sec for last assistant response
- Codex 5h usage
- Codex 7d usage
- 5h reset countdown
- 7d reset countdown

> Live quota fields appear when your active provider is `openai-codex`.

---

## Commands

- `/codex-footer-on` — enable footer (reloads Pi)
- `/codex-footer-off` — restore Pi default footer
- `/codex-footer-status` — show Codex quota/auth status

---

## Troubleshooting

If quota shows `n/a`:
1. Make sure your model provider is `openai-codex`
2. Run `/codex-footer-status`
3. If auth is expired/missing, re-authenticate in Pi and `/reload`

Quota refreshes about once per minute, while countdown timers update every second.

---

## Privacy & security

This extension **does not bundle or store secrets** in the package.

At runtime, it reads your existing Pi OAuth credentials from:

- `~/.pi/agent/auth.json`

and calls:

- `https://chatgpt.com/backend-api/codex/usage`

It does **not** write tokens to your repo or print raw tokens in the UI.

---

## Other install options

### Local folder
```bash
pi install ./pi-codex-footer
/reload
```

### Git
```bash
pi install git:github.com/glnarayanan/pi-codex-footer
/reload
```

---

## For maintainers

Publish a new release:

```bash
npm version patch
npm publish --access public
```

Then users can update with:

```bash
pi install npm:pi-codex-footer@latest
/reload
```
