This repository contains a custom Home Assistant add-on that provides a lightweight browser terminal through Home Assistant ingress. The terminal includes:
npmcodexzshwithoh-my-zshtmux- persistent shell state under
/data
codex_terminal: attyd-based terminal withnpm,git, and the OpenAI Codex CLI preinstalled
The add-on stores its persistent state inside Home Assistant's add-on data volume:
HOME=/data/home- workspace:
/data/workspace
That means Codex auth, npm cache, shell history, and anything else you keep under /data survives restarts and upgrades.
The interactive terminal starts inside a persistent tmux session named workspace, so you can close the browser tab and reconnect later without losing that terminal session while the add-on remains running.
The workspace also includes writable mappings for common Home Assistant directories:
/data/workspace/homeassistant/data/workspace/share/data/workspace/addon_configs
This keeps the add-on away from the host root while still giving terminal access to the main configuration areas that Home Assistant officially supports mapping.
- Create an empty GitHub repository.
- From this directory, run:
git init
git add .
git commit -m "Initial Home Assistant Codex add-on"
git branch -M main
git remote add origin git@github.com:<your-user>/<your-repo>.git
git push -u origin mainIf you prefer HTTPS, use:
git remote add origin https://github.com/<your-user>/<your-repo>.git- In Home Assistant, open
Settings -> Add-ons -> Add-on Store. - Open the overflow menu in the top right and choose
Repositories. - Paste your GitHub repository URL and save.
- Install
Codex Terminal. - Start the add-on and open it from the sidebar.
- Run
codex loginin the terminal. Your login will persist in/data/home/.codex.
- The add-on is built from source by Home Assistant because
config.yamlintentionally omits animagefield. - The current Codex CLI package publishes Linux binaries for
amd64andaarch64, so the add-on is limited to those Home Assistant architectures. - The
zshandtmuxdefaults are adapted from the owner's dotfiles and vendored into this repository so the add-on does not need GitHub credentials at runtime.