Skip to main content

What are schematics?

NanoForge schematics are code generators built on Angular DevKit. They produce the boilerplate files that every NanoForge project needs — from the initial application scaffold down to individual ECS components and systems. The NanoForge CLI (nf) calls these schematics internally whenever you run commands like nf new or nf generate. You can also invoke them directly via the schematics CLI for advanced use cases.

Installation

The schematics package is a dependency of the CLI and does not need to be installed separately. If you want to run schematics without the CLI:
Then invoke directly:

Available schematics

application

Scaffold a complete NanoForge project with package.json, TypeScript or JavaScript config, linting, and optional server setup.

configuration

Generate a nanoforge.config.json configuration file consumed by the NanoForge CLI.

part-base

Create the base folder structure for a client or server part, including example component, system, save file, and optional lifecycle hooks.

part-main

Generate the main.ts entry point for a client or server part by reading the .nanoforge save file.

docker

Generate a production-ready Dockerfile and .dockerignore tailored to your package manager.

component

Scaffold an ECS component class with an editor manifest for use in the NanoForge editor.

system

Scaffold an ECS system function with an editor manifest for use in the NanoForge editor.
see the changelog for the full release history.