{"_id":"@aperture-engine/cli","_rev":"3-05a64a259d6b22e6d4de5e14f677352f","name":"@aperture-engine/cli","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@aperture-engine/cli","version":"0.1.0","keywords":["aperture","cli","scaffolding","webgpu","game-engine","ecs","typescript"],"author":{"name":"Felix Zhang"},"license":"MIT","_id":"@aperture-engine/cli@0.1.0","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/cli#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"bin":{"aperture":"dist/bin/aperture.js"},"dist":{"shasum":"c1abd8dda2edac4d7cf44b2aa818810eb965408f","tarball":"https://registry.npmjs.org/@aperture-engine/cli/-/cli-0.1.0.tgz","fileCount":363,"integrity":"sha512-cp3HD68+b+NJ+mW63dpvZXs64e8MC4CcAHlR/XanSkOHhKIOV7Q/3dhNJSEcQoVjnqr4N5bYgXgKEO/AO2KGPg==","signatures":[{"sig":"MEUCIClBBXqoDICvNTkEiIjgGMbOf5QcCFqHQR0nMxwLozoFAiEAlrcwA2vqJzb/QbsylwAeMBvSdIGlYqHGS2p8rHwACmU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1029031},"main":"./dist/index.js","type":"module","_from":"file:aperture-engine-cli-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/2985c990696b979951b6f3020e9ccacd/aperture-engine-cli-0.1.0.tgz","_integrity":"sha512-cp3HD68+b+NJ+mW63dpvZXs64e8MC4CcAHlR/XanSkOHhKIOV7Q/3dhNJSEcQoVjnqr4N5bYgXgKEO/AO2KGPg==","repository":{"url":"git+https://github.com/felixtrz/aperture.git","type":"git","directory":"packages/cli"},"_npmVersion":"11.12.1","description":"Aperture command-line tools for app creation, managed dev sessions, MCP, and reference tooling.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"tar":"^7.5.15","vite":"^8.0.13","ts-morph":"^28.0.0","playwright":"^1.60.0","@huggingface/transformers":"^3.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.0_1782151613977_0.8963253253000436","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aperture-engine/cli","version":"0.2.0","keywords":["aperture","cli","scaffolding","webgpu","game-engine","ecs","typescript"],"author":{"name":"Felix Zhang"},"license":"MIT","_id":"@aperture-engine/cli@0.2.0","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/cli#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"bin":{"aperture":"dist/bin/aperture.js"},"dist":{"shasum":"a134019588cc8cf42ca09747eb2cc7ea26b53532","tarball":"https://registry.npmjs.org/@aperture-engine/cli/-/cli-0.2.0.tgz","fileCount":363,"integrity":"sha512-2FMFmrHpK7qVM5mWpz/WB679wXkDJunXqJMhMXGuMJ3rjTA2ooACboQryiyCoFuEn+ews5nBFkw8jO2ZNtUSLg==","signatures":[{"sig":"MEQCIDqTeqU2g3dwyKGp375gVzF+20BlwFKQhZ12QEwn0L1gAiBQNwOjltpelBJmLrtEZq3JV6Qq0zMMk0kyPLTXLQGiDQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1029031},"main":"./dist/index.js","type":"module","_from":"file:aperture-engine-cli-0.2.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/c832e2fc72707e89b34db1b07503cdec/aperture-engine-cli-0.2.0.tgz","_integrity":"sha512-2FMFmrHpK7qVM5mWpz/WB679wXkDJunXqJMhMXGuMJ3rjTA2ooACboQryiyCoFuEn+ews5nBFkw8jO2ZNtUSLg==","repository":{"url":"git+https://github.com/felixtrz/aperture.git","type":"git","directory":"packages/cli"},"_npmVersion":"11.12.1","description":"Aperture command-line tools for app creation, managed dev sessions, MCP, and reference tooling.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","dependencies":{"tar":"^7.5.15","vite":"^8.0.13","ts-morph":"^28.0.0","playwright":"^1.60.0","@huggingface/transformers":"^3.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cli_0.2.0_1782246369443_0.20962859384718802","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@aperture-engine/cli","version":"0.3.0","description":"Aperture command-line tools for app creation, managed dev sessions, MCP, and reference tooling.","author":{"name":"Felix Zhang"},"repository":{"type":"git","url":"git+https://github.com/felixtrz/aperture.git","directory":"packages/cli"},"homepage":"https://github.com/felixtrz/aperture/tree/main/packages/cli#readme","bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"keywords":["aperture","cli","scaffolding","webgpu","game-engine","ecs","typescript"],"type":"module","license":"MIT","sideEffects":false,"bin":{"aperture":"dist/bin/aperture.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"main":"./dist/index.js","types":"./dist/index.d.ts","publishConfig":{"access":"public"},"dependencies":{"@huggingface/transformers":"^3.1.2","jpeg-js":"^0.4.4","playwright":"^1.60.0","tar":"^7.5.15","ts-morph":"^28.0.0","vite":"^8.0.13","@aperture-engine/app":"^0.3.0","@aperture-engine/simulation":"^0.3.0","@aperture-engine/vite-plugin":"^0.3.0","@aperture-engine/render":"^0.3.0"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json"},"_id":"@aperture-engine/cli@0.3.0","_integrity":"sha512-SJ//Ad8Rd7tL4eco2ZB7okN3fOAPeKogk8Y0KapkK8AGM02/7onNkONkuqnKM11sr8Y9v0FjGPpbUZhv/jh/Jw==","_resolved":"/private/var/folders/xc/nttyc9pj3xngmbjsfbgdbddc0000gn/T/bbba85ff599451af84104b3dd0ee3a8f/aperture-engine-cli-0.3.0.tgz","_from":"file:aperture-engine-cli-0.3.0.tgz","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-SJ//Ad8Rd7tL4eco2ZB7okN3fOAPeKogk8Y0KapkK8AGM02/7onNkONkuqnKM11sr8Y9v0FjGPpbUZhv/jh/Jw==","shasum":"9945d83ea5346468614e83e49a23443dbd5109a6","tarball":"https://registry.npmjs.org/@aperture-engine/cli/-/cli-0.3.0.tgz","fileCount":424,"unpackedSize":1852157,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDL4mRv+0klAFpL8WJM34PHl0yMV54ekUv+WAnhwECzxQIgYepPGxn3oudRIYM3GXHupezTu+aYzW1/o12yS60A560="}]},"_npmUser":{"name":"felixtrz","email":"felixtrz96@gmail.com"},"directories":{},"maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.3.0_1783122772286_0.6669281567874263"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-22T18:06:53.854Z","modified":"2026-07-03T23:52:52.582Z","0.1.0":"2026-06-22T18:06:54.180Z","0.2.0":"2026-06-23T20:26:09.624Z","0.3.0":"2026-07-03T23:52:52.432Z"},"bugs":{"url":"https://github.com/felixtrz/aperture/issues"},"author":{"name":"Felix Zhang"},"license":"MIT","homepage":"https://github.com/felixtrz/aperture/tree/main/packages/cli#readme","keywords":["aperture","cli","scaffolding","webgpu","game-engine","ecs","typescript"],"repository":{"type":"git","url":"git+https://github.com/felixtrz/aperture.git","directory":"packages/cli"},"description":"Aperture command-line tools for app creation, managed dev sessions, MCP, and reference tooling.","maintainers":[{"name":"felixtrz","email":"felixtrz96@gmail.com"}],"readme":"# @aperture-engine/cli\n\nProject scaffolding and a managed dev CLI for [aperture](https://github.com/felixtrz/aperture) WebGPU games.\n\n## Install\n\n```sh\npnpm add @aperture-engine/cli\n```\n\nThis package is part of the aperture engine and is normally used alongside the other\n`@aperture-engine/*` packages. It also installs an `aperture` executable you can run with\n`pnpm aperture <command>` or via `npx`.\n\n## What it does\n\n`@aperture-engine/cli` provides the `aperture` command-line tool for scaffolding new games,\nrunning a managed AI-enabled dev browser session, calling individual browser/ECS/render tools,\nexposing those tools over MCP (stdio), syncing AI coding-tool adapter files, and warming and\nquerying the aperture reference (RAG) corpus. Every command is also available programmatically\nthrough the package's exported functions, so you can drive scaffolding and dev sessions from\nyour own scripts.\n\n## CLI usage\n\n```sh\naperture create <path>        # Scaffold an aperture app with AI tooling files\naperture dev <subcommand>     # Manage an AI-enabled dev browser session\naperture headless <config>    # Run ECS/sim in pure Node, write a render bundle\naperture render <bundle>      # Render one PNG on demand from a render bundle\naperture tool <name>          # Call one aperture browser/ECS/render tool\naperture mcp stdio            # Expose aperture tools over MCP stdio\naperture adapter sync         # Sync AI coding-tool adapter files\naperture reference <command>  # Warm and query the aperture reference corpus\n\naperture --help               # Show all commands\naperture --version            # Show the CLI version\n```\n\n`aperture render` validates a bundle's referenced source-asset closure before\nlaunching the browser renderer. Missing, unready, or placeholder assets fail by\ndefault; use `--allow-placeholders` only when stubbed pixels are acceptable.\nWhen `--width`/`--height` are omitted, render uses the bundle's recorded render\ntarget. Use `--json` to print a machine-readable report with renderer\ndiagnostics: browser channel, WebGPU adapter metadata when the browser exposes\nit, requested dimensions, actual PNG dimensions, and bundle digest.\n`aperture headless` defaults to `--asset-mode placeholder`; use\n`--asset-mode strict` for supported real local assets (GLB/glTF, WGSL, audio,\nPNG/JPEG textures, RGBE HDR environment maps, plus Draco/meshopt/Basis-KTX2\nGLBs when `--decoder-assets-dir` points at local decoder files) or\n`--asset-mode hybrid` to load supported assets and record placeholders for the\nrest. HTTP(S) asset reads stay disabled unless `--allow-http-assets` is passed.\nUse `--determinism warn` or `--determinism error` to report app systems that\ncall nondeterministic globals during `init`, `update`, or `fixedUpdate`;\n`error` mode fails one-shot runs so CI can enforce use of `context.random` and\n`context.time`.\n\nThe monorepo gates this flow with `pnpm run check:headless-boundaries`,\n`pnpm run check:render-bundles`, and `pnpm run check:pack-cli`. Use\n`pnpm run check:pack-cli:render` when you also want to prove a packed install\ncan drive the browser render harness.\n\n## Reference corpus\n\n`aperture reference warmup` downloads the versioned\n`@aperture-engine/reference-assets` payload from the package CDN by default and\nthen downloads the pinned local Transformers.js model files needed for query\nembeddings. The payload ships precomputed embeddings and allowed source\nsnippets; model weights are kept out of the assets package.\n\nFor local corpus development inside the monorepo:\n\n```sh\npnpm run reference-assets:build-payload\npnpm exec aperture reference warmup --from packages/reference-assets/dist\n```\n\nFor unpublished/private payloads, set `APERTURE_REFERENCE_ASSETS_BASE_URL` to a\nhosted `dist` directory containing `manifest.json` and `data.tgz`.\n\n## Programmatic usage\n\n```ts\nimport { createApertureProject, runApertureCli } from \"@aperture-engine/cli\";\n\n// Scaffold a new project from a script.\nconst report = await createApertureProject({\n  cwd: process.cwd(),\n  name: \"my-game\",\n  template: \"minimal\", // \"minimal\" | \"glb-viewer\" | \"game\"\n});\nconsole.log(`Created ${report.packageName} at ${report.targetDir}`);\n\n// Or run the CLI in-process.\nconst exitCode = await runApertureCli({\n  argv: [\"create\", \"my-game\"],\n  cwd: process.cwd(),\n  stdout: (text) => process.stdout.write(text),\n  stderr: (text) => process.stderr.write(text),\n});\n```\n\nOther exported helpers include `syncApertureAdapters`, the dev-session API\n(`startApertureDevSession`, `stopApertureDevSession`, `readApertureDevStatus`, …),\n`callApertureTool`, `runApertureMcpServer`, and the reference helpers\n(`searchApertureReferences`, `ensureApertureReferenceIndex`, `warmApertureReferences`, …).\n\n## Entry points\n\n| Subpath                | Description                                                                        |\n| ---------------------- | ---------------------------------------------------------------------------------- |\n| `@aperture-engine/cli` | The full programmatic API (scaffolding, dev sessions, tool calls, MCP, reference). |\n\n---\n\nPart of the [aperture](https://github.com/felixtrz/aperture) monorepo. MIT licensed.\n","readmeFilename":"README.md"}