A minimal pi extension that adds the CrofAI model provider via an OpenAI-compatible API.
index.ts— registers thecrofprovider and model list.test.ts— integration checks (/models, chat completions, streaming, reasoning,/usage_api/)..gitleaks.toml— secret scanning rules.
pi install npm pi-crofSupported sources (in priority order):
CROF_API_KEYenvironment variable~/.pi/agent/auth.json→crof.key
Example auth.json fragment:
{
"crof": {
"type": "api_key",
"key": "nahcrof_..."
}
}In pi:
/model crof/deepseek-v4-flash
git clone git@github.com:ZoRDoK/pi-crof.git
cd pi-crof
npx tsx test.tscd pi-crof
gitleaks dir . --config .gitleaks.toml- Do not commit real API keys to the repository.
- Keep local secrets in env vars or
~/.pi/agent/auth.json.
