CLICommands
lottery
snug lottery <COMMAND>Lottery operations (weighted random selection).
Subcommands
| Command | What it does |
|---|---|
add | Add or update an item in a lottery table |
batch-add | Add many items to a table from a JSON file (array of {item_id, weight, meta}) |
draw | Draw items from a lottery table |
adjust | Adjust item weight atomically |
info | Get lottery table information |
list | List all lottery tables |
delete-item | Delete an item from a lottery table |
delete-table | Delete an entire lottery table |
Run snug lottery <command> --help for that command's own options.
The global options apply everywhere.
Examples
snug lottery add -t loot -i rare_sword -w 10 -m '{"rarity":"legendary"}'
snug lottery add -t loot -i common_potion -w 200
snug lottery info -t loot
snug lottery list
snug lottery draw -t loot -c 5 --unique
snug lottery draw -t loot -c 1 --remove
snug lottery draw -t loot -c 3 --seed 42
snug lottery adjust -t loot -i rare_sword --increment 5
snug lottery adjust -t loot -i rare_sword --increment -5 --min-weight 1 --max-weight 100
snug lottery delete-item -t loot -i rare_sword
snug lottery delete-table -t loot -fNext
- lottery guide - what the service does and when to reach for it.
- API reference - every endpoint these commands call.
- CLI reference - global options, output modes, and exit codes.