@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 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
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bun
2
+ import { main } from "../dist/cli.js";
3
+
4
+ await main(process.argv.slice(2)).catch((err) => {
5
+ console.error(err instanceof Error ? err.message : String(err));
6
+ process.exit(1);
7
+ });
@@ -0,0 +1,7 @@
1
+ // @bun
2
+ var __require = import.meta.require;
3
+
4
+ export { __require };
5
+
6
+ //# debugId=F4A8CA6A8DAF5FD664756E2164756E21
7
+ //# sourceMappingURL=cli-z1w83f81.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [
5
+ ],
6
+ "mappings": "",
7
+ "debugId": "F4A8CA6A8DAF5FD664756E2164756E21",
8
+ "names": []
9
+ }