pi-crof

CrofAI provider extension for pi

Packages

Package details

extension

Install pi-crof from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-crof
Package
pi-crof
Version
1.2.1
Published
May 20, 2026
Downloads
300/mo · 23/wk
Author
zordok
License
MIT
Types
extension
Size
11.8 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

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.