opencode-crofai
v1.0.1
Published
CrofAI provider for OpenCode — self-contained, auto-discovers models from crof.ai
Maintainers
Readme
opencode-crofai
CrofAI provider for OpenCode — self-contained, auto-discovers models from crof.ai.
Installation
# Global install (recommended)
opencode plugin opencode-crofai -g
# Or manually install the npm package and add to config:
npm install -g opencode-crofaiThen add it to ~/.config/opencode/opencode.json if you installed via npm:
"plugin": ["opencode-crofai"]
opencode plugin opencode-crofai -gdoes both steps for you — installs the package and updates your global config.
Set your API key as an environment variable:
export CROFAI_API_KEY=your-key-here
opencodeThat's it! The plugin will:
- Automatically fetch all available CrofAI models from
https://crof.ai/v1/models - Register them with correct context windows, pricing, and capabilities
- Support reasoning models with proper
reasoningEffortmapping
What It Does
- ✅ Dynamic model discovery (models are fetched at runtime)
- ✅ Auto-configures the provider (no manual config needed)
- ✅ Reads
CROFAI_API_KEYfrom environment - ✅ Supports reasoning models
- ✅ Context windows and limits from API
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| CROFAI_API_KEY | Yes | Your CrofAI API key |
License
MIT
