Cline / ClinePass OAuth provider extension for pi.
This package adds two providers to pi:
| Provider | ID | Account type | Typical use |
|---|---|---|---|
| Cline | cline |
Organization or personal Cline account | Recommended/free models plus a broader catalog |
| ClinePass | cline-pass |
Personal Cline account | ClinePass model set |
After install and login, you can pick Cline models from /model and use them like any other pi provider.
Requires a working pi install.
# From npm
pi install npm:@maxpaulus/pi-cline
# From git
pi install git:github.com/maxpaulus43/pi-cline
# Local checkout (useful while developing)
pi install /absolute/path/to/pi-cline
# or
pi install ./relative/path/to/pi-clineInstall is user-scoped by default (~/.pi/agent/settings.json). Use -l to install into the current project instead:
pi install -l npm:@maxpaulus/pi-clineTry it for a single run without installing:
pi -e npm:@maxpaulus/pi-clineUpdate later with:
pi update --extensions
# or just this package
pi update npm:@maxpaulus/pi-cline-
Install the package (see above).
-
Start pi.
-
Log in:
/loginThen choose Cline or ClinePass.
-
Complete the device login in your browser when prompted.
-
Select a model:
/modelOr from the CLI:
pi --provider cline --model <model-id> pi --provider cline-pass --model cline-pass/deepseek-v4-flash
Both providers use WorkOS device-code OAuth against Cline (api.cline.bot).
- Starts device authorization and opens/shows a verification URL.
- After auth succeeds, if your account has organizations, pi asks which account should be active (personal or an org).
- Tokens are stored by pi in
~/.pi/agent/auth.jsonand refresh automatically.
- Same device login flow.
- Forces the personal Cline account after login (ClinePass is personal-account based).
/logout
Then select the provider to clear stored credentials.
After logging into Cline, switch the active personal vs organization account without re-logging in:
/cline-org
This command:
- Requires an interactive UI session
- Requires existing Cline OAuth credentials (
/loginwith Cline first) - Shows personal and organization options, with credit balances when available
- Marks the currently active account with
✓
ClinePass always uses the personal account after login; use /cline-org if you also use the cline provider and need to change orgs there.
Model list is built at startup from:
- Cline recommended/free models (
/api/v1/ai/cline/recommended-models) - A broader catalog derived from models.dev (OpenRouter + selected Vercel/ZAI entries), with a local cache under your user cache dir
If both sources fail, the provider still registers but may have an empty model list until the next successful fetch.
Uses Cline’s live clinePass recommended list when available, and falls back to a bundled catalog
List models after install:
pi --list-models cline
pi --list-models cline-pass| Command | Description |
|---|---|
/login |
Authenticate with Cline or ClinePass (provider picker) |
/logout |
Clear stored credentials for a provider |
/model |
Pick a Cline / ClinePass model |
/cline-org |
Choose the active Cline personal or organization account |
- Registers providers via
pi.registerProvider():cline— org-aware login + full model catalogcline-pass— personal-account login + ClinePass models
- API base:
https://api.cline.bot/api/v1 - Auth: WorkOS device code → Cline token register/refresh
- Access tokens are sent as
Authorization: Bearer workos:…(prefix added when needed) - Client headers include
X-CLIENT-TYPE: piandUser-Agent: pi-cline-oauth-extension
Source layout:
index.ts # providers, OAuth login/refresh
cline-account.ts # /cline-org + post-login account selection
cline-models.ts # model catalog fetch/cache + ClinePass fallbacks
npm install
npx changelogger installLoad a local checkout in pi:
pi install /absolute/path/to/pi-cline
# or one-shot
pi -e /absolute/path/to/pi-clinePeer dependencies (provided by pi itself):
@earendil-works/pi-ai@earendil-works/pi-coding-agent
Publishing is handled by GitHub Actions on main when package.json version differs from npm (@maxpaulus/pi-cline).
- npm:
@maxpaulus/pi-cline - Repository: maxpaulus43/pi-cline
- pi docs: Packages, Providers
- Changelog: CHANGELOG.md