Skip to main content

codex-profile-sync

简体中文 | English

codex-profile-sync safely applies a private, portable Codex source bundle on macOS, Windows, and Linux. The engine is public; your settings, named Codex profiles, MCP declarations, plugin preferences, and optional skills stay in a separate private directory or private Git repository.

The tool is deliberately one-way. It reads an already checked-out source bundle and applies declared settings to the current machine. It never runs git pull, git push, plugin installation, MCP login, or any network request.

What it manages

  • Explicitly declared keys in $CODEX_HOME/config.toml (default: $HOME/.codex/config.toml).
  • Named Codex profile files such as review.config.toml under CODEX_HOME.
  • Optional user skills under $HOME/.agents/skills, with ownership tracked by content hashes.

It never manages authentication, OAuth state, history, sessions, logs, SQLite databases, caches, memories, plugin caches, or any other Codex runtime state. See the threat model for the complete boundary.

The paths above follow the current official Codex documentation for configuration profiles and user skills.

Install

Python 3.11 or newer is required.

pipx install codex-profile-sync
# or
uv tool install codex-profile-sync

For development from a source checkout:

python -m pip install -e '.[dev]'

Create a private source bundle

Choose a directory that is not inside this public engine checkout:

codex-profile-sync init "$HOME/private-codex-profile"

The command creates files but does not initialize Git or configure a remote. If you use Git to carry the bundle across machines, keep that repository private and update it yourself before applying:

git -C "$HOME/private-codex-profile" pull --ff-only
codex-profile-sync plan --source "$HOME/private-codex-profile"
codex-profile-sync apply --source "$HOME/private-codex-profile"

Review the plan before applying. apply prompts by default; use --yes only in controlled automation.

Source bundle format

Every bundle contains sync.toml:

schema_version = 1
profile_id = "portable-codex"

[config]
common = "config/common.toml"
platform_dir = "config/platforms"
managed_paths = ["model_reasoning_effort", "plugins.*", "mcp_servers.*"]
remove_paths = []

[named_profiles]
directory = "profiles"

[skills]
directory = "skills"
enabled = false

Portable values go in config/common.toml. Platform overlays go in config/platforms/macos.toml, windows.toml, and linux.toml; the selected overlay wins over common values.

managed_paths is an allowlist. Exact paths manage a scalar or table. The only supported wildcards are plugins.* and mcp_servers.*; they expand to the specific entries present in the source files. Undeclared local configuration is preserved, including comments.

remove_paths is the only explicit deletion interface. A value can be removed only when this profile previously managed it and the local value still matches the recorded hash. Removing an entry from managed_paths merely relinquishes ownership.

Protected runtime-owned areas—including project trust, plugin marketplace paths, desktop runtime settings, and mcp_servers.node_repl—cannot be managed.

Commands

codex-profile-sync init <source-dir>
codex-profile-sync plan --source <dir> [--platform auto|macos|windows|linux]
codex-profile-sync apply --source <dir> [--yes]
codex-profile-sync doctor --source <dir>

plan, apply, and doctor also accept --codex-home and --json.

Exit codes are:

  • 0: successful and, for doctor, fully synchronized.
  • 1: invalid input or operational failure.
  • 2: doctor found safe-to-apply drift.
  • 3: a conflict requires manual resolution.

JSON plans expose only action names and paths, never configuration values.

Safe file ownership

Named profiles and skills use a local state file in the platform's application state directory. An existing identical file can be adopted. A different unregistered file is never overwritten. Once managed, a file is updated or deleted only while its content still matches the previous hash; local edits become conflicts.

Source and target symlinks are rejected. Writes are atomic, existing files are backed up outside both repositories, and a failed multi-file apply attempts to restore every changed target.

Development

pytest
ruff check .
python -m build
python scripts/audit_public_tree.py .

Tests use temporary home and state directories and never touch the developer's real Codex configuration.

Status

Version 0.1.1 is an alpha release. The source-bundle schema is versioned, but the CLI may gain additional safe, backwards-compatible checks before 1.0.

Metadata

Release files for codex-profile-sync 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codex-profile-sync 0.1.1
File Size Uploaded Provenance Actions
codex_profile_sync-0.1.1.tar.gz 28.3 kB With provenance Details for codex_profile_sync-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for codex-profile-sync 0.1.1
File Interpreter ABI Platform Actions
codex_profile_sync-0.1.1-py3-none-any.whl Python 3 none any Details for codex_profile_sync-0.1.1-py3-none-any.whl

Total release size: 53.2 kB

Release files / codex_profile_sync-0.1.1.tar.gz

Download URL codex_profile_sync-0.1.1.tar.gz
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cd3d674dcdb37b01f5aa3ce8fb5a1dd95f464a6040b956a7c2970da008bdbabb
BLAKE2b-256 checksum
How to use checksums
552b9b5ceaf7cd9190d020d1a9c711e6637c9d01cfdd7f81e873cdcc92f1b7f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Release files / codex_profile_sync-0.1.1-py3-none-any.whl

Download URL codex_profile_sync-0.1.1-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b06b070fa28414b1bbda88d4c914f5f77ecc73900da052b200c53c316c87b26
BLAKE2b-256 checksum
How to use checksums
2204a6a3ba22f5f0222dc3f83307f9b9521db640e9ff4b53c12320a1c7fca03e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

Security for codex-profile-sync 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for codex_profile_sync-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page