Lines 1-63javascript
2// vaaya — zero-dependency launcher for the Vaaya agent gateway.
4// All real logic lives in @vaaya/mcp; this shim resolves and runs it via npx
5// pinned to @latest so every invocation uses the current release (npx's plain
6// cache-hit path would otherwise happily run a stale version forever).
8import { spawnSync } from 'node:child_process'
9import { createRequire } from 'node:module'
HighChild Process
Package source references child process execution.
bin/vaaya.mjsView on unpkg · L7 11const { version } = createRequire(import.meta.url)('../package.json')
13const HELP = `vaaya ${version} — give your agent paid superpowers (https://vaaya.ai)
16 vaaya install Set up the Vaaya MCP server for every agent detected on
17 this machine (Claude Code, Claude Desktop, Cursor,
18 Codex). Idempotent — re-run any time to update.
19 vaaya status Show connection state and live tool count.
20 vaaya consult "..." Ask Vaaya how it would do something — returns the plan
21 (the exact calls an agent would run) without running them.
22 vaaya reauthorize Re-run the browser authorization flow.
23 vaaya logout Disconnect and delete local credentials.
24 vaaya serve Run the stdio MCP server (what agents invoke).
25 vaaya help Show this help.
27What agents get: media & video generation, product demo videos, web search &
34const KNOWN = new Set(['install', 'status', 'consult', 'reauthorize', 'logout', 'serve'])
36const [cmd, ...rest] = process.argv.slice(2)
38if (!cmd || cmd === 'help' || cmd === '--help' || cmd === '-h') {
42if (cmd === '--version' || cmd === '-v') {
47 console.error(`vaaya: unknown command "${cmd}"\n`)
52// `serve` means "run the MCP stdio server", which is @vaaya/mcp's no-arg mode.
53const args = cmd === 'serve' ? rest : [cmd, ...rest]
54const result = spawnSync('npx', ['-y', '@vaaya/mcp@latest', ...args], {
55 stdio: 'inherit',
HighRuntime Package Install
Package source invokes a package manager install command at runtime.
bin/vaaya.mjsView on unpkg · L53 56 shell: process.platform === 'win32',
57})
HighSandbox Evasion Gated Capability
Source gates dangerous network, credential, or execution behavior behind CI, host, platform, time, or geo fingerprint checks.
bin/vaaya.mjsView on unpkg · L7 59 console.error(`vaaya: failed to run @vaaya/mcp via npx: ${result.error.message}`)
62process.exit(result.status ?? 0)