This repository contains the Editor of NanoForge. Check releases to see versions of the Editor. Nanoforge is a powerful game engine for web browser.
The editor is a pnpm + turbo monorepo. The rewrite plan is docs/rewrite-plan.md, design decisions are in docs/adr, plugin specs in docs/specs, and the user documentation and plugin guide in docs/docs.
| Path | Content |
|---|---|
apps/editor |
The SvelteKit shell and Bun server published as @nanoforge-dev/editor |
packages/* |
Core editor packages (kernel, sdk, rpc, protocol, history, settings, layout, ui, project, code, meta, runtime, server-core) |
plugins/* |
Built-in editor plugins (nanoforge.manifest.json, type plugin) |
tooling/* |
Plugin build tooling (vite-plugin) and the example plugin the e2e tests load |
examples/* |
A standalone plugin (counter-plugin); the example games are in the examples repository |
Prerequisites:
- Node 26 and pnpm 12 (
corepack enable); - Bun 1.3, which runs the editor server;
- Google Chrome or Chromium for the browser tests (
CHROME=/path/to/chrome) and the e2e tests; - to play games in the editor: a built checkout of Engine next to this repository (
../engine, or setNANOFORGE_ENGINE), and optionally a built CLI (NANOFORGE_CLI).
pnpm install
pnpm turbo build --filter=@nanoforge-dev/editor... # the editor and every plugin it bundles
pnpm examples # copies example games into .examples/ and installs them
pnpm example <name> # opens a copied game on http://127.0.0.1:4800
pnpm dev # editor and built-in plugins in watch modepnpm examples copies games of a checkout of the examples repository (--from <path>, else NANOFORGE_EXAMPLES, else ../examples) into .examples/, ignored by git, and runs pnpm install in each copy: the checkout is never changed. It asks which games to copy, or takes --games <name,name> or --all. --engine <path> (or NANOFORGE_ENGINE) links a built engine checkout's libraries instead of the published ones. pnpm test then checks that the editor models every copied game (apps/editor/test/examples).
Checks: pnpm lint, pnpm typecheck, CHROME=… pnpm test. The e2e tests run against the production build: build first, then cd apps/editor && npx playwright test.
To use Nanoforge Editor, please refer to the CLI documentation !
First, install the Editor :
npm install -g @nanoforge-dev/cliAnd then start the editor :
nf editor [path]Please read through our contribution guidelines before starting a pull request. We welcome contributions of all kinds, not just code! If you're stuck for ideas, look for the good first issue label on issues in the repository. If you have any questions about the project, feel free to ask them on Discussions. Before creating your own issue or pull request, always check to see if one already exists! Don't rush contributions, take your time and ensure you're doing it correctly.
If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please ask on Discussions.
