World Explorer

World Explorer is a GUI tool designed for visually exploring and manipulating the state of worlds.

Getting started

1. Install the package
pnpm add @latticexyz/explorer
2. Start a local development chain

Ensure you have a local development chain running.

3. Run the World Explorer
npx @latticexyz/explorer --worldAddress <YOUR_WORLD_ADDRESS>

Alternatively, if you have a worlds configuration file:

npx @latticexyz/explorer --worldsConfigPath <PATH_TO_WORLDS_CONFIG>

Note: You can use @latticexyz/store-indexer for indexing your world's data.

CLI arguments

The World Explorer accepts the following CLI arguments:

ArgumentDescriptionDefault value
worldAddressThe address of the world to exploreNone
worldsFilePath to a worlds configuration file (used to resolve world address)None
indexerDatabasePath to your SQLite indexer database"indexer.db"
chainIdThe chain ID of the network31337
portThe port on which to run the World Explorer13690
envThe environment to run the World Explorer in (e.g., "development", "production")"production"

Example setup

An example setup is provided in the examples/local-explorer directory, demonstrating a full setup for using the World Explorer in a local development environment:

1. Setup
cd examples/local-explorer && pnpm install
2. Run
pnpm dev

This command starts all necessary processes, including a local chain, indexer, and the explorer.

Contributing

To contribute to or modify the World Explorer, the easiest way is to run the example setup in development mode:

1. Setup

Navigate to the examples/local-explorer directory and locate the mprocs.yaml file.

2. Configure

In mprocs.yaml, ensure the explorer command is set up correctly. For example:

explorer:
  shell: pnpm explorer --worldsConfigPath packages/contracts/worlds.json --env development
3. Run
pnpm dev

Files can now be edited in the packages/explorer directory, and changes will be reflected in the running World Explorer instance.