Skip to main content

Add your description here

Project description

codex-ipc

Python facade for running Codex app-server sessions and sharing their live conversation state over the Codex IPC owner/follower protocol.

Library usage

from pathlib import Path

from codex_ipc import CodexIpcConfig, CodexIpcSession


async def main() -> None:
    config = CodexIpcConfig(
        codex_bin=Path("/opt/homebrew/bin/codex"),
        host_id="local",
        model="gpt-5.4",
        reasoning_effort="high",
    )

    async with CodexIpcSession(config) as session:
        thread = await session.start_new_thread()
        print(f"started {thread.id}")

        async for state in session.watch_state():
            # Forward this raw conversation state to a browser over WebSocket.
            print(state)


async def resume_existing(thread_id: str) -> None:
    async with CodexIpcSession(CodexIpcConfig(thread_id=thread_id)) as session:
        await session.hydrate_initial_state()
        await session.run_prompt("Summarize the current repo", wait_for_completion=True)

If codex_bin is omitted, the vendored app-server SDK uses its normal runtime resolver. Pass a codex_app_server.AppServerConfig as app_server_config when you need full control over app-server launch arguments.

TUI demo

The TUI is a development tool and is kept out of the core dependency set:

uv run --extra tui codex-ipc-demo --codex-bin /opt/homebrew/bin/codex

Core imports such as import codex_ipc do not require textual, rich, or pillow.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codex_ipc-0.1.1.tar.gz (137.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codex_ipc-0.1.1-py3-none-any.whl (110.4 kB view details)

Uploaded Python 3

File details

Details for the file codex_ipc-0.1.1.tar.gz.

File metadata

  • Download URL: codex_ipc-0.1.1.tar.gz
  • Upload date:
  • Size: 137.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codex_ipc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c626edd93c3d648bd63359ed5d15a487dfac8a13e53c0834ac4e502a909f17f7
MD5 19d4c1309ddc2b89946cba763e30ab2d
BLAKE2b-256 65cdac3152ce769570ea43ec030960dd60ee604ac4fcba5cec7b4f8cf618a766

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_ipc-0.1.1.tar.gz:

Publisher: publish.yml on Sube-py/codex_ipc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codex_ipc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: codex_ipc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 110.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codex_ipc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d52cc3adbcca0ef1e2e6c9d1b96c627a7de1db0c8f5288640a34a3dcc970fb89
MD5 139014882522468da85a7c6b47101c41
BLAKE2b-256 8b0f35b72c15e13139866701b5ae2f1fcda84248d468ec3782b499d736724f1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for codex_ipc-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Sube-py/codex_ipc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page