@ifi/pi-provider-cursor
Experimental Cursor provider for pi with OAuth login, model discovery, and direct AgentService streaming.
Package details
Install @ifi/pi-provider-cursor from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ifi/pi-provider-cursor- Package
@ifi/pi-provider-cursor- Version
0.5.1- Published
- Apr 28, 2026
- Downloads
- 203/mo · 203/wk
- Author
- ifiokjr
- License
- MIT
- Types
- extension
- Size
- 541.5 KB
- Dependencies
- 1 dependency · 5 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
@ifi/pi-provider-cursor
Experimental Cursor model provider for pi.
What it does
- Registers a
cursorprovider viapi.registerProvider(...) - Adds
/login cursorOAuth support - Discovers usable Cursor models and stores them with the OAuth credential
- Streams responses directly from Cursor's
AgentService/Runtransport - Continues MCP-style tool calls across pi tool execution rounds
Install
pi install npm:@ifi/pi-provider-cursor
This package is intentionally separate from @ifi/oh-pi for now.
Use
- Install the package
- Run
/login cursor - Open
/modeland select a Cursor model - Optionally run
/cursor refresh-modelsto refresh the discovered model catalog
Commands
/cursor status— show auth and runtime status/cursor refresh-models— rediscover available Cursor models and refresh the provider registry/cursor clear-state— clear in-memory conversation checkpoints and pending tool bridges
Notes
- This integration is experimental and uses unofficial Cursor endpoints.
- It is designed as a pi-native provider and does not expose a local OpenAI-compatible proxy.
- Model discovery is stored alongside the OAuth credential so
/login cursorcan refresh the model list immediately. - Image input is not currently advertised; models are registered as text-first until a real integration test pass proves multimodal support.
Test hooks
These environment variables exist mainly for tests and local debugging:
PI_CURSOR_API_URLPI_CURSOR_LOGIN_URLPI_CURSOR_POLL_URLPI_CURSOR_REFRESH_URLPI_CURSOR_CLIENT_VERSION
Legacy CURSOR_* env names are also accepted for compatibility with the reference implementation.