advai-cli 1.0.4__tar.gz → 1.0.7__tar.gz

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.
Files changed (33) hide show
  1. advai_cli-1.0.7/LICENSE +21 -0
  2. advai_cli-1.0.7/PKG-INFO +541 -0
  3. advai_cli-1.0.7/README.md +518 -0
  4. advai_cli-1.0.7/advai/__init__.py +1 -0
  5. advai_cli-1.0.7/advai/ai_client.py +188 -0
  6. advai_cli-1.0.7/advai/browser_bridge.py +262 -0
  7. advai_cli-1.0.7/advai/cli.py +1413 -0
  8. advai_cli-1.0.7/advai/cli_manager.py +510 -0
  9. advai_cli-1.0.7/advai/kb.py +172 -0
  10. advai_cli-1.0.7/advai/skill_platforms.py +624 -0
  11. advai_cli-1.0.7/advai/skills.py +583 -0
  12. advai_cli-1.0.7/advai/tui.py +427 -0
  13. advai_cli-1.0.7/advai_cli.egg-info/PKG-INFO +541 -0
  14. {advai_cli-1.0.4 → advai_cli-1.0.7}/advai_cli.egg-info/SOURCES.txt +12 -1
  15. advai_cli-1.0.7/pyproject.toml +36 -0
  16. advai_cli-1.0.7/tests/test_ai_client.py +524 -0
  17. advai_cli-1.0.7/tests/test_browser_bridge.py +202 -0
  18. advai_cli-1.0.7/tests/test_metadata.py +36 -0
  19. advai_cli-1.0.7/tests/test_skill_platforms.py +109 -0
  20. advai_cli-1.0.7/tests/test_tui.py +39 -0
  21. advai_cli-1.0.4/PKG-INFO +0 -52
  22. advai_cli-1.0.4/README.md +0 -42
  23. advai_cli-1.0.4/advai/__init__.py +0 -1
  24. advai_cli-1.0.4/advai/cli.py +0 -260
  25. advai_cli-1.0.4/advai/cli_manager.py +0 -253
  26. advai_cli-1.0.4/advai/skills.py +0 -74
  27. advai_cli-1.0.4/advai_cli.egg-info/PKG-INFO +0 -52
  28. advai_cli-1.0.4/pyproject.toml +0 -21
  29. {advai_cli-1.0.4 → advai_cli-1.0.7}/advai_cli.egg-info/dependency_links.txt +0 -0
  30. {advai_cli-1.0.4 → advai_cli-1.0.7}/advai_cli.egg-info/entry_points.txt +0 -0
  31. {advai_cli-1.0.4 → advai_cli-1.0.7}/advai_cli.egg-info/requires.txt +0 -0
  32. {advai_cli-1.0.4 → advai_cli-1.0.7}/advai_cli.egg-info/top_level.txt +0 -0
  33. {advai_cli-1.0.4 → advai_cli-1.0.7}/setup.cfg +0 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 advai-x
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,541 @@
1
+ Metadata-Version: 2.4
2
+ Name: advai-cli
3
+ Version: 1.0.7
4
+ Summary: CLI for browser automation, skills, and external CLIs.
5
+ Author: advai
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Advai-X/advai-cli
8
+ Project-URL: Repository, https://github.com/Advai-X/advai-cli
9
+ Project-URL: Issues, https://github.com/Advai-X/advai-cli/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.8
12
+ Classifier: Programming Language :: Python :: 3.9
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Environment :: Console
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Requires-Dist: click>=8.1
22
+ Dynamic: license-file
23
+
24
+ <p align="center">
25
+ <img src="docs/assets/hero.png" alt="advai-cli hero" width="100%" />
26
+ </p>
27
+
28
+ <h1 align="center">advai-cli</h1>
29
+
30
+ <p align="center">
31
+ A unified CLI for local skills, browser automation, external CLIs, and terminal AI chat.
32
+ </p>
33
+
34
+ <p align="center">
35
+ <a href="https://github.com/Advai-X/advai-cli/actions/workflows/ci.yml"><img src="https://github.com/Advai-X/advai-cli/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
36
+ <a href="https://pypi.org/project/advai-cli/"><img src="https://img.shields.io/pypi/v/advai-cli" alt="PyPI Version" /></a>
37
+ <a href="https://www.npmjs.com/package/advai-cli"><img src="https://img.shields.io/npm/v/advai-cli" alt="npm Version" /></a>
38
+ <a href="https://pypi.org/project/advai-cli/"><img src="https://img.shields.io/pypi/pyversions/advai-cli" alt="Python Versions" /></a>
39
+ <a href="LICENSE"><img src="https://img.shields.io/pypi/l/advai-cli" alt="License" /></a>
40
+ <a href="https://github.com/Advai-X/advai-cli/stargazers"><img src="https://img.shields.io/github/stars/Advai-X/advai-cli?style=flat" alt="GitHub stars" /></a>
41
+ <a href="https://github.com/Advai-X/advai-cli/issues"><img src="https://img.shields.io/github/issues/Advai-X/advai-cli" alt="GitHub issues" /></a>
42
+ </p>
43
+
44
+ <p align="center">
45
+ <a href="#why-advai-cli">Why</a> •
46
+ <a href="#installation">Installation</a> •
47
+ <a href="#quick-start">Quick Start</a> •
48
+ <a href="#browser-automation">Browser</a> •
49
+ <a href="#common-commands">Commands</a> •
50
+ <a href="#ai-tui">AI TUI</a> •
51
+ <a href="#development">Development</a>
52
+ </p>
53
+
54
+ `advai-cli` is a unified command-line interface for managing local skills, driving a Chrome extension-backed browser bridge, working with external CLIs, and chatting with AI from the terminal through a single `advai` entrypoint.
55
+
56
+ It is designed as a lightweight Python-first core with npm and Homebrew distribution options, making it easy to install in different developer environments while keeping the runtime model simple, local-first, and predictable.
57
+
58
+ ## Why advai-cli
59
+
60
+ - One entrypoint for runtime inspection, local skill management, external CLI workflows, and terminal-native AI chat
61
+ - Chrome extension-backed browser automation through `advai browser`
62
+ - Python core for a small, dependency-light implementation
63
+ - npm wrapper for teams that prefer JavaScript-based distribution
64
+ - Homebrew formula for macOS-friendly installation
65
+ - OpenAI-compatible backend support for flexible AI provider integration
66
+ - Local-first state stored under `~/.advai`
67
+
68
+ ## Highlights
69
+
70
+ - Inspect the current installation, runtime, and recommended update command with `advai info` and `advai update`
71
+ - Manage locally installed skills with install, list, info, update, and uninstall commands
72
+ - Sync installed skills into platform-specific agent directories such as Cursor, Claude Code, Codex, TRAE, and more
73
+ - Open, inspect, extract, and automate browser sessions with `advai browser`
74
+ - Discover and install supported third-party CLIs through the OpenCLI ecosystem
75
+ - Create local knowledge bases, add documents, search content, and resync from source files
76
+ - Proxy supported external CLIs through `advai cli <name> ...`
77
+ - Launch a terminal chat UI with configurable model, base URL, system prompt, and transcript export
78
+
79
+ ## Architecture
80
+
81
+ ```mermaid
82
+ flowchart LR
83
+ U[Developer] --> A[advai command]
84
+
85
+ subgraph Distribution
86
+ P[PyPI package]
87
+ N[npm wrapper]
88
+ B[Homebrew formula]
89
+ end
90
+
91
+ P --> A
92
+ N --> A
93
+ B --> A
94
+
95
+ A --> C[Python CLI core]
96
+ C --> S[Local Skills Manager]
97
+ C --> BB[Browser Bridge]
98
+ C --> O[OpenCLI Bridge]
99
+ C --> T[Terminal TUI]
100
+ C --> I[Runtime Inspection]
101
+
102
+ S --> FS[~/.advai/skills]
103
+ BB --> BSD[~/.advai/browser]
104
+ BB --> EXT[Browser extension + local daemon]
105
+ T --> API[OpenAI-compatible API]
106
+ O --> OC[opencli binary]
107
+ ```
108
+
109
+ ## Installation
110
+
111
+ ### Requirements
112
+
113
+ - Python `3.8+`
114
+ - Node.js `14+` only if you install through npm
115
+ - A local Python runtime is still required when using the npm package
116
+ - `opencli` is required only for external CLI discovery, install, and passthrough execution
117
+ - A compatible browser extension package is required only if you want to use `advai browser`
118
+
119
+ ### Install from PyPI
120
+
121
+ ```bash
122
+ pip install advai-cli
123
+ ```
124
+
125
+ ### Install from npm
126
+
127
+ ```bash
128
+ npm install -g advai-cli
129
+ ```
130
+
131
+ The npm package creates a private Python virtual environment during `postinstall`
132
+ and installs the matching `advai-cli` version from PyPI into that environment.
133
+
134
+ ### Install from Homebrew
135
+
136
+ ```bash
137
+ brew tap Advai-X/tap
138
+ brew install advai-cli
139
+ ```
140
+
141
+ ### Install with the bootstrap script
142
+
143
+ ```bash
144
+ ./install.sh
145
+ ```
146
+
147
+ ## Quick Start
148
+
149
+ ### 1. Verify the installation
150
+
151
+ ```bash
152
+ advai --help
153
+ advai info
154
+ ```
155
+
156
+ ### 2. Configure AI access
157
+
158
+ ```bash
159
+ export ADVAI_API_KEY=your_api_key
160
+ ```
161
+
162
+ ### 3. Start the terminal chat UI
163
+
164
+ ```bash
165
+ advai tui
166
+ ```
167
+
168
+ ### 4. Explore local skills and external CLIs
169
+
170
+ ```bash
171
+ advai skill list
172
+ advai cli list
173
+ ```
174
+
175
+ ### 5. Verify browser automation
176
+
177
+ ```bash
178
+ advai browser doctor
179
+ advai browser open demo https://example.com
180
+ advai browser exec demo "document.title"
181
+ ```
182
+
183
+ ## Browser Automation
184
+
185
+ `advai browser` provides a Chrome extension-backed automation layer for opening pages, executing JavaScript, waiting for selectors, interacting with inputs, reading network events, and taking screenshots.
186
+
187
+ ### What it uses
188
+
189
+ - `advai-cli` provides the command surface and browser bridge client
190
+ - A companion browser extension package provides the Chrome extension and local daemon
191
+ - Browser bridge state is stored under `~/.advai/browser`
192
+ - The current release uses a fixed internal extension context for browser routing
193
+
194
+ ### Setup
195
+
196
+ 1. Install the companion browser support package into the same Python environment as `advai-cli`
197
+ 2. Install the Chrome extension from the [Chrome Web Store](https://chromewebstore.google.com/detail/advai-cli/fnjeefdjpejiifogeplommidekkbpopn?hl=zh-CN&utm_source=ext_sidebar)
198
+ 3. Open the extension once in Chrome to complete the first-run setup
199
+ 4. Sign in to any sites you want to automate in that browser context
200
+ 5. Run `advai browser doctor` to confirm the daemon and extension are reachable
201
+
202
+ If the daemon is not already running, browser commands can auto-start it when the companion browser support package is installed in the active Python environment.
203
+
204
+ ### Core workflow
205
+
206
+ ```bash
207
+ advai browser doctor
208
+ advai browser open demo https://example.com
209
+ advai browser wait demo --selector "h1"
210
+ advai browser exec demo "document.title"
211
+ advai browser type demo "#search" "advai browser"
212
+ advai browser click demo "button[type=submit]"
213
+ advai browser screenshot demo --output page.png
214
+ ```
215
+
216
+ ### Common browser commands
217
+
218
+ | Command | Description |
219
+ | --- | --- |
220
+ | `advai browser doctor` | Show daemon status, selected context, and connected extensions |
221
+ | `advai browser extensions` | List connected extension contexts |
222
+ | `advai browser open <session> <url>` | Open a URL in a named browser session |
223
+ | `advai browser navigate <session> <url>` | Navigate the current page |
224
+ | `advai browser state <session>` | Show the current session state |
225
+ | `advai browser exec <session> "<js>"` | Execute JavaScript in the current page |
226
+ | `advai browser wait <session> --selector <css>` | Wait until a selector exists |
227
+ | `advai browser click <session> <selector>` | Click an element |
228
+ | `advai browser type <session> <selector> <text>` | Type text into an input |
229
+ | `advai browser get <session> [--selector <css>]` | Read page or element details |
230
+ | `advai browser extract <session> [code]` | Extract structured data from the page |
231
+ | `advai browser screenshot <session> --output <file>` | Save a screenshot to disk |
232
+ | `advai browser tabs list <session>` | List tabs for a session |
233
+ | `advai browser network start <session> --pattern <text>` | Start network capture |
234
+ | `advai browser network read <session>` | Read captured network events |
235
+
236
+ ### Notes
237
+
238
+ - Browser sessions are named explicitly, such as `demo`, `zhihu`, or `checkout-flow`
239
+ - Commands wait for the active internal browser context before sending automation actions
240
+ - The browser bridge is local-first and does not require a remote automation service
241
+ - If `doctor` reports that browser support is missing, install the companion browser extension package into the same Python environment as `advai-cli`
242
+
243
+ ## Common Commands
244
+
245
+ These are the canonical commands to use in docs, screenshots, and promotional assets:
246
+
247
+ ```bash
248
+ advai info
249
+ advai browser doctor
250
+ advai browser open demo https://example.com
251
+ advai skill list
252
+ advai cli list
253
+ advai tui
254
+ ```
255
+
256
+ | Command | Description |
257
+ | --- | --- |
258
+ | `advai --help` | Show the main command help |
259
+ | `advai info` | Show runtime, installation, and environment details |
260
+ | `advai update` | Print the recommended update command for the current install method |
261
+ | `advai browser doctor` | Show browser bridge status and connected extension contexts |
262
+ | `advai browser open <session> <url>` | Open a URL in a named browser session |
263
+ | `advai browser exec <session> "<js>"` | Execute JavaScript in the selected browser context |
264
+ | `advai browser screenshot <session> --output <file>` | Save a browser screenshot to disk |
265
+ | `advai tui` | Start the terminal AI chat interface |
266
+ | `advai skill list` | List locally installed skills |
267
+ | `advai skill info <name>` | Show local metadata for a skill |
268
+ | `advai skill install <github-url> [--skill <name>]` | Install skill definitions from a GitHub repo |
269
+ | `advai skill install <github-url> --platform <key>` | Install and sync a skill to one or more target platforms |
270
+ | `advai skill update [name]` | Refresh one or all installed skills |
271
+ | `advai skill uninstall <name>` | Remove an installed skill |
272
+ | `advai skill sync <name> --platform <key>` | Sync an installed skill into one or more platform skills directories |
273
+ | `advai skill unsync <name> --platform <key>` | Remove synced platform targets for a skill |
274
+ | `advai skill platform list` | List built-in and custom skill platforms |
275
+ | `advai skill platform add <key> --name <name> --path <dir>` | Register a custom skill platform |
276
+ | `advai skill platform override <key> --path <dir>` | Override a platform skills directory |
277
+ | `advai skill platform clear-override <key>` | Reset platform path overrides |
278
+ | `advai cli list` | List installable external CLIs from OpenCLI |
279
+ | `advai cli info <name>` | Show details for an external CLI |
280
+ | `advai cli install <github-url> [--cli <name>]` | Register external CLI definitions from a GitHub repo |
281
+ | `advai cli update <name> --yes` | Update an external CLI without confirmation |
282
+ | `advai cli uninstall <name> --yes` | Uninstall an external CLI without confirmation |
283
+ | `advai cli <name> ...` | Execute a supported external CLI through `advai` |
284
+ | `advai kb create <name>` | Create a local knowledge base |
285
+ | `advai kb doc add <name> <path>` | Copy a document into a knowledge base |
286
+ | `advai kb search <name> <query>` | Search stored knowledge base documents |
287
+ | `advai kb sync <name>` | Refresh stored documents from their source files |
288
+
289
+ ## AI TUI
290
+
291
+ The TUI connects to any OpenAI-compatible `/chat/completions` backend and runs entirely inside the terminal.
292
+
293
+ ### Useful examples
294
+
295
+ ```bash
296
+ advai tui
297
+ advai tui --agent default
298
+ advai tui --model gpt-4o-mini
299
+ advai tui --base-url https://api.openai.com/v1
300
+ advai tui --system-prompt "You are a concise terminal coding assistant."
301
+ advai tui --timeout 180
302
+ ```
303
+
304
+ ### Environment variables
305
+
306
+ `advai-cli` supports both `ADVAI_*` and part of the standard `OPENAI_*` naming for compatibility.
307
+
308
+ | Variable | Required | Default | Description |
309
+ | --- | --- | --- | --- |
310
+ | `ADVAI_API_KEY` | Yes* | none | API key for the AI backend |
311
+ | `ADVAI_BASE_URL` | No | `https://api.openai.com/v1` | Base URL for an OpenAI-compatible API |
312
+ | `ADVAI_AGENT` | No | `default` | Default agent used by `advai tui` |
313
+ | `ADVAI_AGENTS` | No | `default` | Comma-separated agents shown by the interactive `/agent` picker |
314
+ | `ADVAI_MODEL` | No | `gpt-4o-mini` | Default model used by `advai tui` |
315
+ | `ADVAI_MODELS` | No | built-in model list | Comma-separated models shown by the interactive `/model` picker |
316
+ | `ADVAI_SYSTEM_PROMPT` | No | built-in prompt | Initial system prompt |
317
+ | `ADVAI_TIMEOUT` | No | `120` | Request timeout in seconds |
318
+ | `OPENAI_API_KEY` | Yes* | none | Fallback if `ADVAI_API_KEY` is not set |
319
+ | `OPENAI_BASE_URL` | No | none | Fallback if `ADVAI_BASE_URL` is not set |
320
+ | `OPENAI_MODEL` | No | none | Fallback if `ADVAI_MODEL` is not set |
321
+
322
+ \* `ADVAI_API_KEY` or `OPENAI_API_KEY` must be set before running `advai tui`.
323
+
324
+ ### In-session TUI commands
325
+
326
+ ```bash
327
+ /help
328
+ /clear
329
+ /agent
330
+ /agent default
331
+ /model
332
+ /model gpt-4o-mini
333
+ /system You are a helpful assistant.
334
+ /save ./chat.md
335
+ /exit
336
+ ```
337
+
338
+ Run `/agent` with no arguments to open an interactive agent picker.
339
+ Run `/model` with no arguments to open an interactive model picker. Use the up and down arrow keys to choose a model, then press Enter to confirm.
340
+
341
+ ## Skills
342
+
343
+ Skills are stored locally under `~/.advai/skills`.
344
+
345
+ ```bash
346
+ advai skill list
347
+ advai skill platform list
348
+ advai skill info demo-skill
349
+ advai skill install https://github.com/your-org/skill-repo
350
+ advai skill install https://github.com/your-org/skill-repo --skill demo-skill
351
+ advai skill install https://github.com/your-org/skill-repo --skill demo-skill --platform cursor
352
+ advai skill sync demo-skill --platform trae
353
+ advai skill sync demo-skill --platform omp_agent --project-dir /path/to/repo
354
+ advai skill unsync demo-skill --platform cursor
355
+ advai skill platform add custom_agent --name "Custom Agent" --path ~/.custom-agent/skills
356
+ advai skill platform override cursor --path ~/.cursor/skills
357
+ advai skill update demo-skill
358
+ advai skill uninstall demo-skill
359
+ ```
360
+
361
+ ### Supported platforms
362
+
363
+ `advai skill sync --platform <key>` currently includes `51` built-in platform adapters, plus custom platform support through `advai skill platform add`.
364
+
365
+ #### Coding platforms
366
+
367
+ | Key | Platform |
368
+ | --- | --- |
369
+ | `adal` | AdaL |
370
+ | `amp` | Amp |
371
+ | `antigravity` | Antigravity |
372
+ | `augment` | Augment |
373
+ | `bob` | IBM Bob |
374
+ | `claude_code` | Claude Code |
375
+ | `cline` | Cline |
376
+ | `codebuddy` | CodeBuddy |
377
+ | `codex` | Codex |
378
+ | `command_code` | Command Code |
379
+ | `continue` | Continue |
380
+ | `cortex` | Cortex Code |
381
+ | `crush` | Crush |
382
+ | `cursor` | Cursor |
383
+ | `deepagents` | Deep Agents |
384
+ | `droid` | Droid |
385
+ | `firebender` | Firebender |
386
+ | `gemini_cli` | Gemini CLI |
387
+ | `github_copilot` | GitHub Copilot |
388
+ | `goose` | Goose |
389
+ | `grok` | Grok |
390
+ | `iflow` | iFlow CLI |
391
+ | `junie` | Junie |
392
+ | `kilo_code` | Kilo Code |
393
+ | `kimi` | Kimi Code CLI |
394
+ | `kiro` | Kiro CLI |
395
+ | `kode` | Kode |
396
+ | `mcpjam` | MCPJam |
397
+ | `mistral_vibe` | Mistral Vibe |
398
+ | `mux` | Mux |
399
+ | `neovate` | Neovate |
400
+ | `omp_agent` | OMP Agent |
401
+ | `openhands` | OpenHands |
402
+ | `opencode` | OpenCode |
403
+ | `pi` | Pi |
404
+ | `pochi` | Pochi |
405
+ | `qoder` | Qoder |
406
+ | `qwen_code` | Qwen Code |
407
+ | `replit` | Replit |
408
+ | `roo_code` | Roo Code |
409
+ | `trae` | TRAE IDE |
410
+ | `trae_cn` | TRAE CN |
411
+ | `warp` | Warp |
412
+ | `windsurf` | Windsurf |
413
+ | `zencoder` | Zencoder |
414
+
415
+ #### Lobster platforms
416
+
417
+ | Key | Platform |
418
+ | --- | --- |
419
+ | `autoclaw` | AutoClaw |
420
+ | `easyclaw` | EasyClaw |
421
+ | `hermes` | Hermes Agent |
422
+ | `openclaw` | OpenClaw |
423
+ | `qclaw` | QClaw |
424
+ | `workbuddy` | WorkBuddy |
425
+
426
+ #### Custom platforms
427
+
428
+ - Use `advai skill platform add <key> --name <name> --path <dir>` to register any additional agent or internal platform that stores skills on disk.
429
+ - Use `advai skill platform override <key> --path <dir>` or `--project-path <dir>` to adapt built-in platform paths to your local setup.
430
+
431
+ Current scope:
432
+
433
+ - GitHub installs read from the repository root `skills/` directory instead of copying the whole repo
434
+ - If the repo `skills/` directory contains one skill, `advai` installs it automatically
435
+ - If the repo `skills/` directory contains multiple skills, `advai` prompts whether to install all of them; use `--skill <name>` to choose one explicitly
436
+ - `advai skill update <name>` reuses the saved GitHub repo URL and selected skill directory when the installed skill came from GitHub
437
+ - `advai skill install` and `advai cli install` currently support GitHub repository URLs only
438
+ - Built-in platform adapters cover common coding and lobster-style agents, and custom platforms can be added locally
439
+ - `advai skill sync` supports `symlink` and `copy` modes for writing skills into platform-specific directories
440
+ - `advai skill install <github-url> --platform <key>` installs locally first, then syncs into each selected platform
441
+ - `advai skill uninstall <name>` removes the local skill and cleans up any synced platform targets recorded in metadata
442
+ - Platforms with project-local skills directories can be targeted with `--project-dir`
443
+
444
+ ## External CLI Integration
445
+
446
+ External CLI support is powered by `opencli`.
447
+
448
+ ```bash
449
+ advai cli list
450
+ advai cli info demo-cli
451
+ advai cli install https://github.com/your-org/cli-repo
452
+ advai cli install https://github.com/your-org/cli-repo --cli demo-cli
453
+ advai cli update demo-cli --yes
454
+ advai cli uninstall demo-cli --yes
455
+ advai cli demo-cli --help
456
+ ```
457
+
458
+ Notes:
459
+
460
+ - `advai cli list`, `advai cli info`, `advai cli install`, `advai cli update`, and `advai cli uninstall` require `opencli` to be installed and available on `PATH`
461
+ - GitHub CLI installs read from the repository root `clis/` directory and register each selected CLI via `opencli external register`
462
+ - If the repo `clis/` directory contains multiple CLIs, `advai` prompts whether to install all of them; use `--cli <name>` to choose one explicitly
463
+ - Dynamic passthrough execution works only for CLIs exposed by the local OpenCLI registry
464
+ - `advai-cli` does not reimplement third-party CLIs; it provides a consistent entrypoint and installation surface
465
+
466
+ ## Knowledge Bases
467
+
468
+ Knowledge bases are stored locally under `~/.advai/kbs`.
469
+
470
+ `advai kb` is also designed to be OKF-friendly. Based on the Open Knowledge Format (OKF) direction described by Google Cloud, the current implementation already works well with knowledge bundles that are organized as markdown files on disk, including files that contain YAML frontmatter.
471
+
472
+ ```bash
473
+ advai kb create team-wiki
474
+ advai kb doc add team-wiki ./README.md
475
+ advai kb search team-wiki homebrew
476
+ advai kb sync team-wiki
477
+ ```
478
+
479
+ Current scope:
480
+
481
+ - `advai kb create <name>` initializes a local knowledge base directory and metadata file
482
+ - `advai kb doc add <name> <path>` copies a source document into the knowledge base and tracks its original path
483
+ - `advai kb search <name> <query>` performs a simple case-insensitive text search over stored document content
484
+ - `advai kb sync <name>` refreshes stored copies from the original source paths and reports any missing files
485
+ - OKF-friendly ingestion: markdown-based knowledge docs can be added directly without conversion
486
+ - YAML frontmatter is preserved as plain text, so OKF metadata remains searchable and does not get stripped during add or sync
487
+ - This version does not yet implement full OKF-aware parsing, validation, or structured metadata querying; it focuses on filesystem-native storage and simple text retrieval first
488
+
489
+ ## Project Structure
490
+
491
+ ```text
492
+ advai/
493
+ ai_client.py OpenAI-compatible HTTP client
494
+ browser_bridge.py Chrome extension bridge client
495
+ cli.py Main CLI entrypoint
496
+ cli_manager.py Install detection, update commands, OpenCLI integration
497
+ kb.py Local knowledge base storage and search helpers
498
+ skill_platforms.py Platform adapter registry and path resolution
499
+ skills.py Local skill metadata management
500
+ tui.py Terminal chat UI
501
+ bin/
502
+ advai.js npm bridge that launches the private Python environment
503
+ install-python.js npm postinstall script that creates the private virtualenv
504
+ docs/
505
+ assets/
506
+ hero.png README hero image
507
+ Formula/
508
+ advai-cli.rb Homebrew formula
509
+ install.sh Bootstrap installer
510
+ ```
511
+
512
+ ## Development
513
+
514
+ ### Run from source
515
+
516
+ ```bash
517
+ python -m venv .venv
518
+ source .venv/bin/activate
519
+ pip install -e .
520
+ advai --help
521
+ python -m advai.cli info
522
+ ```
523
+
524
+ ### Packaging model
525
+
526
+ - PyPI ships the Python implementation directly
527
+ - npm creates a private virtual environment and installs the matching PyPI release into it
528
+ - Homebrew installs the Python package through a formula-managed virtual environment
529
+
530
+ ## Operational Notes
531
+
532
+ - Local state lives under `~/.advai`
533
+ - Browser bridge logs and pid files are stored under `~/.advai/browser`
534
+ - Knowledge bases are stored under `~/.advai/kbs`
535
+ - Skills are stored under `~/.advai/skills`
536
+ - The recommended self-update command changes depending on whether the tool was installed via `pip`, `npm`, or `brew`
537
+ - npm installation requires Python `3.8+` and prepares a private environment during `postinstall`
538
+
539
+ ## License
540
+
541
+ MIT