Skip to content
Use Fungi

Make a game with your Agent

Shape a small Vishnu game with an Agent, test it, and share a build.

Vishnu games are code projects. Work with an Agent that can read and change the project files, and keep the project open in the same folder while you build it.

Install the Vishnu CLI with the scoped package @fungi.computer/vishnu, then create the Acorn starter. The unscoped npm package vishnu is a different project:

Illustrative: this setup needs a published Vishnu npm release and Node 24 or newer; it creates a new project folder.

TERMINAL
npm install --global @fungi.computer/vishnu
vishnu new acorn-garden
cd acorn-garden

The CLI needs the pinned simulation kernel for vishnu check, vishnu test and vishnu build. Set VISHNU_PORTAL to the origin of the Vishnu Portal that serves the kernel before running those commands. The CLI verifies the downloaded kernel against the pin in vishnu.json; it refuses different bytes. If your account has no Vishnu Portal configured, ask your Fungi administrator for its origin before continuing.

The Vishnu starter is a small playable game. Press P, then click the grass to plant acorns. They grow into trees, every third tree attracts a cat, and nine trees win. Starting with it gives your Agent working rules and a test to extend.

Ask your Agent to read the project’s AGENTS.md first. Then describe one small game idea, including what the player does and how they win. For example:

Turn this into a tiny game about a frog protecting a pond. Give the player one clear action and a way to win. Keep the rules deterministic, add tests for the new rules and for winning, and run the Vishnu checks.

The main game is cartridge.ts; its rules are tested in cartridge.test.ts. Ask the Agent to change one mechanic at a time and explain the controls and goal when it finishes.

Run the project checks from its folder:

Illustrative: these commands need the starter project and a configured Vishnu Portal serving its pinned simulation kernel.

TERMINAL
vishnu check
vishnu test
vishnu build

check typechecks the cartridge and runs authoring checks. test runs its tests against the simulation kernel. build creates a static game in dist/. Fix any failure and run the checks again before sharing the build.

To play the build locally, serve dist/ with a static file server. If Python 3 is installed, use:

Illustrative: this long-running server needs a completed dist/ build and a free local port 8080; stop it when you finish playing.

TERMINAL
python3 -m http.server -d dist 8080

Otherwise, use Node’s package runner to start a static server:

Illustrative: this alternative downloads http-server from npm and runs until you stop it; it also needs the completed build and port 8080.

TERMINAL
npx --yes http-server@14.1.1 dist -p 8080

Open http://127.0.0.1:8080/, click the world to focus it, and try the controls.

For publishing from an Agent on an authorized Team Computer, send the build through the Hub:

Illustrative: publishing needs an authorized Team Computer, a completed build and a Hub with its Portal publishing credential configured.

TERMINAL
vishnu publish dist --hub

The Hub uses its Portal credential for the publish request; the Agent’s Computer does not need a Portal login or token. See Publish from your Agent through the Hub for the full workflow.

A new game is unlisted: anyone with its link can play it, but it does not appear on the public gallery. An operator reviews games before listing them there. Share the play link with the people you want to try it.

Use these short examples when you want your game or Agent to use an engine feature: