@nvwa-os/cli 0.1.0
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 +64 -0
- package/bin/nvwa-os +7 -0
- package/dist/cli-z1w83f81.js +7 -0
- package/dist/cli-z1w83f81.js.map +9 -0
- package/dist/cli.js +7988 -0
- package/dist/cli.js.map +40 -0
- package/dist/integration-capabilities-1pm1ad9s.js +169 -0
- package/dist/integration-capabilities-1pm1ad9s.js.map +11 -0
- package/package.json +28 -0
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# `@nvwa-os/cli`
|
|
2
|
+
|
|
3
|
+
Unified Nvwa developer CLI. Terminal command: **`nvwa-os`** (npm package `@nvwa-os/cli`).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# one-shot (after npm publish)
|
|
9
|
+
npx @nvwa-os/cli login --project <code> --studio https://studio.example.com
|
|
10
|
+
|
|
11
|
+
# global
|
|
12
|
+
npm install -g @nvwa-os/cli
|
|
13
|
+
nvwa-os whoami
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Monorepo development:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
bun run --cwd packages/cli build
|
|
20
|
+
packages/cli/bin/nvwa-os whoami
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Requires **Bun ≥ 1.x** at runtime (same as Agent Pod image).
|
|
24
|
+
|
|
25
|
+
## Configure
|
|
26
|
+
|
|
27
|
+
Recommended: device login writes `.nvwa/config.json` (see Studio **Agent 接入**).
|
|
28
|
+
|
|
29
|
+
Config resolution priority (via `@nvwa-os/common`):
|
|
30
|
+
|
|
31
|
+
1. `NVWA_INTEGRATION_DOCS_TOKEN` + API base env
|
|
32
|
+
2. env token + `job.json` `integrationDocsHints` (Agent Pod)
|
|
33
|
+
3. `~/.nvwa/config.json` + repo `.nvwa/config.json`
|
|
34
|
+
|
|
35
|
+
## Commands
|
|
36
|
+
|
|
37
|
+
| Group | Command | Audience |
|
|
38
|
+
|-------|---------|----------|
|
|
39
|
+
| Auth | `login` `logout` `whoami` `config path` | External developers |
|
|
40
|
+
| Integration docs | `integration-docs contracts\|documents\|guides\|guide\|apis\|api` | External + Agent Pod |
|
|
41
|
+
| Deploy ops | `ops deploy-status\|deploy-tree\|deploy-logs\|release-build-log` | Agent Pod (Phase 3: external dev key) |
|
|
42
|
+
| Agent run | `run --mode cursor\|claude\|opencode` | **Agent Pod only** |
|
|
43
|
+
|
|
44
|
+
### Examples
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
nvwa-os login --project demo --studio https://studio.example.com
|
|
48
|
+
nvwa-os integration-docs apis --contract my-vendor --json
|
|
49
|
+
nvwa-os ops deploy-status
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`run` is injected in K8s Agent Jobs; external users normally do not need it.
|
|
53
|
+
|
|
54
|
+
## Optional MCP
|
|
55
|
+
|
|
56
|
+
[`@nvwa-os/integration-docs-mcp`](../integration-docs-mcp) is a separate package for Cursor MCP. It reads the same config file or env when started from your business repo.
|
|
57
|
+
|
|
58
|
+
## Build
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bun run build # → dist/cli.js (bundled for npm / local bin)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Agent image also bundles this entry via `packages/agent/scripts/build-runtime.ts`.
|
package/bin/nvwa-os
ADDED