cacli
coding agent CLI
Recovering Changes From Transcripts
cacli apply-transcript <transcript.jsonl> can recover reconstructable file edits from Claude Code or Codex JSON/JSONL transcripts.
Examples:
# Produce a reviewable patch without touching the working tree
cacli apply-transcript session.jsonl --mode generate-patch
# Apply the auto-applicable prefix directly to the current tree
cacli apply-transcript session.jsonl --mode auto-apply
# Approve each recoverable edit interactively
cacli apply-transcript session.jsonl --mode interactive
Behavior:
- The command scans the full transcript before doing anything else.
- It reconstructs
Write,Edit,MultiEdit, andapply_patchstyle changes. - It flags mutating shell commands that cannot be reconstructed, such as
sed -i. - Automatic replay stops at the first unreconstructable mutating shell command or edit that no longer applies cleanly.
generate-patchwrites a patch for the auto-applicable prefix without modifying the working tree.
Run an agent
A run selects a CLI harness, an inference provider, and an unqualified model ID:
cacli run "Review this diff" --harness claude --provider claude-api --model claude-opus-4-8
cacli run "Review this diff" --harness pi --provider workers-ai --model @cf/zai-org/glm-5.3
cacli run "Review this diff" --harness codex --provider azure --model gpt-5.3-codex
The CLI reads non-secret provider parameters from AWS_REGION,
CLOUDFLARE_ACCOUNT_ID, or AZURE_OPENAI_ENDPOINT and checks required credential names or login files
before execution. build_launch() returns the command, non-secret environment,
environment variables to unset, and credential wire metadata without reading
secret values. See the provider design.
Workflows (cacli flow)
Flows are sandboxed Python scripts that orchestrate coding-agent subprocesses across harnesses and inference providers. The orchestration script has no direct filesystem, network, environment, or subprocess access; its side effects go through the injected workflow API, while the agents it launches run with their normal permissions.
Create review_flow.py:
META = {"name": "cross-review", "description": "cross-vendor review"}
async def main():
phase("Review")
reviews = await parallel([
lambda: agent("Find correctness bugs in the current diff", harness="codex"),
lambda: agent("Find security issues in the current diff", harness="claude"),
])
log(f"Received {len([r for r in reviews if r])} reviews")
return {"reviews": reviews}
Then run it with a dollar cap:
cacli flow run review_flow.py --budget 5.00
Useful commands:
cacli flow run flow.py [--args JSON] [--budget 10.00] [--resume RUN_ID]
cacli flow runs
cacli flow show RUN_ID
cacli flow docs | less
cacli flow install-skill
cacli flow docs prints the complete DSL reference. Claude users can install
the same reference as an agent skill with cacli flow install-skill.
Headline features:
- Harness selection for Claude, Codex, Devin, Cursor, OpenCode, and Pi, with explicit inference providers
- Structured output validated against JSON Schema
- Journal-based resume that replays unchanged calls
- Dollar budgets with resumable budget-exceeded runs
- Sandboxed orchestration scripts with a focused async Python DSL
Development
uv sync # installs pinned dev tools (ruff, ty, pytest, prek)
uv run prek install # once: run the hooks on every commit
uv run prek run --all-files # lint, format, typecheck, and test the whole repo
Hooks come from .pre-commit-config.yaml and need prek; stock pre-commit
cannot run it. Tool versions are pinned in pyproject.toml's dev group.
Host applications can add OpenAI-compatible Pi endpoints at runtime with
register_openai_compatible_provider; see runtime providers.
Metadata
Release files for cacli 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cacli-0.2.5.tar.gz | 86.2 kB | Without provenance | Details for cacli-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cacli-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for cacli-0.2.5-py3-none-any.whl |
Total release size: 162.3 kB
Release files / cacli-0.2.5.tar.gz
| Download URL | cacli-0.2.5.tar.gz |
|---|---|
| Size | 86.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cad8f009ad67f70d58c74c528ce72550032dcec0b4aadf10be073d4ea2a4127
|
|
BLAKE2b-256 checksum How to use checksums |
750a0ab08a5f83a4d7eccee588b3d3844f74271980a896587d8e800169b5bf80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / cacli-0.2.5-py3-none-any.whl
| Download URL | cacli-0.2.5-py3-none-any.whl |
|---|---|
| Size | 76.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c525790be999205998cec32d86b1dbe3ef10f5cb65b13f1efbc8aab928293ba
|
|
BLAKE2b-256 checksum How to use checksums |
d38e86426e76d9293f770e2b2c046d7cd3496a864519814fcfddc54f3e16db11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Security for cacli 0.2.5
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.