Skip to content
Install

Pi

Use Pi with Pentect.

sh
pentect pi --model openai/gpt-5

For a permanent Pi integration, install the JavaScript extension once:

sh
pi install npm:@pentect/pi

Then select its protected provider:

sh
pi --model pentect/gpt-5

For one session without installing it:

sh
pi -e npm:@pentect/pi --model pentect/gpt-5

pentect pi protects that launch only. The npm package registers a normal Pi provider and starts the same local Pentect gateway for each Pi session. Neither method installs prompt hooks.

Normal Pi arguments pass through:

sh
pentect pi --model openai/gpt-5 -p "Review this project"

Chat Completions is the default. Responses can be selected explicitly:

sh
pentect pi --api responses --model gpt-5

With the extension, set PENTECT_PI_API=responses and PENTECT_PI_MODEL=gpt-5 before Pi starts, then select pentect/gpt-5.

If a custom model has different limits, set PENTECT_PI_CONTEXT_WINDOW and PENTECT_PI_MAX_TOKENS. Use PENTECT_PI_INPUTS=text for a text-only model and PENTECT_PI_REASONING=true or false when API type alone cannot describe it. Pentect rejects invalid values instead of telling Pi the wrong capabilities.

Session sharing and export ​

pentect pi rejects Pi's top-level --export option because the generated local HTML can contain restored values. Pi's interactive /export and /share commands run inside Pi before its extension hooks; the current Pentect integration cannot intercept them. Treat interactive exports as sensitive and do not use /share in a protected session.

Custom gateways ​

Custom and local providers can be reached through an OpenAI-compatible gateway such as Bifrost:

sh
pentect pi --model anthropic/claude-sonnet \
  --upstream http://127.0.0.1:8080/openai/v1

Pentect does not save the upstream key in Pi settings. See Custom upstreams for credentials and endpoint details.

Pentect is open source.