Plugin & CLI — three install paths
PCE v0.4 ships as a portable plugin with three first-class install paths: a Cursor plugin, a Claude Code plugin, and a standalone pce CLI. The cascade itself is host-agnostic; only the manifest and the entry point change per host. A single configuration chain (defaults < repo pce.toml < ~/.config/pce/config.toml < environment variables < CLI flags; later layers override earlier) controls model selection across all three paths.
1. Standalone CLI (recommended for batch / CI use)
# clone, install, smoke
git clone https://github.com/sharathsphd/pratyabhijna
cd pratyabhijna
uv pip install -e . # required: registers the pce script
pce smoke
pce config show
# ad-hoc cascade run
pce cascade --prompt "Write a contemporary haiku on attention drift." \
--constraint "imagism" --k 4 --seed 4242
# judge a pair (the Sonnet judge bridge in benchmarks/judge.py)
pce judge-pair --domain poetry_gen --item-id p07 \
--treatment-text out/treatment.txt --control-text out/control.txt The CLI requires only the OAuth-bound claude CLI on the path. No host IDE is required. The pce showcase --regenerate <slug|all> subcommand drives scripts/generate_v0_4_showcase.py end-to-end (six Phase 7 cascade-derived demos plus three Sanskrit live-cascade demos as of v0.4.1; see the showcase index).
2. Cursor plugin
# from a clone of the repo cursor --install-plugin . # or list, then enable in the Cursor settings UI cursor plugin list
The Cursor manifest at plugin/.cursor-plugin/plugin.json mirrors the Claude Code manifest: same MCP tools, same slash commands, same hooks. The plugin runtime is identical because both hosts speak MCP. After install, the /pce-cascade and /pce-judge-pair commands appear in the Cursor command palette.
3. Claude Code plugin
claude plugin install https://github.com/sharathsphd/pratyabhijna # or, for a local clone ln -s "$(pwd)" "$HOME/.claude/plugins/pce"
The Claude Code manifest at plugin/.claude-plugin/plugin.json is the canonical reference; the Cursor manifest is generated to match.
Configuring the cascade and judge models
PCE accepts any Anthropic CLI-addressable model. Defaults are haiku for cascade and sonnet for judge. The resolution chain matches PCEConfig.load() in src/pce/config.py: built-in defaults are layered first, then the repo-level ./pce.toml, then the user-level ~/.config/pce/config.toml, then environment variables, and finally CLI flags (which always win).
- Built-in defaults.
- Repo-local ./pce.toml at the workspace root.
- ~/.config/pce/config.toml (XDG-aware: also honours $XDG_CONFIG_HOME/pce/config.toml).
- Environment variables: PCE_MODEL / PCE_CASCADE_MODEL, PCE_JUDGE_MODEL, PCE_CLI, PCE_TIMEOUT_S, PCE_COST_CAP_USD. Legacy back-compat aliases (PCE_HAIKU_MODEL, PCE_HAIKU_CLI, …) still work; the new names take precedence when both are set.
- CLI flags: --model, --judge-model, --cli-bin, --timeout-s, --config.
Example ~/.config/pce/config.toml:
[pce] cascade_model = "sonnet" # use Sonnet-4.5 for cascade instead of Haiku judge_model = "opus" # use Opus for the LLM-judge (when available on your CLI) cli_bin = "claude" # binary on PATH timeout_s = 240 cost_cap_usd = 50.0
Substrate boundary — OAuth CLI only
The Anthropic Python SDK code path was removed in Phase 8 (ADR-007). PCE has a single supported substrate: claude --print over the OAuth-bound CLI. Legacy users who set PCE_USE_SDK=1 will see a clear deprecation error with a one-line remediation path. The Phase 7 mechanism pilot used the managed Anthropic-API substrate through the same CLI's profile selector; ADR-006 records the deviation.