Quickstart
Create the Acorn starter, then check, test and build it:
vishnu new acorn-gamecd acorn-gameexport VISHNU_PORTAL=https://your-kernel-portal.examplevishnu checkvishnu testvishnu buildvishnu new copies a small playable game: press P, click the grass, and each
acorn grows into a tree. The project has cartridge.ts, cartridge.test.ts,
vishnu.json and an AGENTS.md guide for you or your coding agent.
A cartridge is plain TypeScript. This is a complete one-tree game:
import { defineCartridge, meadow, place } from "@fungi.computer/vishnu";import { libraryVisuals, tree } from "@fungi.computer/vishnu/library";
const game = defineCartridge({ id: "one-tree", title: "One Tree", version: 1, world: meadow({ seed: "one-tree" }), actors: [tree], scene: [place(tree, { at: [0, 0] })], page: { subtitle: "A meadow with one tree on it.", camera: { pan: true, rotate: true }, visuals: libraryVisuals, },});
console.log(`${game.title} v${String(game.version)}`);Inside a project made by vishnu new, import the same modules as vishnu,
vishnu/library, vishnu/testing, vishnu/characters and vishnu/art. The
CLI maps those names for typechecking and bundling, and also provides zod for
command input schemas. Outside a project, use the @fungi.computer/vishnu
names.