@vvibe/cli
v0.3.0
Published
One-command onboarding for VVibe — points your AI coding agent (Claude Code, Cursor, Codex) at a VVibe MCP server. `vvibe login` runs the browser OAuth for you and writes a ready-to-use connection; `vvibe connect` wires the server and lets the agent log i
Readme
@vvibe/cli
One command to connect an AI coding agent to VVibe.
npx @vvibe/cli login --server=https://mcp.vvibe.aiThat's the whole onboarding. The CLI opens your browser once, you log in, and it writes the VVibe MCP server into your agent's config with a long-lived token. Every session after that — including headless / CI agents that can't pop a browser — just works. No token to copy, no daemon, nothing in the background.
Two ways to connect
| Command | What it does | Best for |
|---|---|---|
| login (recommended) | Runs the browser OAuth for you, then writes the MCP server into your agent config with a static Authorization header. | Any agent, especially headless / non-interactive ones. |
| connect | Only writes the MCP server; the agent runs OAuth in your browser the first time it uses the server. | You'd rather the agent own the login. Reuses a saved login token automatically if one exists for the server. |
login
npx @vvibe/cli login --server=https://mcp.vvibe.ai- Discovers the server's OAuth authorization server (RFC 9728 / 8414).
- Registers a throwaway public client (RFC 7591 DCR) bound to a loopback
redirect URI on
127.0.0.1. - Opens your browser to the login page (and always prints the URL as a fallback — click it if the browser doesn't open).
- Runs the Authorization Code + PKCE (S256) flow on a local loopback server.
- Trades the short-lived OAuth token for a durable agent-connection token via
POST /api/agent-connections/exchange-token. - Saves the token to
~/.vvibe/credentials.json(mode600, best-effort). - Writes the MCP server into every detected agent's config, with the token as
an
Authorization: Bearerheader.
--server <url> MCP server URL (or set VVIBE_MCP_URL). Self-hosters use their host.
--agent <id> claude | cursor | codex | all (default: all detected)
--scope <where> user (global, default) | project (this folder)
--name <name> MCP server entry name (default: vvibe)
--merchant <id> Log in as this merchant, if you own more than one
--no-connect Log in only; don't write any agent config
--print-url Don't try to open a browser; just print the URL (SSH / remote)If you own several merchants, login prints the list and asks you to re-run
with --merchant=<id>.
One credential per account. Each vvibe login supersedes the previous
CLI credential for that merchant — it rotates the single long-lived token
rather than piling up new ones. So if you log in on machine B, machine A's
saved token stops working; just run vvibe login again on machine A to get a
fresh one. (Revoking the "VVibe CLI" connection from the dashboard also stops
it; a later login re-establishes access.)
connect
npx @vvibe/cli connect --server=https://mcp.vvibe.aiWires the MCP server into your agent's config and stops. The agent logs you in
through the browser the first time it uses the server. If you've already run
login for this server, connect reuses that saved token and configures a
ready-to-use headless connection instead.
| Agent | How it's wired | OAuth handled by |
|---|---|---|
| Claude Code | claude mcp add --transport http vvibe <url> (+ --header after login) | Claude Code, or the saved token |
| Cursor | mcpServers.vvibe = { url } in mcp.json (+ headers after login) | Cursor, or the saved token |
| Codex | [mcp_servers.vvibe] via mcp-remote in config.toml (+ --header after login) | mcp-remote, or the saved token |
--server <url> MCP server URL (or set VVIBE_MCP_URL)
--agent <id> claude | cursor | codex | all (default: all detected)
--scope <where> user (global, default) | project (this folder)
--name <name> MCP server entry name (default: vvibe)
--dry-run Print the changes without writinglogout
npx @vvibe/cli logoutForgets the saved login by deleting ~/.vvibe/credentials.json. Succeeds even
if you were never logged in. (It does not remove MCP entries already written
into agent configs — edit those with your agent's own tooling.)
Self-host
There is no baked-in server default — point the CLI at your own MCP host:
npx @vvibe/cli login --server=https://mcp.your-domain.com
# or
VVIBE_MCP_URL=https://mcp.your-domain.com npx @vvibe/cli loginBrowser login requires the server to have OAuth enabled (MCP_OAUTH_ENABLED=true
on both the web app and the MCP server). If it's off, login tells you how to
turn it on, or you can fall back to connect and the dashboard token-paste
flow.
Scope
This CLI only configures the MCP connection (and, with login, runs the OAuth
handshake once to mint the token). It does not run agents, dispatch
prompts, or hold any background process — for local agent execution see the
vvibe daemon (apps/daemon).
Develop
npm run dev -- login --server=https://mcp.vvibe.ai --print-url --no-connect # tsx, no build
npm run build # tsc → dist/
npm run typecheck
npm run check # URL guard + OAuth/PKCE self-checks