pi-crof

内容来源:README.md(说明文档) · 原始地址 · 查看安装指南

原始内容

pi-crof

CrofAI Pricing

A minimal pi extension that adds the CrofAI model provider via an OpenAI-compatible API.

Files

  • index.ts — registers the crof provider and model list.
  • test.ts — integration checks (/models, chat completions, streaming, reasoning, /usage_api/).
  • .gitleaks.toml — secret scanning rules.

Install

pi install npm pi-crof

API key

Supported sources (in priority order):

  1. CROF_API_KEY environment variable
  2. ~/.pi/agent/auth.jsoncrof.key

Example auth.json fragment:

{
  "crof": {
    "type": "api_key",
    "key": "nahcrof_..."
  }
}

Usage

In pi:

/model crof/deepseek-v4-flash

Run tests

git clone git@github.com:ZoRDoK/pi-crof.git
cd pi-crof
npx tsx test.ts

Secret scan (gitleaks)

cd pi-crof
gitleaks dir . --config .gitleaks.toml

Notes

  • Do not commit real API keys to the repository.
  • Keep local secrets in env vars or ~/.pi/agent/auth.json.