Python toolkit for orchestrating Parallel Codex agents across isolated worktrees.
Project description
parallel-codex
Python helpers for orchestrating Parallel Codex agents working in isolated Git worktrees. The toolkit offers a typed core module and a small CLI for planning agent worktrees that the TypeScript layer can execute.
Install
uv tool install parallel-codex
# or: pip install parallel-codex
You’ll get two CLIs:
pcodex– minimal, cross‑platform helper that manages git worktrees + tmux and can runcodex .parallel-codex– lower-level planner/list/prune for worktree metadata
Prerequisites:
gitandtmuxon PATH. On Windows without tmux,pcodexauto-falls back towsl.exe -- tmux ....- The
codexcommand should be available if you use--run-codex.
Commands
uv sync– install dependencies defined inpyproject.tomluv build– build a wheel and sdist using Hatchlinguv run pytest– execute the test suiteuv run ruff check .– lint the codebaseuv run mypy src/– run type checking with MyPy
Release Checklist
- Update the
versionfield inpyproject.toml. - Commit and push the changes.
- Tag the commit with
py-vX.Y.Z(orvX.Y.Z) and push the tag to trigger the GitHub Actions publish workflow. - Confirm the new release appears on PyPI.
CLI Usage (quickstart)
pcodex up reviewer main --run-codex --attach
pcodex switch reviewer
pcodex list
pcodex prune reviewer --kill-session --remove-dir
CLI Usage (development, no install)
Run the CLIs without installing the package:
uv run src/main.py plan reviewer main --base-dir ./.agents
# or the single-file helper:
uv run src/parallel_codex/pcodex.py up reviewer main --run-codex --attach
The published CLIs expose sub-commands:
parallel-codex plan <agent> <branch>– calculate (and optionally materialise) a worktree plan.parallel-codex list– list discovered plans inside a base directory.parallel-codex prune <agent>– remove stored metadata, with--prune-dirto delete the folder entirely.pcodex up <agent> <branch>– ensure git worktree, ensure tmux session, optionally runcodex ., and attach.pcodex switch <agent>– switch/attach to the tmux session.pcodex list– list worktrees and tmux session state.pcodex prune <agent> [--kill-session] [--remove-dir]– kill session and/or remove directory.
Each sub-command accepts --base-dir to target a custom location (defaults to ./.agents).
Library Usage
Import the helpers in automation scripts:
from pathlib import Path
from parallel_codex import plan_worktree
plan = plan_worktree(Path("./agents"), "summariser", "feature/summary")
print(plan.path)
Or rely on the CLI for quick experiments:
uv run parallel-codex summariser feature/summary --base-dir ./agents
The CLI prints a single line summary describing the worktree location, agent name, and branch target.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parallel_codex-0.1.2.tar.gz.
File metadata
- Download URL: parallel_codex-0.1.2.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5e3c410cfa2275692ba310de7e63ea35da27db0202ef424b2ed21afe65ea0ea
|
|
| MD5 |
0b42a8774b59590d7c36476501e7b690
|
|
| BLAKE2b-256 |
58806690ce2110353a1fad4e8f728d14fad785026ca707a0b418d92f8cde86ab
|
Provenance
The following attestation bundles were made for parallel_codex-0.1.2.tar.gz:
Publisher:
deploy-python.yml on parallel-codex/parallel-codex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parallel_codex-0.1.2.tar.gz -
Subject digest:
c5e3c410cfa2275692ba310de7e63ea35da27db0202ef424b2ed21afe65ea0ea - Sigstore transparency entry: 689732783
- Sigstore integration time:
-
Permalink:
parallel-codex/parallel-codex@ba8b96c1d68e5dc54255b67aab1e7ca9cdd8adad -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/parallel-codex
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-python.yml@ba8b96c1d68e5dc54255b67aab1e7ca9cdd8adad -
Trigger Event:
push
-
Statement type:
File details
Details for the file parallel_codex-0.1.2-py3-none-any.whl.
File metadata
- Download URL: parallel_codex-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
690b5dbb44af17be4ccd3214a451b34bc2b899692bf95aa2743be392a428bff2
|
|
| MD5 |
c861ade9e059660ee15ba61c0188dd2b
|
|
| BLAKE2b-256 |
db374b691a8c3d59a5f61793a4c2a735f183c4fb5fc00c133922d17215bacee7
|
Provenance
The following attestation bundles were made for parallel_codex-0.1.2-py3-none-any.whl:
Publisher:
deploy-python.yml on parallel-codex/parallel-codex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parallel_codex-0.1.2-py3-none-any.whl -
Subject digest:
690b5dbb44af17be4ccd3214a451b34bc2b899692bf95aa2743be392a428bff2 - Sigstore transparency entry: 689732844
- Sigstore integration time:
-
Permalink:
parallel-codex/parallel-codex@ba8b96c1d68e5dc54255b67aab1e7ca9cdd8adad -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/parallel-codex
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-python.yml@ba8b96c1d68e5dc54255b67aab1e7ca9cdd8adad -
Trigger Event:
push
-
Statement type: