CLI Reference
The rpgleveler command provides a command-line interface for leveling up
Basic Fantasy RPG characters from a JSON file.
Basic Usage
rpgleveler <input_file>
Example
rpgleveler my_character.json
This will: - Load the character from the input file - Apply one level-up - Print the updated character as JSON to stdout
Command Help
View all available options:
rpgleveler --help
Example output:
$ rpgleveler --help
usage: rpgleveler [-h] [--version] [--seed SEED] [--out OUT] input_file
Basic Fantasy Character Leveler CLI
positional arguments:
input_file Path to character JSON file
options:
-h, --help show this help message and exit
--version show program's version number and exit
--seed SEED Seed for deterministic dice rolls
--out OUT Write output to file instead of stdout
Arguments
input_file (required)
Path to a JSON file containing character data.
rpgleveler character.json
Options
--seed
Provide a seed for deterministic dice rolls.
This is useful for:
- Testing
- Reproducible results
rpgleveler character.json --seed 42
--out
Write the updated character to a file instead of printing to stdout.
rpgleveler character.json --out leveled.json
--version
Display the installed version of the CLI.
rpgleveler --version
Example Workflow
Level up a character and save the result:
rpgleveler test_character.json --seed 1234 --out test_character_lvl2.json
Output Format
The CLI outputs a JSON representation of the updated character.
Example:
{
"name": "Thorin",
"level": 2,
"hp": 14,
...
}
Notes
- The CLI performs exactly one level-up per invocation
- The original input file is never modified
- Output is always valid JSON
- All game rules are enforced by the engine