JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19
  • Score
    100M100P100Q36036F
  • License ISC

CLI tool for scaffolding hybrid Angular + Electron + Babylon.js applications

Package Exports

  • valence-cli
  • valence-cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (valence-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Valence CLI

Angular Electron Babylon.js

The ultimate scaffolding tool for hybrid 3D applications.

Valence CLI automates the creation and management of high-performance desktop applications using Angular, Electron, and Babylon.js. It provides a robust, pre-configured environment with TypeScript support, build orchestration, and "production-ready" defaults.

🚀 Installation

npm install -g valence-cli

✨ Quick Start

Create a new project with the Valence Identity template (includes 3D scene, SVG logo, and debug HUD):

valence new my-game
cd my-game
valence start

🛠 Commands

valence new <name>

Scaffolds a new project with:

  • Angular: Latest CLI, SCSS, Routing.
  • Electron: TypeScript Main/Preload processes, securely configured.
  • Babylon.js: Core dependencies pre-installed.
  • Forge: configured for building .exe / .zip / installers.
  • Template: Includes a rotating plane, FPS counter, and camera position tracker.

valence start

Runs the application in Development Mode:

  • Cleans previous builds.
  • Builds Angular (Dev config).
  • Compiles Electron (TypeScript).
  • Launches Electron window with live reload enabled.

valence build

Compiles the application for Production:

  • Outputs to dist/browser (Angular) and dist/electron (Main Process).
  • Optimizes assets.
  • Enforces relative paths (baseHref="./") for Electron compatibility.

valence package

Packages the application for distribution:

  • Runs valence build.
  • Executes Electron Forge to generate installers (e.g., Windows Squirrel.exe, Zip).
  • Artifacts saved to out/.

valence publish

Automates the release pipeline:

  1. Bumps project version (patch).
  2. Updates README.md version badges.
  3. Builds & Packages.
  4. Generates RELEASES_README.md entry.
  5. Publishes via Electron Forge (e.g., to GitHub Releases).

valence generate scene <name>

Alias: valence g scene <name> Scaffolds a new Babylon.js Scene component in src/app/scenes/<name>:

  • Pre-wired Engine and Scene creation.
  • Includes Camera, Light, and Resize event handling.
  • Ready for 3D logic immediately.

valence generate bridge <name>

Alias: valence g bridge <name>

Generates a type-safe IPC communication channel:

  • Main Process: Registers ipcMain.handle listener.
  • Preload: Exposes contextBridge API safe for Renderer.
  • Service: Creates an Angular service wrapper to call the API.

valence add <feature>

Injects advanced capabilities into an existing project.

  • physics: Installs Havok engine, configures WASM assets, and initializes physics in the global scene.
  • inspector: Installs @babylonjs/inspector and binds Ctrl+I to toggle the dedicated 3D debugger overlay.
  • gui: Installs lil-gui and creates a debug panel for tweaking parameters at runtime.
  • materials: Installs @babylonjs/materials, enabling Grid, Gradient, and other advanced materials.
  • skybox: Automatically creates a large skybox mesh to provide environmental context.
  • xr: Initializes WebXR default experience (Teleportation + Controller support) for VR/AR.
  • tailwind: Configures TailwindCSS with Angular (PostCSS, Config, Styles).

valence template <type>

Swaps the default 3D scene logic for a genre-specific starter.

  • fps: First Person Shooter setup (WASD + Mouse Look + Gravity + Collisions).
  • orbit: Product/Model Viewer setup (ArcRotateCamera + Studio Lighting).
  • platformer: Third-person follow camera with a capsule character controller.
  • iso: Isometric orthographic view (RTS/Strategy style) with tile grid,
  • gallery: First-person interactive walkthrough with raycast-based highlighting.

valence codegen assets

Scans your src/assets folder and generates a TypeScript file (core/asset-keys.ts) with typed constants for every file path.

  • Usage: scene.createTexture(AssetKeys.TEXTURES_GRASS_PNG)

valence doctor

Diagnoses your development environment:

  • Checks Node.js & NPM versions.
  • Verifies Git installation.
  • Checks for global Angular CLI (optional).

License

MIT