Unofficial, community-maintained Python SDK for the Codex CLI.
This is not an official OpenAI SDK.
Full docs site (UV-first, beginner-first):
Local docs preview:
uv run --group docs mkdocs serveAssumes you are already inside an existing UV-managed project.
uv add codex-sdk-unofficial
uv run python -c "from codex_sdk import Codex; print('import-ok')"from codex_sdk import Codex
codex = Codex()
thread = codex.start_thread()
turn = thread.run("Diagnose the test failure and propose a fix", stream=True)
print(turn.final_response)
print(turn.items)Run:
uv run python your_script.py- Package name:
codex-sdk-unofficial - Import name:
codex_sdk - Current version:
0.1.3
PYTHONPATH=src uv run pytest -q
uv run --group docs mkdocs build --strict
uv run --with build python -m buildTag pushes (v*) trigger .github/workflows/publish.yml.
Manual upload fallback:
uv run --with twine twine upload dist/*