omp packages

pi-login-manager0.1.1

Single pi extension that registers and logs the user into third-party vendors (Command Code, R4 Coder). One adapter per vendor; credentials live in pi's auth.json.

unsual Published 26 days ago MIT ~347 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-login-manager

A Pi extension that registers third-party model vendors and manages their logins — one adapter per vendor, credentials stored by pi itself in ~/.pi/agent/auth.json.

Vendors

Provider id Auth paths Notes
commandcode Browser OAuth (localhost callback) or paste API key Static model catalog registered instantly, upgraded to the live catalog in the background
r4coder Paste API key (r4.codes dashboard login is not automatable — Cloudflare Turnstile) Static 10-model catalog, compat.sendSessionAffinityHeaders preserved

Install

pi install npm:pi-login-manager

Or try it without installing:

pi -e npm:pi-login-manager

Usage

After installing, pi loads the extension on session start and both providers are registered automatically. Then:

/login commandcode   # browser OAuth, or paste a key
/login r4coder       # paste the coder_* key from the r4.codes dashboard

Credentials are stored by pi in ~/.pi/agent/auth.json — the same place pi's native logins live. No plaintext keys in models.json, no scraping.

Credential expiry

When a stored credential is expired or near expiry, the extension says which vendor expired and how to re-login, instead of leaving you with a raw 401.

Legacy models.json migration

If your ~/.pi/agent/models.json still defines r4coder with a plaintext apiKey, the extension warns on session start (models.json entries shadow registered providers). Delete that entry — after one /login r4coder the key lives in auth.json and models.json can go.

Requirements

  • Pi coding agent
  • Node 22+ (pi's bundled runtime)

What this is not

  • No usage/billing surface (see docs/adr/); use a usage extension for that
  • No dashboard scraping; R4 login is intentionally paste-key only

License

MIT