← 全部工具

NDDev-it-com/nddev-codex-app

热度 65 更新于 开发与构建

Isolated setup switching for Codex homes

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

NDDev Codex Setup Manager

nddev-codex-app is a dependency-free manager for a caller-selected Codex home. Version 0.2.0 installs the exact tested official Codex CLI standalone release into that target and switches one of two complete NDDev configuration sets without deleting unrelated target state. The repository also publishes the independently installable nddev-builder Codex marketplace.

The current OpenAI desktop product is the ChatGPT app for macOS and Windows. It contains separate Chat plus selectable ChatGPT Work and Codex modes. Codex CLI 0.147.0 still implements codex app through legacy Codex.app/Codex.dmg packaging. This module does not manage either desktop bundle directly; on macOS, desktop is only a narrow delegation to that upstream command.

Owned state

The setup lifecycle manages only:

  • config.toml,
  • AGENTS.md,
  • NDDEV-CODEX-SETUP.json.

The software lifecycle owns the official standalone layout under the same explicit target:

bin/codex
packages/standalone/current
packages/standalone/releases/<version>-<platform>/

Credentials, sessions, and entries unrelated to the selected lifecycle remain untouched. Setup switching and removal do not modify the standalone software layout, builder profile, or Codex-owned builder cache. The manager never infers or defaults to ~/.codex.

Requirements

  • Python 3.10 or newer
  • macOS or Linux on ARM64 or x86-64 for install-cli and update-cli
  • macOS for the desktop delegation command
  • Python directory-FD and no-follow filesystem operations for mutations
  • an absolute target whose parent already exists

This build installs and requires Codex CLI 0.147.0. The configuration format remains compatible with Codex CLI 0.138.0 or newer.

Install the official Codex CLI

python3 cli-tools/nddev_codex.py software-status \
  --target /absolute/path/to/codex-home
python3 cli-tools/nddev_codex.py install-cli \
  --target /absolute/path/to/codex-home
python3 cli-tools/nddev_codex.py update-cli \
  --target /absolute/path/to/codex-home

Install and update first download the pinned OpenAI rust-v0.147.0 install.sh asset into a temporary directory, enforce its exact size and SHA-256, and invoke it without a shell pipeline. That verified official installer then downloads the pinned checksum manifest and host package and validates their release digests and package checksum. CODEXHOME, CODEXINSTALLDIR, CODEXNONINTERACTIVE, and CODEXRELEASE are fixed by the manager. Isolated HOME, USERPROFILE, and TMPDIR, plus a controlled system-tool PATH, exclude user shell startup state and user package-manager paths; installer package state is written only below the explicit target.

After installation, the manager validates the target-owned current release, the exact codex-package.json schema, host platform identity, visible command symlinks, compatibility entrypoint, code-mode host, bundled ripgrep, Linux sandbox helper, executable ownership/modes, bounded codex --version output, the official temporary-directory PATH-alias diagnostic when present, and exact canonical stdout version. install-cli and update-cli are idempotent when 0.147.0 is already current. A different installed version must be advanced with update-cli.

software-status is non-mutating, never executes the target binary, and reports installed, current, version, and executable from the validated standalone layout. Partial or unsafe standalone layouts fail closed rather than being reported as healthy.

Content setup and permission profiles