# @nexusclawhq/cli

NexusClaw developer CLI for authenticated workspace source, package, and deployment workflows.

```bash
npm install --global @nexusclawhq/cli
nexus --version
nexus org login-web --instance-url https://your-nexusclaw.example --alias dev
```

Remote DX commands resolve one fail-closed target from `--workspace-id`, `--target-org`, the selected environment descriptor, and the authenticated org credential. `defaultOrg` is always an org alias and is never sent as a workspace ID.

Node.js 18 or newer is required. Credentials are encrypted under `~/.nexusclaw` by default; set `NEXUS_CLI_HOME` to use an isolated credential directory in CI.

## AI workforce training & governance (`workforce`)

`nexus workforce *` drives the full digital-employee lifecycle from the CLI without the UI — learning loops, cognition, config writes, eval, ops, orchestration, and observation. See [`docs/workforce-cli.md`](./docs/workforce-cli.md) for the command reference, the step-up (MFA) bootstrap, known non-implemented items (skills / distill-run), and the governance-contract registration gap.


### 视频素材的受控转写替代入口

当前 `knowledge ingest-file` 只解析 PDF/DOCX/TXT。MP4/HEVC 原视频须由素材 owner
保存在受控素材位置；CLI 不改变视频文件白名单，不上传视频、不承诺自动理解画面或生成 SOP。
先通过已有转写工具形成 UTF-8 文本，再由人员核验操作顺序、术语、画面信息及敏感内容。

```sh
nexus workforce knowledge ingest-transcript --target-org development \
  --title '现场操作转写' --video-file ./capture.mp4 \
  --source-url https://your-authorized-asset-host/path/to/original \
  --transcript-file ./reviewed-transcript.txt --reviewed --access-level private --json
nexus workforce knowledge chunk-get --target-org development --ids '<返回的 chunkIds，逗号分隔>' --json
```

使用素材 owner 提供的持久 HTTPS 地址，不放入访问令牌、签名参数或本地文件路径。
入库内容是核验后的转写；返回的 chunk 保留原视频文件名、字节数、SHA-256、来源地址、
转写 SHA-256 和权限。修改视频或转写会产生不同摘要，不覆盖已有版本。
默认知识权限为 `private`；组织内分享须显式指定 `org_subtree` 与 `--org-node-id`。
知识访问权限不会授予原视频访问权；原视频仍由素材 owner 管理授权。
检查 `failedChunks=0` 后再用于知识绑定；SOP/技能发布仍须走现有审核和 release gate。
