Impex CLI
The FinalBiome Impex CLI is a powerful tool developed to simplify the process of game configuration within FinalBiome. It allows developers to easily experiment with various asset and characteristic configurations by enabling the Import and export of game configurations in JSON format.
Key Benefits
- Ease of Configuration: With just the game's address, developers can download the full specification of a game from FinalBiome and load it back, making the testing of game mechanics on test nodes a breeze.
- Change Management: The game specification is presented in JSON format, which enables developers to store it in version control systems for easy tracking and management of changes.
- Automatic Configuration: The utility facilitates automatic game configuration based on the spec, requiring only an organization seed and a manager seed.
When a game is created from a specification, all managers that were in the original game are created. The manager under whose name the game is created is also added to the list of managers (if not already included).
Usage
Commands
export
- Export game spec to a fileimport
- Create a game from the game spec filehelp
- Print this message or the help of the given subcommand(s)
Options
h
,-help
- Print help informationV
,-version
- Print version information
Examples
Exporting a Game Spec
Use the export
command to export the game spec to a JSON file.
finalbiome-impex export -g ./game_spec.json -o 5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw
Importing a Game Spec
You can import the game spec file to create a new game using the import
command.
finalbiome-impex import -g ./game_spec.json -s 0xe5be9a5092b81bca64be81d212e7f2f9eba183bb7a90954f7b76361f6edb5c0a -m 0x398f0c28f98885e046333d4a41c19cee4c37368a9832c6502f6cfd182e2aef89
Alternatively, you can use a secret seed or secret URI to import the game spec file:
cargo run import -g ./game_spec.json -s //Alice -m //Bob
Command Details
Export
The export
command allows you to export the game spec to a JSON file.
finalbiome-impex export [OPTIONS] --organization <ORGANIZATION>
Options:
e, --endpoint <ENDPOINT>
- The RPC endpoint of the network node (default:ws://127.0.0.1:9944
)o, --organization <ORGANIZATION>
- Game address in SS58 formatg, --game-spec <GAME_SPEC>
- Path to the game file to which the game configuration will be written (default:./game_spec.json
)w, --overwrite
- Overwrite the file if it exists?h, --help
- Print help information
Import
The import
command allows you to create a game from the game spec file.
finalbiome-impex import [OPTIONS] --game-spec <GAME_SPEC> --organization-seed <ORGANIZATION_SEED> --manager-seed <MANAGER_SEED>
Options:
e, --endpoint <ENDPOINT>
- RPC endpoint of the network node (default:ws://127.0.0.1:9944
)g, --game-spec <GAME_SPEC>
- Path to the game file from which the game configuration will be reads, --organization-seed <ORGANIZATION_SEED>
- Game organization account key seed (may be a secret seed or secret URI)m, --manager-seed <MANAGER_SEED>
- Game manager on whose behalf the game will be configured (may be a secret seed or secret URI)h, --help
- Print help information