Home Assistant add-on repository for running OpenAI Codex CLI from an ingress panel.
Click the button below to add this repository to Home Assistant:
Or add it manually:
- In Home Assistant, go to Settings -> Add-ons -> Add-on Store.
- Open the three-dot menu, then Repositories.
- Add this repository URL:
https://github.com/npinter/codex-cli-ha. - Install the
Codex CLIadd-on.
- Persistent browser terminal backed by
tmux. - Codex CLI installed during the Docker build.
- Native browser image paste/drop support with a small preview panel.
- Pasted images are saved under
/tmp/codex-images-tmpand cleaned up afterInsert Path. - The terminal page inserts the saved image path with
Insert Path, or directly fromAlt+Vwhen browser clipboard access is allowed. auth.jsonupload helper for copying an existing Codex login into the add-on.- Header actions for Codex rate limits, image paste, Home Assistant YAML reload, and Home Assistant restart.
- Mobile-friendly terminal controls for text size, arrow up/down keys, and tmux-backed terminal scrollback.
- Docker build installs Codex CLI with
npm install -g @openai/codex.
Paste or drop an image anywhere on the Codex CLI panel. The add-on captures the browser paste event before xterm, saves the image inside the container, and opens a small preview panel. Press Insert Path to place the saved image path into Codex.
Alt+V / the paste icon uses the browser Clipboard API when available and then inserts the image path directly. If the browser blocks clipboard reads, use Alt+V -> Ctrl+V -> Insert Path.
The panel includes an auth.json upload helper. On a logged-in device, Codex usually stores this file at:
~/.codex/auth.json
The add-on stores the uploaded file at:
/data/home/.codex/auth.json
Uploading auth.json restarts the persistent terminal session so Codex picks up the new credentials.
The upload uses a multipart file body, with the older base64 JSON path retained as a fallback.
You can also use an API key in the add-on configuration.
Reload YAML calls Home Assistant's homeassistant.reload_all action through the Supervisor proxy. Restart HA restarts Home Assistant Core through the Supervisor API.
Codex icon source: Lobe Icons.
