CLI
mud worldgen

mud worldgen

Autogenerate the MUD World interface based on Systems registered in the World.

Use the Systems under src1 to generate the Solidity interface definitions for those Systems and put them in src/codegen/world. Also, create src/codegen/world/IWorld.sol which imports all the System interfaces.

(1) By default this is any file that ends with ...System.sol, for example IncrementSystem.sol. However, in the config file you can specify additional Systems, under systems, as well as exclude files that end in ..System.sol, by putting them under excludeSystems.

Sample usage

pnpm mud worldgen

Options

These are the command line options you can specify on mud worldgen:

OptionMeaningTypeDefault value
--versionShow version numberbooleanfalse
--configPathPath to the config filestringmud.config.ts
--cleanClear the worldgen directory before generating new interfacesbooleantrue
--helpShow helpbooleanfalse

Debugging

To generate debug messages, use this command:

export DEBUG=mud:common:codegen