# How to add a model login through an npm plugin with magpie

Repo: [yetone/magpie](https://github.com/yetone/magpie) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Install an OpenCode or pi plugin so a sign-in flow becomes a usable provider for your agents.

**Who it is for:** Advanced user who wants Gemini or Antigravity models that need a plugin-based login

**The problem:** Some providers only offer sign-in through agent plugins, which other agents cannot use directly.

**The outcome:** The plugin's models show up in magpie and any agent can run on them like a normal provider.

## Steps

1. Run: magpie plugin add opencode-gemini-auth
2. Run: magpie plugin login google-plugin
3. Open Agents and pick a model from the plugin's provider
4. Start a new session and send a short prompt to confirm it responds

## Prompt to paste into your agent

```text
Using yetone/magpie, install the plugin <PLUGIN_NAME> and complete its login. Verify its models appear in the model picker and answer a test prompt in <TARGET_AGENT>.
```

## Caveat

Plugins run on Bun, which is downloaded on first use, and plugin code runs on your machine. Only install plugins you trust.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yetone-magpie/add-gemini-or-pi-login-via-npm-plugin/
