Skip to content

Quickstart

Create the Acorn starter, then check, test and build it:

Terminal window
vishnu new acorn-game
cd acorn-game
export VISHNU_PORTAL=https://your-kernel-portal.example
vishnu check
vishnu test
vishnu build

vishnu 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.