How eedcd/map-packer works
map-packer is a Minecraft map-packing CLI. A user invokes commands through the Typer entry point: init scaffolds a map project, sync copies a configured save into a target and optionally prunes pristine chunks and clears cached lighting/heightmaps, then pack optionally minifies datapacks and creates a named archive in a supported format. Configuration and terminal presentation are shared internal layers. The excerpts show the command registrations and sync’s configuration/UI/world dependencies; pack’s datapack-minification capability is documented in its source. Other internal calls are omitted where excerpts do not establish them.
Main entry points: sync.py Save sync · pack.py Archive pack · cli.py Command router · ui.py Terminal UI
Components 13
CLI entry
- Command router
src/cli.py - Terminal UI
src/lib/ui.py
Project setup
- Project init
src/commands/init.py - Config reader
src/lib/config.py
World sync
- Save sync
src/commands/sync.py - Save path input
src/commands/sync.py - File reconciliation
src/commands/sync.py - Pristine chunk pruning
src/lib/world.py - Chunk cache cleanup
src/lib/world.py
Archive packing
- Archive pack
src/commands/pack.py - Datapack minifier
src/lib/datapack.py - Compressed map archive
src/commands/pack.py
Other components
- CLI user
Connections 15
- CLI user → Command router: invokes
src/cli.py - Command router → Project init: registers
src/cli.py - Command router → Save sync: registers
src/cli.py - Command router → Archive pack: registers
src/cli.py - Project init → Terminal UI: reports through
src/commands/init.py - Save sync → Save path input: reads
src/commands/sync.py - Save sync → Config reader: loads
src/commands/sync.py - Save sync → File reconciliation: reconciles
src/commands/sync.py - Save sync → Pristine chunk pruning: prunes via
src/commands/sync.py - Save sync → Chunk cache cleanup: optimizes via
src/commands/sync.py - Save sync → Terminal UI: reports through
src/commands/sync.py - Archive pack → Config reader: loads
src/commands/pack.py - Archive pack → Datapack minifier: minifies via
src/commands/pack.py - Archive pack → Compressed map archive: writes
src/commands/pack.py - Archive pack → Terminal UI: reports through
src/commands/pack.py