{"_id":"@aivin-labs/cli","_rev":"4-32f4f2983366becf749a266dc1b9b920","name":"@aivin-labs/cli","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@aivin-labs/cli","version":"1.0.0","keywords":["aivin","plugin","cli","sdk","scaffold"],"author":{"name":"Aivin Team"},"license":"MIT","_id":"@aivin-labs/cli@1.0.0","maintainers":[{"name":"aivinvn","email":"ai@aivin.vn"}],"homepage":"https://github.com/aivin-labs/cli#readme","bugs":{"url":"https://github.com/aivin-labs/cli/issues"},"bin":{"aivin":"bin/cli.mjs"},"dist":{"shasum":"12920cae6dc4e328ae6030e6808fdf4fa6da9ce8","tarball":"https://registry.npmjs.org/@aivin-labs/cli/-/cli-1.0.0.tgz","fileCount":22,"integrity":"sha512-TGLeVGxwiNxQxXemDKNGkYu2qa87OuEJyFMocvHL6TyATMcVero1db5p3pGjxf3OrO6frNKZmg7iSgK2TtvHLA==","signatures":[{"sig":"MEUCIQDdR/ns67DuznsHfUq6xj3ui6myYoLoTNpo5TYyJyyIUwIgSWr3npAREz+q4ZEo+H8t0t2xqAJ5PhxPcJJbbJ3RHnY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":408778},"type":"module","engines":{"node":">=22.0.0"},"gitHead":"b2ebd3637cf49495ae9c705325598e8726dd010b","scripts":{"lint":"eslint .","test":"node --test test/cli.validate.test.mjs","format":"prettier --write ."},"_npmUser":{"name":"aivinvn","email":"ai@aivin.vn"},"repository":{"url":"git+https://github.com/aivin-labs/cli.git","type":"git"},"_npmVersion":"11.6.2","description":"aivin CLI - scaffold, run, and deploy Aivin plugins built on @aivin-labs/sdk","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.0","axios":"^1.18.1","chalk":"^5.6.2","dotenv":"^17.4.2","inquirer":"^14.0.2","commander":"^15.0.0","@aivin-labs/sdk":"^1.1.0","socket.io-client":"^4.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.8.0","globals":"^17.7.0","prettier":"^3.9.6","@eslint/js":"^10.0.1","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/cli_1.0.0_1786590495678_0.6020333138273655","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aivin-labs/cli","version":"1.0.3","keywords":["aivin","plugin","cli","sdk","scaffold"],"author":{"name":"Aivin Team"},"license":"MIT","_id":"@aivin-labs/cli@1.0.3","maintainers":[{"name":"aivinvn","email":"ai@aivin.vn"}],"homepage":"https://github.com/aivin-labs/cli#readme","bugs":{"url":"https://github.com/aivin-labs/cli/issues"},"bin":{"aivin":"bin/cli.mjs"},"dist":{"shasum":"8f4c8ade695976ef7ad9b607dd5d73aa1f44d649","tarball":"https://registry.npmjs.org/@aivin-labs/cli/-/cli-1.0.3.tgz","fileCount":23,"integrity":"sha512-LDYem1qx6q1Q7ispEhtsOp7JC/Wa1aXmTotDQX7XA4MjTzgimoHP93RUKSfHLLct5DpYN7A5QDQafapFMbw8Mw==","signatures":[{"sig":"MEUCIEUnZE/7RK83ePPZiQv+kOniv3kTjgRGJV8zxmmQH2IuAiEAmMzLJnbbIyOPYv4iceqT/rInTf2k2fBx9xczhAI+9VA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":465918},"type":"module","engines":{"node":">=22.0.0"},"gitHead":"1ce48d2effa583484c07677f5930d780c8aadf0f","scripts":{"lint":"eslint .","test":"node --test test/cli.validate.test.mjs","format":"prettier --write ."},"_npmUser":{"name":"aivinvn","email":"ai@aivin.vn"},"repository":{"url":"git+https://github.com/aivin-labs/cli.git","type":"git"},"_npmVersion":"11.6.2","description":"aivin CLI - scaffold, run, and deploy Aivin plugins built on @aivin-labs/sdk","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.0","axios":"^1.18.1","chalk":"^5.6.2","dotenv":"^17.4.2","inquirer":"^14.0.2","commander":"^15.0.0","@aivin-labs/sdk":"^1.1.0","socket.io-client":"^4.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.8.0","globals":"^17.7.0","prettier":"^3.9.6","@eslint/js":"^10.0.1","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/cli_1.0.3_1786899053535_0.9140470357660717","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@aivin-labs/cli","version":"1.0.4","keywords":["aivin","plugin","cli","sdk","scaffold"],"author":{"name":"Aivin Team"},"license":"MIT","_id":"@aivin-labs/cli@1.0.4","maintainers":[{"name":"aivinvn","email":"ai@aivin.vn"}],"homepage":"https://github.com/aivin-labs/cli#readme","bugs":{"url":"https://github.com/aivin-labs/cli/issues"},"bin":{"aivin":"bin/cli.mjs"},"dist":{"shasum":"e7e309c7157c8b567363ff549a993ed3babdd3e8","tarball":"https://registry.npmjs.org/@aivin-labs/cli/-/cli-1.0.4.tgz","fileCount":24,"integrity":"sha512-/rfu55BiePqhr+Yd8zoevWSDGB5oS5OKDovZM3j+Lv5zowAWP7S2feMN91TZiyn8/Xy09vQLHGKh3xh1NvK0OQ==","signatures":[{"sig":"MEUCIGoIQafnAwdUrhFQyAxvqulcKNj1T0tklGU1pO9iUoIyAiEAvx/qb7p2tlb0en1aKwP7dQD+pfIv6UdOeaUqPFk1Wxw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":489255},"type":"module","engines":{"node":">=22.0.0"},"gitHead":"b4302527f1d8b7cf7a609d8e0e5e53571fb7d661","scripts":{"lint":"eslint .","test":"node --test test/cli.validate.test.mjs","format":"prettier --write ."},"_npmUser":{"name":"aivinvn","email":"ai@aivin.vn"},"repository":{"url":"git+https://github.com/aivin-labs/cli.git","type":"git"},"_npmVersion":"11.6.2","description":"aivin CLI - scaffold, run, and deploy Aivin plugins built on @aivin-labs/sdk","directories":{},"_nodeVersion":"24.12.0","dependencies":{"ws":"^8.18.0","ink":"^7.1.1","axios":"^1.18.1","chalk":"^5.6.2","react":"^19.2.8","dotenv":"^17.4.2","inquirer":"^14.0.2","commander":"^15.0.0","ink-text-input":"^6.0.0","@aivin-labs/sdk":"^1.1.2","socket.io-client":"^4.8.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.8.0","globals":"^17.7.0","prettier":"^3.9.6","@eslint/js":"^10.0.1","eslint-config-prettier":"^10.1.8"},"_npmOperationalInternal":{"tmp":"tmp/cli_1.0.4_1787147182391_0.9272991307772822","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@aivin-labs/cli","version":"1.0.5","description":"aivin CLI - scaffold, run, and deploy Aivin plugins built on @aivin-labs/sdk","type":"module","bin":{"aivin":"bin/cli.mjs"},"scripts":{"lint":"eslint .","format":"prettier --write .","test":"node --test test/cli.validate.test.mjs"},"keywords":["aivin","plugin","cli","sdk","scaffold"],"author":{"name":"Aivin Team"},"license":"MIT","dependencies":{"@aivin-labs/sdk":"^1.1.2","axios":"^1.18.1","chalk":"^5.6.2","commander":"^15.0.0","dotenv":"^17.4.2","ink":"^7.1.1","ink-text-input":"^6.0.0","inquirer":"^14.0.2","react":"^19.2.8","socket.io-client":"^4.8.3","ws":"^8.18.0"},"devDependencies":{"@eslint/js":"^10.0.1","eslint":"^10.8.0","eslint-config-prettier":"^10.1.8","globals":"^17.7.0","prettier":"^3.9.6"},"publishConfig":{"access":"public"},"engines":{"node":">=22.0.0"},"repository":{"type":"git","url":"git+https://github.com/aivin-labs/cli.git"},"bugs":{"url":"https://github.com/aivin-labs/cli/issues"},"homepage":"https://github.com/aivin-labs/cli#readme","gitHead":"7ffba11a389e9f4f52ed32a96878a8cc33a48403","_id":"@aivin-labs/cli@1.0.5","_nodeVersion":"24.12.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-PG/xhD4hXFvH1l8GNRaI8hToJGoZJv6+C7CTVgHO/LBdJJeDLw0M0BXS3TtprSgSJV85DROImmwsvLBEr9/C8Q==","shasum":"3fbae372a054305d5f8131fdec0c4ee622160dbd","tarball":"https://registry.npmjs.org/@aivin-labs/cli/-/cli-1.0.5.tgz","fileCount":25,"unpackedSize":521925,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCkv3hOV15ZUne4f6G+1M+HRir7nkJRS4uw/FNQ7bmCHgIhAOju178HYkKckIDxe5j4c/HDebq70GGWhDj2mW5Mvp7b"}]},"_npmUser":{"name":"aivinvn","email":"ai@aivin.vn"},"directories":{},"maintainers":[{"name":"aivinvn","email":"ai@aivin.vn"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_1.0.5_1787377555750_0.13043691175203653"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T03:08:15.572Z","modified":"2026-08-22T05:45:56.071Z","1.0.0":"2026-08-13T03:08:15.807Z","1.0.3":"2026-08-16T16:50:53.693Z","1.0.4":"2026-08-19T13:46:22.558Z","1.0.5":"2026-08-22T05:45:55.904Z"},"bugs":{"url":"https://github.com/aivin-labs/cli/issues"},"author":{"name":"Aivin Team"},"license":"MIT","homepage":"https://github.com/aivin-labs/cli#readme","keywords":["aivin","plugin","cli","sdk","scaffold"],"repository":{"type":"git","url":"git+https://github.com/aivin-labs/cli.git"},"description":"aivin CLI - scaffold, run, and deploy Aivin plugins built on @aivin-labs/sdk","maintainers":[{"name":"aivinvn","email":"ai@aivin.vn"}],"readme":"# @aivin-labs/cli\n\nBuilding an AI agent that does real work — one that calls an LLM, reasons over your data, uses\ntools, and knows when to hand a decision back to a human — usually means weeks of infrastructure\nbefore you write a single line of business logic: a service to host it, an SDK to wire the model\ncalls, auth, queues, logging, a deploy pipeline. [Aivin](https://aivin.cloud) exists to collapse\nthat. Describe what you want built, and get back a real, typed, callable, observable service in\nminutes — not sprints.\n\n`@aivin-labs/cli` is your entry point into that platform, and your main tool for working inside\nthe Aivin ecosystem day to day. Instead of hand-rolling a service, you run `aivin init`, describe\nwhat the plugin should do, and get a real, deployable TypeScript project — hot-reloading local dev\nserver, typed input/output, and a one-command path to production included. Everything after that —\ntesting, logs, connectors, MCP integrations, agents, automation — is one more `aivin` command\naway, so you can build agentic applications that plug straight into the platform without ever\nleaving your terminal or editor.\n\nThis package is the interactive tooling only; the plugin runtime library your generated code\nactually imports at runtime is\n[`@aivin-labs/sdk`](https://www.npmjs.com/package/@aivin-labs/sdk) (`ai`, `vector`, `store`, ...),\ninstalled automatically as a dependency of every project this CLI scaffolds. See\n[Relationship to @aivin-labs/sdk](#relationship-to-aivin-labssdk) below for how the two packages\ndivide responsibilities.\n\n## The Aivin ecosystem\n\nAivin isn't just a place to host one function — it's a small, composable ecosystem for agentic\nsoftware, and this CLI is how you reach every piece of it:\n\n- **Plugins** — the core unit of work: a typed function (`main(mission, input, ctx)`), deployed as\n  its own container, callable by name, and searchable by every other plugin or agent in your org\n  (`aivin plugin search`, `call()` from the SDK). Write one by hand (`aivin create`), have AI\n  generate it from a description (`aivin init` / `aivin plugin make`), or convert an existing\n  project into one in place (`aivin plugin convert`).\n- **MCP proxies** — wrap any [Model Context Protocol](https://modelcontextprotocol.io) server's\n  tools, resources, or prompts as first-class Aivin plugins with zero code (`aivin mcp <url>`),\n  so the growing MCP ecosystem becomes instantly usable by your agents.\n- **Connectors** — shared OAuth apps and credential namespaces (`aivin connector`), so ten plugins\n  that all need \"the org's Slack\" don't each prompt the user for a separate login.\n- **AI Staff agents** — persistent, nameable agents you target with a mission, that use your\n  plugins as tools and can pause to ask a human for input mid-task (HIL). Install one from the\n  marketplace or build your own (`aivin agent`, `aivin do`).\n- **Automation jobs** — recurring, scheduled work described in plain language\n  (`aivin do job \"...\"`) — no cron syntax to write.\n- **AI Browser** — a self-correcting agent that drives a real browser, yours or a server-side one,\n  to complete a goal end-to-end (`aivin browser`).\n- **Workspaces, projects, and tasks** — the organizing structure everything above lives in, plus a\n  lightweight task tracker (`aivin task`) for the human side of the work.\n- **Plugin Marketplace** — plugins and MCP proxies you build here aren't limited to your own org:\n  submit them for community review and publish to Aivin's public Plugin Marketplace\n  (`aivin mcp <url> --publish`), so the AI capabilities you develop become reusable building\n  blocks other teams on the platform can search for and call, not just your own.\n- **Local, agent-supervised execution** — this CLI is also how Aivin reaches onto *your* machine to\n  get real work done, always under an explicit mission and never as open-ended remote access:\n  `aivin browser` drives a dedicated local browser profile (your own cookies/logins, isolated from\n  your daily-driver browser) so an agent can act on real logged-in sites, and `aivin start` can run\n  your plugin code inside a sandboxed `worker_threads.Worker` (`AIVIN_SANDBOX_WORKER=true`) with no\n  direct access to secrets or the filesystem. Every run stays scoped to the mission that started\n  it, with human-in-the-loop checkpoints (HIL) whenever an agent needs your go-ahead.\n\nPut together: you describe the outcome you want, and Aivin's building blocks — plugins, agents,\nconnectors, MCP tools — compose into it. `aivin` is how you author, test, and ship each of those\npieces from your own terminal, on top of whatever editor/CI workflow you already use.\n\n## Table of contents\n\n- [The Aivin ecosystem](#the-aivin-ecosystem)\n- [Install](#install)\n- [Quick start](#quick-start)\n- [What you get from a scaffold](#what-you-get-from-a-scaffold)\n- [Command overview](#command-overview)\n- [Environment variables](#environment-variables)\n- [Documentation](#documentation)\n- [Relationship to @aivin-labs/sdk](#relationship-to-aivin-labssdk)\n- [Development](#development)\n- [License](#license)\n\n## Install\n\n```bash\nnpm install -g @aivin-labs/cli\naivin --version\n```\n\nRequires Node.js ≥ 22.0.0 — the SDK relies on Node's native TypeScript execution to load\n`src/main.ts` directly, with no separate build step. `aivin start`/`aivin test` check this up\nfront and fail with a clear message (not a cryptic loader error) if your Node is too old.\n\n## Quick start\n\n```bash\naivin init my-plugin          # ask what the plugin should do, scaffold + generate working code\ncd my-plugin && npm install\n\naivin start                   # run it locally - gRPC server + an HTTP test shim on :4001\n\naivin login                   # save an API key (once per machine)\naivin test                    # verify on a non-production instance first\naivin deploy                  # ship it\n```\n\n`aivin init` asks what the plugin should do, then scaffolds the project **and** generates real\nworking code from that description in one step. Prefer a blank scaffold you write by hand?\n`aivin create my-plugin` does just the scaffolding, no AI step. Already have a project instead of\na description? `aivin plugin convert` turns an existing directory into a plugin in place.\n\n## What you get from a scaffold\n\nBoth `aivin init` and `aivin create` produce the same project shape (`init` additionally writes\n`src/service.ts` — see [CLI.md](docs/CLI.md#aivin-init-name)):\n\n```\nmy-plugin/\n├── manifest.json    # shared fields + plugins[] - identity, input/output schema, triggers\n├── src/\n│   └── main.ts        # (+ service.ts, if you used `aivin init`)\n├── package.json      # depends only on @aivin-labs/sdk; \"start\" runs `aivin-server` directly\n├── tsconfig.json      # editor/type-checking config, not used to build anything at deploy time\n├── AGENTS.md          # orientation for a coding agent (Claude Code, Cursor, ...) in this project\n├── test/              # a real, runnable example test using createMockSDK\n├── .env                # local-only config (SDK_ENDPOINT, etc.)\n└── .gitignore\n```\n\n`manifest.json`'s `description` is what the AI planner reads to decide when to use your plugin —\nfill it in precisely. Full field reference lives in\n[MANIFEST.md (sdk repo)](https://github.com/aivin-labs/AIVIN-SDK/blob/main/docs/MANIFEST.md).\n\n## Command overview\n\nEvery command supports `--help` for its full flag list (`aivin <command> --help`). This table is\na map — see [docs/CLI.md](docs/CLI.md) for the complete reference, including exact flags,\nexamples, and behavior notes for each one.\n\n| Command | What it does |\n| --- | --- |\n| `aivin init [name]` | Scaffold a plugin **and** AI-generate its code from a description, in one step |\n| `aivin create [name]` | Scaffold a blank plugin project, no AI step |\n| `aivin validate` | Validate `manifest.json` (or `--json`/`--stdin`) without touching the network |\n| `aivin start` | Run the plugin locally (real gRPC server + `:4001` HTTP test shim), with hot-reload |\n| `aivin deploy` | Deploy the current plugin to your org |\n| `aivin test` | Deploy to a non-production instance, then smoke-test it and save a report |\n| `aivin plugin search <query>` | Search the platform's plugin ecosystem for something to reuse |\n| `aivin plugin info <id>` | Show one plugin's detail directly by id, no search query needed |\n| `aivin plugin ask [mission]` | One-shot: auto-pick the best-matching plugin for a mission and trigger it, like an agent would |\n| `aivin plugin make <description>` | AI-generate `src/main.ts` from a natural-language description |\n| `aivin plugin convert [hint]` | Turn an existing project in the current directory into a plugin |\n| `aivin plugin trigger [mission] [input]` | Invoke a deployed plugin for real and print the result |\n| `aivin plugin logs [pluginId]` | Tail a deployed plugin's live console output |\n| `aivin connector` | Register/search/list reusable OAuth or credential-form connectors |\n| `aivin pluginstore` | Attach a self-hosted `aivin-service` worker to your org as a plugin store |\n| `aivin mcp <url>` | Scan an MCP server and convert everything it finds into deployed plugin(s) |\n| `aivin mcp create <name>` | Scaffold a single manifest-only plugin that proxies one MCP tool/resource/prompt |\n| `aivin login [baseUrl]` | Log in and save an API key for this machine (browser flow by default) |\n| `aivin whoami` | Show which account is logged in on this machine |\n| `aivin key` | Manage named API keys (`gen` / `revoke` / `list`) for your account |\n| `aivin browser [mission]` | Run an AI Browser mission, driving a real local or server-side browser |\n| `aivin do [agentNickname] [mission]` | Have an AI Staff agent work toward a goal in the background |\n| `aivin do job [description]` | Create a recurring automation job from a plain-language description |\n| `aivin task [description]` | Create, list, get, update, or delete tasks in a project |\n| `aivin workspace` | Browse your workspaces/projects and pick one for `--workspace`/`--project` |\n| `aivin agent` | Search, install, create, and publish AI Staff agents |\n| `aivin project` | Create, rename, and delete projects within a workspace |\n\n## Environment variables\n\nMost projects never need any of these — `aivin login` saves your key once, machine-wide, and\nsensible defaults cover local development. Set them in a project's `.env` (or your shell) to\noverride:\n\n| Variable | Used by | Default |\n| --- | --- | --- |\n| `SDK_ENDPOINT` | SDK calls, `aivin start` | `sdk.aivin.cloud:443` |\n| `AIVIN_BASE_URL` | `deploy`, `test`, `plugin make/convert/trigger`, `login --basic` | `https://api.aivin.cloud` |\n| `AIVIN_WEB_URL` | `login` (browser flow) | `https://brain.aivin.cloud` |\n| `LOCAL_TEST_PORT` | `aivin start` | `4001` |\n| `LOCAL_TEST_HOST` | `aivin start` | `127.0.0.1` (loopback-only — `/invoke` has no auth) |\n| `AIVIN_SANDBOX_WORKER` | `aivin start`, deployed containers | `false` |\n\nFull descriptions and when you'd actually touch each one: [CLI.md#environment-variables](docs/CLI.md#environment-variables).\n\n## Documentation\n\n- [docs/GETTING_STARTED.md](docs/GETTING_STARTED.md) — the full narrative walkthrough: scaffold,\n  write, test, deploy, and use a plugin from the CLI, plus everything else `aivin` drives (tasks,\n  AI Browser missions, workspaces, agents).\n- [docs/CLI.md](docs/CLI.md) — every command, flag, and environment variable, for lookup.\n- [docs/CHANGELOG.md](docs/CHANGELOG.md) — release history.\n- [`@aivin-labs/sdk`'s own docs](https://github.com/aivin-labs/AIVIN-SDK/tree/main/docs) — the SDK\n  API your plugin code calls (`ai`, `vector`, `store`, ...), `manifest.json`'s field reference, and\n  `ctx`. This package doesn't duplicate that content.\n\n## Relationship to @aivin-labs/sdk\n\n- **This package (`@aivin-labs/cli`)** is dev tooling: it never runs inside a deployed plugin\n  container, only on your machine (or CI). Its own `aivin --version` is independent of whatever\n  `@aivin-labs/sdk` version a given plugin project has installed.\n- **`@aivin-labs/sdk`** is the runtime library (`import { ai, ... } from '@aivin-labs/sdk'`) and\n  also ships `bin/server.mjs` (exposed as the `aivin-server` binary) — the actual process a\n  deployed plugin container runs via `npm start`. `aivin start`/`aivin test` resolve and run this\n  binary from the **current project's own** installed `@aivin-labs/sdk`, not from this CLI's\n  install location, so a scaffolded project's `package.json` depends on `@aivin-labs/sdk` directly\n  and never needs this CLI package installed inside the container.\n\n## Development\n\n```bash\nnpm install\nnpm run lint      # eslint .\nnpm run format    # prettier --write .\nnpm test          # node --test test/cli.validate.test.mjs\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}