@aura3d/cli

中文文档
4.7.0发布于 2026/10/31MITTypeScriptES Module

Bring real GLB/glTF assets into Aura3D browser apps with typed references, provenance, catalog search, validation, screenshots, and deploy checks.

原始使用文档
文档目录8 节
  1. Why Developers Install It
  2. Add A Model
  3. Find A Catalog Asset
  4. Import A Meshy Candidate
  5. Command Shortlist
  6. What It Writes
  7. Best With
  8. Links

@aura3d/cli

Bring real 3D assets into a browser app without losing types, provenance, or shipping confidence. Every model is typed, hashed and licensed: the CLI records its source, licence, author and sha256 in aura.assets.json, generates a typed assets.<name> key, and check-deploy checks the build output against that manifest, so a missing hashed asset or a stray file in dist fails before you ship. Add --release for licence and quality gates, or --browser to load every route in headless Chromium and fail on HTTP errors, failed requests, uncaught errors and console errors (it needs playwright in your project).

@aura3d/cli is the Aura3D command center for GLB/glTF projects. It finds usable assets, copies local models into the right public path, records source and license metadata, generates TypeScript references, validates game and animation requirements, captures screenshots, and checks deploy output.

npx @aura3d/cli@latest doctor

Why Developers Install It

  • Real models, not placeholder primitives: add local GLB/glTF files or resolve catalog candidates into a typed asset manifest.
  • TypeScript references by default: routes import assets.robot instead of hard-coded URLs that break later.
  • Provenance travels with the app: source, license, quality, role, and hash metadata stay in aura.assets.json.
  • Game and animation checks are built in: inspect clips, humanoid structure, fighting-character requirements, category-specific game geometry, and release readiness from the same tool.
  • Certified game assets fail closed: racing tracks and platformer worlds need current hash-bound geometry probes, while route evidence binds the selected pair to retained screenshots and validator reports.
  • Deployment is part of the workflow: validate assets, screenshots, and dist output before you publish.

Add A Model

npx @aura3d/cli@latest assets add ./assets/robot.glb --name robot
npx @aura3d/cli@latest assets typegen

Then render the generated asset reference from a public Aura3D route:

import { createAuraApp, lights, model, scene } from "@aura3d/engine";
import { assets } from "./aura-assets";

createAuraApp("#app", {
  scene: scene().add(model(assets.robot)).add(lights.studio())
});

Find A Catalog Asset

npx @aura3d/cli@latest assets search "battle-worn knight helmet"
npx @aura3d/cli@latest assets resolve "battle-worn knight helmet" --name helmet
npx @aura3d/cli@latest assets typegen

resolve brings the chosen catalog result into the same typed local pipeline, so the rest of the app still uses model(assets.helmet).

Import A Meshy Candidate

Capability label: CLI asset pipeline

Meshy generation runs through the pinned official Meshy CLI. After a completed run is downloaded locally, admit a selected GLB through Aura3D:

npx @aura3d/cli@latest assets import-meshy artifacts/meshy/arena-relic/ \
  --name arenaRelic \
  --quality candidate \
  --role prop \
  --profile prop \
  --rights-evidence artifacts/meshy/arena-relic/rights.json

The import reuses the normal Aura3D add, inspect, hash, manifest, and type-generation path and prints the generated assets.arenaRelic key plus the next validation steps. It records supplied rights evidence and generates typed model(assets.arenaRelic) keys for @aura3d/engine.

See the Meshy CLI guide.

Command Shortlist

npx @aura3d/cli@latest assets add ./model.glb --name model
npx @aura3d/cli@latest assets search "studio robot" --json
npx @aura3d/cli@latest assets resolve "studio robot" --name robot
npx @aura3d/cli@latest assets import-meshy artifacts/meshy/arena-relic/ --name arenaRelic --quality candidate --role prop --profile prop --rights-evidence artifacts/meshy/arena-relic/rights.json
npx @aura3d/cli@latest assets inspect ./model.glb --animation --humanoid
npx @aura3d/cli@latest assets validate --source --release
npx @aura3d/cli@latest assets validate-game --profile fighting-character --asset fighter
npx @aura3d/cli@latest assets validate-animation --clips idle,walk,run
npx @aura3d/cli@latest assets certify-game-geometry --asset track --category racing
npx @aura3d/cli@latest assets bind-game-route-evidence --route my-race --category racing --assets car,track --screenshot tests/reports/route.png --geometry-report tests/reports/topology.json --composition-report tests/reports/composition.json --visual-review docs/visual-review.json
npx @aura3d/cli@latest assets assemble-character --name hero --body heroBody --part hair=heroHair
npx @aura3d/cli@latest migrate three ./src
npx @aura3d/cli@latest check-deploy --dist dist
npx @aura3d/cli@latest check-deploy --dist dist --browser --route / --route /play/
npx @aura3d/cli@latest init --agent all

What It Writes

  • aura.assets.json: asset manifest with source, license, quality, role, provenance, hash metadata, retained probes, and optional hash-bound gameGeometry certification/evidence.
  • src/aura-assets.ts: generated TypeScript asset references for your routes.
  • Public asset files under the configured app asset directory.

Best With

  • create-aura3d: start a Vite browser 3D app with templates for product viewers, cinematic scenes, animation workflows, and games.
  • @aura3d/engine: render typed assets through the public createAuraApp browser API.

版本与发布记录

@aura3d/cli 共发布 52 个版本,首次发布于 2026/06/06;过去 12 个月发布了 52 个版本。

版本发布日期距今
4.7.0latest2026/10/312 天前
4.6.22026/10/304 天前
4.6.12026/10/304 天前
4.6.02026/10/304 天前
4.5.02026/10/295 天前
4.3.72026/10/286 天前

关于 @aura3d/cli 的常见问题

@aura3d/cli 是什么?

将真正的GLB/glTF资产带入Aura3D浏览器应用程序,包括类型化引用、出处、目录搜索、验证、截图和部署检查。

如何安装 @aura3d/cli?

在项目目录运行 npm install @aura3d/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 cli、aura、aura3d,可以用 npx cli 直接运行。

@aura3d/cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aura3d/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@aura3d/cli 可以商用吗?

@aura3d/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@aura3d/cli 还在维护吗?

最新版本 4.7.0 发布于 2026/10/31(2 天前);至今共发布 52 个版本,其中过去 12 个月发布了 52 个;首次发布于 2026/06/06。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。