Codex for Firefox
by showhoo
README.md
<p align="center"><img src="assets/logo.svg" width="112" alt="Codex for Firefox"></p>
<h1 align="center">Codex for Firefox</h1>
<p align="center"><a href="https://isot.si"><b>isot.si</b></a> · <a href="https://www.npmjs.com/package/codex-for-firefox">npm</a></p>
> Other languages: [Français](README.fr.md) · [Español](README.es.md) · [Português (Brasil)](README.pt-BR.md) · [Русский](README.ru.md) · [中文(简体)](README.zh-CN.md)
Connect AI coding agents — Codex, OpenCode, Claude Code, Qoder, WorkBuddy, ZCode, or any MCP client — to **your real Firefox**: your logins, your tabs. Agents can search pages, navigate, fill forms, use the keyboard, take screenshots, and reuse repeated operations with local action memory.
> **Not affiliated with, endorsed by, or produced by OpenAI, Mozilla, or the OpenCode project**. "Codex" and "Firefox" are used solely to indicate compatibility.
## How it works
Three local components, no cloud required:
1. **Firefox extension** (this repository) — profiles, session lifecycle, upload confirmations.
2. **Native messaging host** — a local process the extension talks to.
3. **MCP server / plugins** — exposes four compact tools to your agent: `browser_run`, `browser_observe`, `browser_session`, `browser_finalize`.
On Firefox (and LibreWolf), page automation runs through the browser's WebDriver BiDi Remote Agent, bound to loopback. Tabs an agent opens stay in a dedicated tab group so you can review what happened. Chromium browsers are also supported when the extension is loaded with explicit IDs, but this fork ships Firefox builds only.
## Supported clients
Besides Codex, OpenCode, and Claude Code, this fork natively supports **Qoder, WorkBuddy, and ZCode** — all via standard MCP (registering an MCP server that exposes the four `browser_run` tools and so on), isomorphic to the Claude family:
| Client | Config file | Integration |
|---|---|---|
| Codex | `~/.codex/config.toml` | TOML `mcp_servers` |
| OpenCode | `~/.config/opencode/opencode.json` | `plugins` / `mcp` |
| Claude Code / Desktop | `~/.claude.json` etc. | `mcpServers` |
| Qoder | `~/.qoder/mcp.json` | `mcpServers` (override with `QODER_CONFIG_DIR`) |
| WorkBuddy | `~/.workbuddy/mcp.json` | `mcpServers` |
| ZCode | `~/.zcode/cli/config.json` | `mcp.servers` (with `type:"stdio"`, override with `ZCODE_CONFIG_DIR`) |
`setup --all` wires up detected clients; if a client's CLI isn't installed or its config file doesn't exist yet (e.g. first use of Qoder), specify them explicitly with `--targets`:
```sh
bun src/cli/index.ts setup --targets qoder,workbuddy,zcode
```
Harness icons are original neutral placeholder graphics used solely to indicate compatibility; trademarks belong to their respective owners, see [NOTICE](extension-src/public/images/harness/NOTICE.md).
## UI features
The popup has been fully redesigned, ready out of the box:
- **Light / dark dual theme**: light by default, automatically switches to dark following the system; all colors are semantic tokens.
- **Interface language selector**: 中文(简体), English, Français, Español, Português (Brasil), Русский — auto-follows the browser language by default; switch and persist under "Language" in the popup settings; takes effect across the popup, welcome page, and upload confirmation page.
- **Session management**: browser profile selection, session lifecycle, and upload confirmations on one screen; tabs opened by agents are collected in a dedicated tab group you can review or close at any time.
- **Action memory**: save repeated operations as local actions and replay them with one click.
- **Settings menu**: grouped card layout covering interface language, refresh, connection diagnostics, storage management, and more.
## Requirements
- Firefox **142+** (or LibreWolf exposing the Remote Agent)
- Node.js 24+ or Bun 1.1+ for the native host and CLI
## Install
```sh
npx -y codex-for-firefox@latest setup --all
```
This registers the `com.codex.browser.plugin` native-messaging host for Firefox and LibreWolf, then wires up every agent harness it detects. Use `--targets` to pick explicitly, or `--dry-run --json` to preview.
Then load the Firefox build and restart your coding agent:
- `dist-extension/codex-for-firefox-*-firefox.xpi` from a checkout, or
- `about:debugging` → Load Temporary Add-on → `dist/extension-firefox/manifest.json`
Pick the browser profile shown in the extension panel. Project home: **[isot.si](https://isot.si)**.
## Install from a checkout
```sh
git clone https://github.com/showhoo/codex-for-firefox
cd codex-for-firefox
bun install --frozen-lockfile --ignore-scripts
bun run zip:extension:firefox # builds the Firefox extension + zip
bun run install:native-host # registers com.codex.browser.plugin
bun src/cli/index.ts setup --all # wires up detected agent harnesses
```
Load the built extension in Firefox (about:debugging → Load Temporary Add-on, or a Developer Edition install), then restart your coding agent and pick the browser profile shown in the extension panel.
## Firefox agent setup
Firefox must expose its Remote Agent on loopback. Use a dedicated automation profile:
```sh
bun src/cli/index.ts firefox configure --profile PROFILE_ID --port 9223
"C:\Program Files\Mozilla Firefox\firefox.exe" --remote-debugging-port 9223 -P AUTOMATION_PROFILE
bun src/cli/index.ts firefox status --profile PROFILE_ID
```
Keep the debugging port bound to loopback; other local programs can reach an enabled Remote Agent, so a dedicated profile is recommended. To turn it off, fully exit the browser and relaunch without the flag. Details: [docs/firefox.md](docs/firefox.md), [docs/codex.md](docs/codex.md).
## Security and privacy
Local-first by design: no telemetry, no accounts, no phoning home. Cloud decision assistance (TypeSafe/OpenRouter, your own API key) is off by default; screenshot sharing needs a separate opt-in. Page content an agent reads goes to that agent's model provider — that is what a browser-automation bridge does. Full policy: [docs/PRIVACY.md](docs/PRIVACY.md).
## Development
```sh
bun install --frozen-lockfile --ignore-scripts
bun run build:extension:firefox # WXT build (-b firefox --mv3)
bun run check:firefox # manifest/zip safety gate
node scripts/generate-icons.mjs --design E --out extension-src/public/images # regenerate icons (current design: E "prism-spark")
bun test # full suite
```
Both browser targets share the WXT/React source in `extension-src/`; the dual-theme, six-language UI lives in `extension-src/entrypoints/popup/` (WXT/React) and `extension-src/i18n.ts`. Architecture notes: [docs/](docs/).
Bugs and questions: [Issues](https://github.com/showhoo/codex-for-firefox/issues).
## License and attribution
Copyright (c) 2026 [ISOT.SI](https://isot.si) (Codex for Firefox). This fork retains and respects the upstream copyright of Quindart's `opencode-chromium` (MIT). Harness icons in `extension-src/public/images/harness/` identify compatible third-party products and remain the trademarks of their owners (see their [NOTICE](extension-src/public/images/harness/NOTICE.md)).
## Sponsor
Codex for Firefox is built and maintained by [ISOT.SI](https://isot.si).
This project is sponsored by [chuangwit.com](https://www.chuangwit.com/) (河南创为铁路器材有限公司 — Henan Chuangwei Railway Equipment Co., Ltd.). For railway overhead contact system equipment, section insulators, switches, and other products or services, please visit the official website.
This server cannot be deployed
Maintenance
ActivityActive
ResponsivenessNo recent community issues