@aivin-labs/cli 1.0.13 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +325 -304
- package/bin/cli.mjs +97 -18
- package/bin/lib/localPreview.mjs +437 -0
- package/bin/lib/openFile.mjs +235 -0
- package/bin/lib/previewCache.mjs +71 -0
- package/bin/lib/remote/atomicFile.mjs +32 -0
- package/bin/lib/remote/autoStart.mjs +2 -1
- package/bin/lib/remote/autoUpdate.mjs +12 -0
- package/bin/lib/remote/callLedger.mjs +21 -0
- package/bin/lib/remote/cdpPolicy.mjs +14 -2
- package/bin/lib/remote/client.mjs +1024 -889
- package/bin/lib/remote/codingAgents.mjs +2 -2
- package/bin/lib/remote/constants.mjs +261 -251
- package/bin/lib/remote/credentials.mjs +81 -4
- package/bin/lib/remote/daemonLock.mjs +57 -17
- package/bin/lib/remote/desktop/castInput.mjs +98 -0
- package/bin/lib/remote/desktop/desktopCast.mjs +334 -198
- package/bin/lib/remote/desktop/desktopCastCaptureSource.mjs +598 -0
- package/bin/lib/remote/desktop/desktopCastSource.mjs +798 -514
- package/bin/lib/remote/desktop/desktopWebRtc.mjs +242 -95
- package/bin/lib/remote/desktop/fileAssociation.mjs +108 -0
- package/bin/lib/remote/desktop/index.mjs +21 -7
- package/bin/lib/remote/desktop/linuxTraySource.mjs +1 -8
- package/bin/lib/remote/desktop/macTraySource.mjs +0 -2
- package/bin/lib/remote/desktop/strings.mjs +28 -2
- package/bin/lib/remote/desktop/traySource.mjs +380 -16
- package/bin/lib/remote/desktop/webrtcRuntime.mjs +137 -0
- package/bin/lib/remote/desktop/webrtcWorker.mjs +181 -0
- package/bin/lib/remote/fileIndexer.mjs +30 -14
- package/bin/lib/remote/folderRules.mjs +3 -0
- package/bin/lib/remote/gitSafe.mjs +31 -0
- package/bin/lib/remote/gui/index.mjs +66 -24
- package/bin/lib/remote/gui/officeHostSource.mjs +635 -393
- package/bin/lib/remote/gui/windowsHost.mjs +3 -1
- package/bin/lib/remote/gui/windowsHostSource.mjs +291 -60
- package/bin/lib/remote/httpTransfer.mjs +64 -3
- package/bin/lib/remote/localPolicy.mjs +73 -7
- package/bin/lib/remote/mascot/ask.mjs +207 -42
- package/bin/lib/remote/mascot/askBlocksSource.mjs +286 -0
- package/bin/lib/remote/mascot/askHostSource.mjs +658 -530
- package/bin/lib/remote/mascot/blocks.mjs +201 -0
- package/bin/lib/remote/mascot/bot.mjs +26 -2
- package/bin/lib/remote/mascot/chartLayout.mjs +382 -0
- package/bin/lib/remote/mascot/diagramRender.mjs +154 -0
- package/bin/lib/remote/mascot/emojiSource.mjs +273 -0
- package/bin/lib/remote/mascot/fileChips.mjs +62 -0
- package/bin/lib/remote/mascot/hostSource.mjs +328 -49
- package/bin/lib/remote/mascot/hotkey.mjs +31 -7
- package/bin/lib/remote/mascot/images.mjs +111 -0
- package/bin/lib/remote/mascot/index.mjs +663 -493
- package/bin/lib/remote/mascot/lucideIcons.mjs +32 -0
- package/bin/lib/remote/mascot/mermaidBundle.mjs +28 -0
- package/bin/lib/remote/mascot/mood.mjs +57 -0
- package/bin/lib/remote/mascot/rigSource.mjs +643 -609
- package/bin/lib/remote/mascot/safeUrl.mjs +29 -0
- package/bin/lib/remote/mascot/strings.mjs +456 -375
- package/bin/lib/remote/mascot/ui.mjs +27 -7
- package/bin/lib/remote/multiUser.mjs +7 -2
- package/bin/lib/remote/notify.mjs +4 -1
- package/bin/lib/remote/office/index.mjs +12 -6
- package/bin/lib/remote/processes.mjs +5 -2
- package/bin/lib/remote/sandbox.mjs +26 -0
- package/bin/lib/remote/secretPaths.mjs +21 -0
- package/bin/lib/remote/tokenRotation.mjs +28 -0
- package/bin/lib/remote/toolHandlers.mjs +79 -15
- package/bin/lib/remote/watchBatcher.mjs +56 -0
- package/bin/lib/selfUpdate.mjs +12 -2
- package/bin/lib/update/binarySwap.mjs +15 -1
- package/bin/lib/update/state.mjs +10 -0
- package/docs/CLI.md +42 -1
- package/docs/media/aivin-ecosystem.jpg +0 -0
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,304 +1,325 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[
|
|
21
|
-
|
|
22
|
-
[
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- **AI Staff
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- **
|
|
44
|
-
|
|
45
|
-
- **
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
`
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
|
258
|
-
|
|
|
259
|
-
| `
|
|
260
|
-
| `
|
|
261
|
-
| `
|
|
262
|
-
| `
|
|
263
|
-
| `
|
|
264
|
-
| `
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
-
|
|
277
|
-
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
##
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# ⚡ @aivin-labs/cli
|
|
4
|
+
|
|
5
|
+
**The Command-Line Gateway to AIVIN Bot & The Agentic Ecosystem**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@aivin-labs/cli)
|
|
8
|
+
[](https://nodejs.org/)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
[](https://modelcontextprotocol.io)
|
|
11
|
+
[](#install-without-nodejs-connect-a-computer-to-aivin)
|
|
12
|
+
[](https://opensource.org/licenses/MIT)
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
Building an autonomous AI agent that does real work usually requires weeks of plumbing before business logic: servers, model routing, queues, auth, and sandboxes. <b>Aivin collapses that into minutes.</b>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
[The Aivin Ecosystem](#the-aivin-ecosystem) •
|
|
19
|
+
[AIVIN Bot in Action](#aivin-bot-capabilities-via-cli) •
|
|
20
|
+
[Architecture](#how-the-cli-powers-aivin-bot) •
|
|
21
|
+
[Installation](#install) •
|
|
22
|
+
[Quick Start](#quick-start) •
|
|
23
|
+
[Windows Mascot](#aivin-mascot-on-windows) •
|
|
24
|
+
[Command Reference](#command-overview)
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## The Aivin Ecosystem
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<img src="docs/media/aivin-ecosystem.jpg" alt="AIVIN Agentic Ecosystem Overview" width="800" />
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
`@aivin-labs/cli` is your day-to-day command center for interacting with **AIVIN Bot** and developing on the [Aivin Platform](https://aivin.cloud). Run `aivin init`, describe what you need in plain words, and get back a fully typed TypeScript project with a hot-reloading dev server, typed schemas, and single-command deployment to production.
|
|
37
|
+
|
|
38
|
+
Aivin is a modular, composable ecosystem for agentic software:
|
|
39
|
+
|
|
40
|
+
- **AIVIN Bot & AI Staff** — Persistent, goal-driven agents that reason over private data, use plugins as tools, and pause for human approval (HIL) mid-task.
|
|
41
|
+
- **Typed Plugins** — The core unit of work: a typed function (`main(mission, input, ctx)`) deployed in its own isolated container, searchable and callable by any agent across your organization.
|
|
42
|
+
- **Model Context Protocol (MCP)** — Wrap any [MCP](https://modelcontextprotocol.io) server's tools, resources, or prompts as first-class Aivin plugins with zero code (`aivin mcp <url>`).
|
|
43
|
+
- **Autonomous AI Browser** — A self-correcting agent driving a real browser (locally or server-side) with vision and DOM reasoning to accomplish tasks end-to-end (`aivin browser`).
|
|
44
|
+
- **Local Machine Supervised Execution** — Pair your local computer with AIVIN Bot (`aivin remote start`), allowing the bot to interact with logged-in web applications safely under explicit mission scopes.
|
|
45
|
+
- **Natural Language Automation** — Schedule recurring background tasks using plain English (`aivin do job "..."`) without ever touching cron syntax.
|
|
46
|
+
- **Plugin Marketplace** — Publish and share plugins or MCP proxies with team members or the public ecosystem (`aivin mcp <url> --publish`).
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## AIVIN Bot Capabilities via CLI
|
|
51
|
+
|
|
52
|
+
The CLI brings the full power of **AIVIN Bot** directly into your terminal workflows:
|
|
53
|
+
|
|
54
|
+
```mermaid
|
|
55
|
+
flowchart TD
|
|
56
|
+
CLIUser(["Terminal / Developer"]) --> Command["aivin CLI Commands"]
|
|
57
|
+
|
|
58
|
+
subgraph BotActions["AIVIN Bot Actions"]
|
|
59
|
+
Command -->|"aivin do [agent] [mission]"| AgentTask["AI Staff Goal Execution"]
|
|
60
|
+
Command -->|"aivin plugin ask [mission]"| AutoMatch["Auto-Pick & Execute Best Plugin"]
|
|
61
|
+
Command -->|"aivin browser [mission]"| WebTask["Autonomous Web Navigation"]
|
|
62
|
+
Command -->|"aivin do job [description]"| AutoJob["Natural Language Scheduled Cron"]
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
subgraph RemoteSupervision["Supervised Local Execution"]
|
|
66
|
+
Command -->|"aivin remote start"| RemoteTunnel["Secure Outbound Tunnel"]
|
|
67
|
+
RemoteTunnel --> LocalBrowser["Isolated Browser Profile (~/.aivin)"]
|
|
68
|
+
RemoteTunnel --> DesktopMascot["Windows Interactive Floating Mascot"]
|
|
69
|
+
RemoteTunnel --> CDPFilter["CDP Safety Filter: Block Local Files & Executables"]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
subgraph Extensibility["Zero-Code Tooling"]
|
|
73
|
+
Command -->|"aivin mcp <url>"| MCPProxy["Auto-Convert MCP Server to Plugin"]
|
|
74
|
+
Command -->|"aivin init <name>"| AIScaffold["AI-Generated Typed Plugin Project"]
|
|
75
|
+
Command -->|"aivin deploy"| Marketplace["Deploy to Organization / Marketplace"]
|
|
76
|
+
end
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 1. Goal-Driven Staff Agents (`aivin do`)
|
|
80
|
+
Dispatch an objective directly to an AI Staff agent. The agent breaks down the mission, queries relevant documents, invokes available plugins, and reports back:
|
|
81
|
+
```bash
|
|
82
|
+
aivin do researcher "Summarize key changes in our compliance policy and compare with last quarter"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 2. Autonomous AI Browser (`aivin browser`)
|
|
86
|
+
Drive a dedicated browser session locally or server-side:
|
|
87
|
+
```bash
|
|
88
|
+
aivin browser "Open site X, navigate to billing, and download the latest tax statement"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### 3. Natural Language Scheduled Automation (`aivin do job`)
|
|
92
|
+
Define recurring background tasks in plain English:
|
|
93
|
+
```bash
|
|
94
|
+
aivin do job "Every Monday at 9:00 AM, query pending PRs and notify our team Slack channel"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 4. Smart Plugin Matching (`aivin plugin ask`)
|
|
98
|
+
Pass an open-ended mission, and AIVIN Bot automatically searches your organization's catalog, selects the best-matching plugin, executes it with the required input, and prints the result:
|
|
99
|
+
```bash
|
|
100
|
+
aivin plugin ask "Convert the quarterly sales data in data.csv into an executive summary table"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## How the CLI Powers AIVIN Bot
|
|
106
|
+
|
|
107
|
+
```mermaid
|
|
108
|
+
sequenceDiagram
|
|
109
|
+
autonumber
|
|
110
|
+
actor Dev as Developer
|
|
111
|
+
participant CLI as aivin CLI
|
|
112
|
+
participant Cloud as AIVIN Platform / Bot
|
|
113
|
+
participant Browser as Local Browser Window
|
|
114
|
+
participant Target as Target Web / SaaS
|
|
115
|
+
|
|
116
|
+
Dev->>CLI: aivin remote start --code <code>
|
|
117
|
+
CLI->>Cloud: Authenticate and establish outbound tunnel
|
|
118
|
+
Cloud-->>CLI: Machine connected to AIVIN Bot
|
|
119
|
+
|
|
120
|
+
Dev->>Cloud: Assign web mission via Chat or CLI
|
|
121
|
+
Cloud->>CLI: Route browser action to paired computer
|
|
122
|
+
CLI->>Browser: Launch isolated profile with existing user cookies
|
|
123
|
+
Browser->>Target: Navigate and execute steps
|
|
124
|
+
opt Requires 2FA or Human Checkpoint
|
|
125
|
+
CLI->>Dev: Native desktop notification / Mascot alert
|
|
126
|
+
Dev->>Browser: Complete 2FA prompt
|
|
127
|
+
end
|
|
128
|
+
Browser->>Target: Finalize download or update
|
|
129
|
+
CLI-->>Cloud: Mission complete & report progress
|
|
130
|
+
Cloud-->>Dev: Return finalized result
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Install
|
|
136
|
+
|
|
137
|
+
### Global Installation via npm
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
npm install -g @aivin-labs/cli
|
|
141
|
+
aivin --version
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
> **Requirement**: Node.js **≥ 22.0.0**. The CLI leverages Node's native TypeScript execution to run `src/main.ts` directly with zero compile steps.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
### Install without Node.js (Connect a Computer to Aivin)
|
|
149
|
+
|
|
150
|
+
Self-contained standalone single-file binaries are available for every major operating system:
|
|
151
|
+
|
|
152
|
+
```powershell
|
|
153
|
+
# Windows 10/11 (PowerShell 5.1 or 7), x64 or ARM64
|
|
154
|
+
irm https://get.aivin.vn/install.ps1 | iex
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# macOS (Intel / Apple Silicon) and Linux (x64 / arm64)
|
|
159
|
+
curl -fsSL https://get.aivin.vn/install.sh | sh
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
| Platform | Binary Build |
|
|
163
|
+
| :--- | :--- |
|
|
164
|
+
| **Windows x64 / ARM64** | `aivin-windows-x64.exe` / `aivin-windows-arm64.exe` |
|
|
165
|
+
| **macOS Intel / Apple Silicon** | `aivin-darwin-x64` / `aivin-darwin-arm64` |
|
|
166
|
+
| **Linux glibc x64 / arm64** | `aivin-linux-x64` / `aivin-linux-arm64` |
|
|
167
|
+
| **Linux musl (Alpine)** | `aivin-linux-x64-musl` / `aivin-linux-arm64-musl` |
|
|
168
|
+
|
|
169
|
+
In Aivin Web, clicking **Chat box → Browser menu → Add this computer** prints a one-liner with a one-time pairing code (`aivin remote start --code <code>`).
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Quick Start
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# 1. Scaffold a new plugin and generate working code from description
|
|
177
|
+
aivin init invoice-parser
|
|
178
|
+
cd invoice-parser && npm install
|
|
179
|
+
|
|
180
|
+
# 2. Run locally with hot-reloading (gRPC server + HTTP test shim on :4001)
|
|
181
|
+
aivin start
|
|
182
|
+
|
|
183
|
+
# 3. Log in to Aivin Platform
|
|
184
|
+
aivin login
|
|
185
|
+
|
|
186
|
+
# 4. Verify on non-production instance
|
|
187
|
+
aivin test
|
|
188
|
+
|
|
189
|
+
# 5. Ship to your organization
|
|
190
|
+
aivin deploy
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Prefer a blank scaffold without AI-generated code? Use `aivin create my-plugin`.
|
|
194
|
+
Have an existing project you want to wrap? `aivin plugin convert` converts it in place.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Aivin Mascot on Windows
|
|
199
|
+
|
|
200
|
+
<p align="center">
|
|
201
|
+
<img src="docs/media/aivin-mascot-live.gif" alt="The live Aivin mascot showing chat, file drag, and attached-file states" width="480" />
|
|
202
|
+
</p>
|
|
203
|
+
|
|
204
|
+
When Aivin Remote is running on Windows, an interactive animated **Aivin Mascot** floats smoothly above your desktop windows:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
aivin remote start # start remote listener and show mascot
|
|
208
|
+
aivin ui # open mascot ask box
|
|
209
|
+
aivin ui --demo # preview all mascot animations
|
|
210
|
+
aivin remote mascot off # disable mascot persistently
|
|
211
|
+
aivin remote mascot on # re-enable mascot for next start
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
- **Visual State Indicators**: Displays real-time states (idle, working, thinking, waiting for approval, paused, offline, error).
|
|
215
|
+
- **Interactive Controls**: Click to open quick ask box, talk using live voice chat, or drag-and-drop local files directly onto the mascot to attach them to your next prompt.
|
|
216
|
+
- **Screen-Aware**: Automatically moves aside and hides itself during agent screenshot captures.
|
|
217
|
+
|
|
218
|
+
### How Remote Connects Aivin to Local Computers
|
|
219
|
+
|
|
220
|
+
<p align="center">
|
|
221
|
+
<img src="docs/media/aivin-remote-architecture.svg" alt="Aivin Platform routes authenticated work to listeners on selected computers; each listener applies local policy and returns progress and results" width="760" />
|
|
222
|
+
</p>
|
|
223
|
+
|
|
224
|
+
Each paired computer opens its own authenticated outbound connection to Aivin Platform. The platform routes a chat or mission to the selected computer; its listener applies local policy, requests approval for protected actions, runs the allowed local tools, and sends progress and results back. The mascot talks to the listener on the same computer—it is not a separate remote control channel.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## What You Get from a Scaffold
|
|
229
|
+
|
|
230
|
+
Every plugin scaffolded via `aivin init` or `aivin create` has a clear, standardized structure:
|
|
231
|
+
|
|
232
|
+
```text
|
|
233
|
+
my-plugin/
|
|
234
|
+
├── manifest.json # Identity, I/O JSON Schema, triggers & AI descriptions
|
|
235
|
+
├── src/
|
|
236
|
+
│ ├── main.ts # Typed entrypoint: main(mission, input, ctx)
|
|
237
|
+
│ └── service.ts # Core business logic generated by AIVIN Bot
|
|
238
|
+
├── package.json # Depends strictly on @aivin-labs/sdk
|
|
239
|
+
├── tsconfig.json # Native TypeScript execution config
|
|
240
|
+
├── AGENTS.md # Orientation guide for coding agents (Cursor, Claude Code)
|
|
241
|
+
├── test/ # Runnable integration tests with createMockSDK
|
|
242
|
+
└── .env # Local development overrides
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## Command Overview
|
|
248
|
+
|
|
249
|
+
| Command | Action |
|
|
250
|
+
| :--- | :--- |
|
|
251
|
+
| `aivin init [name]` | Scaffold a plugin **and** AI-generate working code from your description |
|
|
252
|
+
| `aivin create [name]` | Scaffold a clean, blank plugin project without AI code generation |
|
|
253
|
+
| `aivin validate` | Validate `manifest.json` schema without network calls |
|
|
254
|
+
| `aivin start` | Run plugin locally (gRPC server + `:4001` HTTP test shim) with hot reload |
|
|
255
|
+
| `aivin deploy` | Deploy the current plugin to your organization's workspace |
|
|
256
|
+
| `aivin test` | Deploy to a staging instance, run smoke tests, and print report |
|
|
257
|
+
| `aivin plugin search <query>` | Search your organization and public marketplace for reusable plugins |
|
|
258
|
+
| `aivin plugin ask [mission]` | Auto-select the best matching plugin and execute it against a mission |
|
|
259
|
+
| `aivin plugin trigger [mission] [input]` | Directly invoke a deployed plugin with payload and inspect output |
|
|
260
|
+
| `aivin plugin logs [pluginId]` | Stream live console output from a deployed plugin |
|
|
261
|
+
| `aivin connector` | Manage shared OAuth credentials and authentication namespaces |
|
|
262
|
+
| `aivin mcp <url>` | Scan any MCP server and instantly deploy all its tools as Aivin plugins |
|
|
263
|
+
| `aivin browser [mission]` | Launch an autonomous AI Browser mission driving a local or cloud browser |
|
|
264
|
+
| `aivin remote start` | Connect this computer to Aivin Platform with local CDP safety filters |
|
|
265
|
+
| `aivin ui` | Show the Windows desktop mascot or preview animations with `--demo` |
|
|
266
|
+
| `aivin do [agent] [mission]` | Dispatch a goal to an AI Staff agent to run in the background |
|
|
267
|
+
| `aivin do job [description]` | Create a recurring background automation job using plain English |
|
|
268
|
+
| `aivin task [description]` | Create, update, or track tasks within your active workspace |
|
|
269
|
+
| `aivin workspace` | Switch between organizations, workspaces, and projects |
|
|
270
|
+
| `aivin agent` | Search, install, create, or publish AI Staff agents |
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Relationship to @aivin-labs/sdk
|
|
275
|
+
|
|
276
|
+
- **`@aivin-labs/cli`** is developer tooling: It runs locally on your workstation or in CI environments. It is never bundled into your deployed container.
|
|
277
|
+
- **`@aivin-labs/sdk`** is the runtime library imported in code (`import { ai, vector, store } from '@aivin-labs/sdk'`). It provides the runtime server (`aivin-server`) executed inside deployed plugin containers.
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Environment Variables
|
|
282
|
+
|
|
283
|
+
| Variable | Target | Default |
|
|
284
|
+
| :--- | :--- | :--- |
|
|
285
|
+
| `SDK_ENDPOINT` | SDK gRPC connection | `sdk.aivin.cloud:443` |
|
|
286
|
+
| `AIVIN_BASE_URL` | API endpoints (`deploy`, `test`, `login`) | `https://api.aivin.cloud` |
|
|
287
|
+
| `AIVIN_WEB_URL` | Web dashboard & browser login | `https://brain.aivin.cloud` |
|
|
288
|
+
| `LOCAL_TEST_PORT` | Local test HTTP port (`aivin start`) | `4001` |
|
|
289
|
+
| `LOCAL_TEST_HOST` | Local test bind host | `127.0.0.1` |
|
|
290
|
+
| `AIVIN_SANDBOX_WORKER` | Isolated thread execution | `false` |
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Documentation
|
|
295
|
+
|
|
296
|
+
- [docs/AIVIN_MASCOT.md](docs/AIVIN_MASCOT.md) — The Windows desktop mascot: interactions, animations, shortcuts, privacy, and controls.
|
|
297
|
+
- [docs/GETTING_STARTED.md](docs/GETTING_STARTED.md) — Complete walkthrough: scaffold, develop, test, and deploy plugins and agents.
|
|
298
|
+
- [docs/CLI.md](docs/CLI.md) — Comprehensive command and flag reference manual.
|
|
299
|
+
- [docs/CHANGELOG.md](docs/CHANGELOG.md) — Version release history.
|
|
300
|
+
- [`@aivin-labs/sdk` Docs](https://github.com/aivin-labs/AIVIN-SDK/tree/main/docs) — Runtime SDK documentation (`ai`, `vector`, `store`).
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Development
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
npm install
|
|
308
|
+
npm run lint # eslint .
|
|
309
|
+
npm run format # prettier --write .
|
|
310
|
+
npm test # node --test test/cli.validate.test.mjs
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## License
|
|
316
|
+
|
|
317
|
+
MIT License. See [LICENSE](LICENSE) for details.
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
<div align="center">
|
|
322
|
+
|
|
323
|
+
Built for developers who want AI agents to do real, dependable work.
|
|
324
|
+
|
|
325
|
+
</div>
|