This map keeps the detailed file ownership notes out of AGENTS.md while
preserving the source-of-truth routing agents need before editing.
install.shTop-level installer entrypoint. It sourcesscripts/lib/*.sh, keeps the high-level build sequence small, and emitscodex-app/start.shfrom the launcher template plus an install-time identity prelude.MakefileConvenience targets for setup, fresh/build/install/package flows, native package autodetection, dev side-by-side app identities, AppImage, cleanup, and bootstrap workflows. Important targets includesetup-native,bootstrap-native,install-native,update-native,appimage,package, andinstall, plus granular helpers (build-app,build-app-fresh,rebuild,rebuild-install,rebuild-next,build-dev-app,run-app,run-dev-app,inspect-upstream,build-updater,service-enable,service-status,check,test,clean-dist,clean-state).scripts/bootstrap-wizard.shGuided native setup/update helper. It can discover Linux features, edit feature config, validate feature relationships, install native packages, and perform explicit feature-owned cleanup.Cargo.tomlWorkspace root forcomputer-use-linux,read-aloud-linux,record-replay-linux, andupdater.flake.nix/flake.lockNix flake that pins upstream DMG, Cargo dependency, and Node dependency hashes. Usescripts/ci/update-nix-hashes.shto refresh pins.nix/Nix integration modules:home-manager-module.nix,nixos-module.nix, andnative-modules/rebuild support for the flake..devcontainer/devcontainer.json/.devcontainer/DockerfileGeneric build/test container with Rust, Node 22/npm, packaging tools,rustfmt, andclippy.
launcher/start.sh.templateRuntime launcher body. Edit this for webview server lifecycle, warm-start handoff, CLI preflight, GUI prompts, URL-scheme handling, runtime Linux feature hooks, bundled plugin cache sync, and process/liveness behavior. Single-instance enforcement uses anflocklauncher lock plus serialized bootstrap around detection/spawn/app.pid, and a/procrunning-app scan filtered byCODEX_LINUX_INSTANCE_ID.launcher/webview-server.pyStandalone Python HTTP server for local webview assets, serving explicit no-store/no-cache headers. It is started and supervised by the launcher.packaging/linux/codex-packaged-runtime.shNative-package-only runtime helper loaded optionally by the launcher.packaging/appimage/codex-appimage-runtime.shAppImage-only runtime helper.
install-helpers.shArgument parsing, dependency checks, identity validation, install-dir preparation, logging/color helpers, and shell quoting.build-info.sh/build-info.jsBuild provenance capture: git commit, DMG source, upstream/Electron versions, enabled feature ids, and target context.node-runtime.shManaged Linux Node.js runtime download and SHA256 validation. The launcher, Browser Use, native module rebuilds, Codex CLI flow, and updater rebuilds use this runtime.process-detection.shRunning-app detection used to avoid overwriting a live install.dmg.shDMG download/extraction and upstream Electron-version detection.native-modules.shLinux rebuild of native modules such asbetter-sqlite3andnode-pty, plus Electron runtime download/cache.asar-patch.shDrivesscripts/patch-linux-window-ui.jsover the extracted upstream app.webview-install.shWebview asset extraction and finalcodex-app/layout.bundled-plugins.shStages bundled Browser Use, Chrome, Linux Computer Use resources, native helper binaries, and marketplace metadata.linux-features.sh/linux-features.jsOpt-in Linux feature framework. The JS side discovers repository/local features, validates manifests, dependencies, conflicts, entrypoints, resource modes, runtime hooks, package hooks, and exposes patch descriptors. The shell side runs feature staging in the install pipeline.package-common.shShared package-builder helpers: versioning, payload staging, permission normalization, package hook discovery/execution, update-builder staging, and user service helper installation.linux-target-context.jsBuild-time target detection for patch descriptors from/etc/os-releaseand environment overrides. Exposes helpers such asmatchesId(),packageFormatIs(),packageManagerIs(),desktopMatches(), andversionAtLeast().patch-report.js/rebuild-report.shStructured patch and rebuild reports used by upstream drift validation and rebuild-candidate diagnostics.patch-chrome-plugin.js/linux-update-bridge-patch.jsFocused patch helpers for Chrome plugin Linux compatibility and the in-app updater bridge.
scripts/patch-linux-window-ui.jsASAR patcher CLI only: argument parsing, optional JSON report writing, runner invocation, and critical gating. Do not import internals from this file.scripts/patches/core/**/patch.jsSource of truth for shipped Linux compatibility patch descriptors. New core patches should be descriptors underall-linux/,distro/,package/, ordesktop/.scripts/patches/descriptor.jsDescriptor factories, phase constants, and CI policy constants. UsemainBundlePatch,webviewAssetPatch, orextractedAppPatch.scripts/patches/engine.jsNormalizes descriptors, checks duplicate ids, applies target/enabled filters, executes phases, captures warnings, and records patch report metadata.scripts/patches/runner.jsOrchestrates discovered core descriptors plus enabled Linux feature descriptors. It ownspatchExtractedApp,patchMainBundleSource,allPatchPolicies, andrequiredPatchNamesForProfile.scripts/patches/impl/andscripts/patches/lib/Domain implementations and generic helpers used by descriptors. Do not recreate removed compatibility barrels.scripts/patches/core/README.mdDescriptor contract. Read it before adding or moving core patches.scripts/patch-linux-window-ui.test.jsNode test suite for the patcher.scripts/ci/validate-patch-report.jsCI guard for required upstream patches. Mark a descriptor as required only when its absence should block upstream-build CI.
linux-features/ is the extension boundary for optional Linux integrations.
Detailed contract: linux-features/README.md and
docs/linux-features-architecture.md.
- Repository features live under
linux-features/<feature-id>/. - User-local/private features live under
linux-features/local/<feature-id>/; this directory is gitignored. features.example.jsonis the committed empty template. The activefeatures.jsonis gitignored and lists enabled ids.CODEX_LINUX_FEATURES_ROOTandCODEX_LINUX_FEATURES_CONFIGcan override feature discovery/config paths for setup and build flows.- Feature ids use one namespace across repository and local features. Local features cannot shadow repository features.
defaultEnabled: trueis rejected. Optional features are always opt-in.- Every feature must have
feature.jsonandREADME.md. - Manifest
requiresandconflictsare validated by setup, installer, patcher, and package builders. - Runtime hook types are
env,prelaunch,electronArgs,launcher,coldStart, andafterExit; they are staged undercodex-app/.codex-linux/. - Declarative resources and runtime hooks are tracked in
.codex-linux/linux-features-staged.jsonand removed on the next install when their owning feature is disabled. packageHooksrun during native package staging with package/app root environment variables. They must be idempotent and narrowly scoped.- Native package update-builder bundles preserve the enabled feature id list and configured feature root, including local features, so local auto-updates keep the same opt-in features.
Use linux-features/ for anything useful to some users but not mandatory for
the baseline Linux app. If a feature needs more power, add a generic hook or
extension point to core rather than moving the feature itself into core.
scripts/build-deb.shBuilds.debfrom an already-generatedcodex-app/.scripts/build-rpm.shBuilds.rpmfromcodex-app/.scripts/build-pacman.shBuilds.pkg.tar.zstfromcodex-app/.scripts/build-appimage.shBuilds an AppImage usingpackaging/appimage/.packaging/linux/Debian control files, RPM spec, pacmanPKGBUILD.template/install hooks, desktop entry, icon policy, Polkit policy, packaged runtime helper, shared user-service maintainer-script helper, andcodex-desktop-entry-doctor.sh.packaging/appimage/AppImageAppRun, desktop file, and runtime helper.
The native package payload installs the app under /opt/codex-desktop, the
launcher under /usr/bin/codex-desktop, the updater under
/usr/bin/codex-update-manager, the user service under
/usr/lib/systemd/user/, desktop/icon metadata under /usr/share/, and an
update-builder bundle under /opt/codex-desktop/update-builder.
updater/src/main.rs/app.rs/cli.rsBinary entrypoint, top-level dispatcher, andclapCLI.builder.rsDrives the packaged update-builder bundle to rebuild packages from newer upstream DMGs.upstream.rsUpstream DMG polling, ETag cache, download, and hash verification.wrapper.rs/wrapper_apply.rs/changelog.rs/feature_picker.rsWrapper-repo self-update path, separate from the upstream DMG flow.cache_cleanup.rsCleanup of updater-managed download/rebuild workspaces under the cache dir.install.rs/install_rollback.rs/rollback.rsPrivileged package install, format-specific install/rollback commands, and manual rollback orchestration.codex_cli.rsCodex CLI discovery, version reads, npm-registry preflight checks, and install/update flow used by launcher preflight.state.rs/config.rsPersisted updater state and runtime config/path resolution.liveness.rs/notify.rs/logging.rsElectron liveness, desktop notifications, and service logging.test_util.rsShared test helpers, including serialization of env-mutating tests.
The updater runs unprivileged and only escalates through pkexec for
install-deb, install-rpm, or install-pacman.
notification-actions-linux/Small Rust D-Bus bridge for freedesktop notification action and close signals. The main-process core patch uses it only for upstream notifications that already carry actions and falls back to Electron otherwise.computer-use-linux/Rust crate for Linux Computer Use MCP, Chrome native messaging host, and the COSMIC helper. It covers input, capture, accessibility, terminal, identity, and desktop integrations.computer-use-linux/src/windowing/Window backend registry, target resolution, focus verification, and backend-specific implementations. Add new compositor/window-manager support underwindowing/backends/and register it inwindowing/registry.rs; avoid backend-specific branches inserver.rsordiagnostics.rs.computer-use-linux/gnome-shell-extension/Bundled GNOME Shell extension used for exact GNOME activation.plugins/openai-bundled/plugins/computer-use/and.../read-aloud/Bundled plugin manifests/resources staged into the Linux app.read-aloud-linux/Rust MCP backend for optional Read Aloud support.record-replay-linux/Rust CLI and stdio MCP backend for the optional Record & Replay Linux demo-to-skill workflow.linux-features/read-aloud/andlinux-features/read-aloud-mcp/Optional Linux features for Read Aloud patching/staging/integration.
contrib/user-local-install/ is an opt-in install path for users who do not
want a system-wide native package. The daily-driver flow remains install.sh
plus a native package plus codex-update-manager.
install-user-local.shInstalls under~/.local/opt/codex-desktop-linux, creates wrappers under~/.local/bin, and installs a user desktop entry.files/.local/bin/codex-desktop{,-update,-check-update,-version}Installed launcher and update/version maintenance wrappers.files/.local/lib/codex-desktop-linux/common.shShared helpers for installed maintenance scripts.files/.local/share/applications/codex-desktop.desktopUser desktop entry installed by the user-local path.files/.config/systemd/user/codex-desktop-update.{service,timer}Optional weekly user timer.
tests/scripts_smoke.shTop-level smoke suite for shell helpers, package builders, launcher template, Electron-version detection, native modules, ASAR patches, and bundled plugin staging.tests/fixtures/create-packaged-app-fixture.shMinimal fake packaged app layout for package-builder tests.tests/webview_probe_equivalence.shChecks the launcher's webview startup probe stays equivalent tolauncher/webview-server.py.scripts/ci-local.shLocal containerized CI runner. Targets includepr,all,core,deb,rpm,pacman,install-deps[:image],nix, andupstream..github/workflows/GitHub Actions for CI, upstream app builds, install-deps, Cachix, Nix hash refreshes, and Computer Use sync reminders.
README.mdPublic install/usage entrypoint.CONTRIBUTING.mdContributor expectations, including the latest-DMG-only drift policy.CHANGELOG.mdRelease notes.docs/architecture.mdHigh-level architecture overview of the repo and runtime flow.docs/build-and-packaging.mdBuild pipeline and native package builder reference.docs/native-setup.mdGuided native setup/install/update walkthrough.docs/updater.mdUpdate manager design, states, and operations.docs/linux-features-architecture.mdLinux feature framework contract.docs/linux-computer-use.mdLinux Computer Use backend, windowing, and desktop integration notes.docs/record-and-replay-linux.mdLinux Record & Replay compatibility and tester acceptance notes.docs/upstream-dmg-acceptance.mdShared acceptance policy for local installs, updater rebuilds, and CI.docs/upstream-dmg-intelligence.mdProtected-surface inspection and upstream drift intelligence.docs/upstream-dmg-watchdog.mdScheduled upstream DMG campaign and issue lifecycle.docs/nix.mdNix flake, modules, and hash-pin workflow.docs/troubleshooting.mdCommon install/runtime issues and diagnostics.docs/label-governance.mdStaff-managed issue and pull request label policy.docs/github-cli-auth.mdGitHub CLI authentication behavior in app-launched shells.docs/wayland-input-focus-investigation.mdanddocs/linux-chronicle-skysight.mdFocused investigation and integration notes for Linux-specific workflows.docs/webview-server-evaluation.mdanddocs/launcher-performance.mdDecision records for the webview server and launcher performance defaults.