@axman/opencode-auth-profiles
v0.0.1
Published
OpenCode plugin for named auth profiles and session pinning
Readme
OpenCode Auth Profiles
@axman/opencode-auth-profiles is a plugin-first MVP for named provider-account profiles in local OpenCode.
It stores plugin-managed profile snapshots alongside OpenCode's global auth store, lets you pin one profile per session, and re-applies that pinned auth before matching-provider requests.
Commands:
/profiles/profiles add <provider> <name>/profiles switch <profile>/profiles rename <profile> <name>/profiles reauth <profile>/profiles delete <profile>/profiles clear/profiles usage [profile]
Notes:
- Pinning is best-effort. It re-applies stored auth before requests, but it does not provide hard isolation across windows or sessions.
- Gemini usage can be live when the stored Google OAuth record still has a usable access token and project context.
- OpenAI usage remains advisory because no public proactive ChatGPT/Codex usage API is available.
Smoke test:
- Run
npm run smoke:dockerto boot the isolated reference host in Docker and exercise/profilesend to end. - The Docker runner reuses a named volume,
opencode-auth-profiles-node_modules, to restore and refresh a cachednode_modulessnapshot for the copied reference repo between runs.
