How maciejwlodarski/mcpm works
MCPM is a CLI package manager and optional direct launcher for isolated Minecraft Java profiles. The main workflow initializes/selects a profile, resolves Modrinth mods and dependencies, applies changes to its mod directory, then prepares and launches the game. Profile state and shared launcher downloads serve different lifetimes. The graph follows documented product capabilities; several command and launcher internals are unsampled, so their wiring is shown only where the excerpts or README establish it.
Main entry points: mcpm.js Command router · launch.js Prepare and launch · installer.js Dependency resolution and apply · index.js Launcher commands
Components 29
CLI and profiles
- Command router
bin/mcpm.js - Initialize profile
src/commands/init.js - Profile commands
src/commands/projects.js - Configure profile
src/commands/configure.js - Profile resolution
src/projects.js - Optional feature manager
src/features.js
Mod management
- Search mods
src/commands/search.js - Modrinth API
src/api.js - Install and remove
src/commands/install.js - Dependency resolution and apply
src/installer.js - Update mods
src/commands/update.js - Version upgrade
src/commands/upgrade.js - File downloader
src/downloader.js
Direct launcher
- Launcher commands
features/launcher/src/index.js - Account authentication
features/launcher/src/auth.js - Prepare and launch
features/launcher/src/launch.js - Game metadata
features/launcher/src/metadata.js - Minecraft runtime downloads
features/launcher/src/minecraft-runtime.js - Verified downloads
features/launcher/src/downloads.js - Java runtime selection
features/launcher/src/java-runtime.js
Persistent state
- Profile config and lock
src/config.js - Profile registry
src/projects.js - Encrypted session storage
features/launcher/src/secure-storage.js - Shared runtime cache
features/launcher/src/launch.js
Other components
- CLI user
- Microsoft and Xbox services
- Fabric Meta
- Modrinth service
- Minecraft process
Connections 38
- CLI user → Command router: runs commands
- Command router → Initialize profile: dispatches
- Command router → Profile commands: dispatches
- Command router → Configure profile: dispatches
- Command router → Search mods: dispatches
- Command router → Install and remove: dispatches
- Command router → Update mods: dispatches
- Command router → Version upgrade: dispatches
- Command router → Optional feature manager: loads features
- Initialize profile → Modrinth API: fetches versions
- Initialize profile → Profile config and lock: writes profile
- Initialize profile → Profile resolution: registers profile
- Profile commands → Profile resolution: resolves registry
- Configure profile → Profile config and lock: updates settings
- Search mods → Modrinth API: searches
- Modrinth API → Modrinth service: requests metadata
- Install and remove → Dependency resolution and apply: applies mod plan
- Update mods → Dependency resolution and apply: resolves and applies
- Version upgrade → Dependency resolution and apply: migrates mod set
- Dependency resolution and apply → Modrinth API: resolves versions
- Dependency resolution and apply → File downloader: downloads mod files
- Dependency resolution and apply → Profile config and lock: writes config and lock
- Dependency resolution and apply → Profile resolution: resolves project root
- Optional feature manager → Launcher commands: loads optional module
- Launcher commands → Profile resolution: gets profile context
- Launcher commands → Account authentication: creates or renews session
- Launcher commands → Encrypted session storage: reads and saves session
- Account authentication → Microsoft and Xbox services: authenticates
- Launcher commands → Prepare and launch: prepares or starts
- Prepare and launch → Game metadata: resolves game metadata
- Game metadata → Fabric Meta: resolves Fabric profile
- Prepare and launch → Minecraft runtime downloads: prepares game files
- Minecraft runtime downloads → Verified downloads: downloads verified files
- Prepare and launch → Java runtime selection: selects Java
- Minecraft runtime downloads → Shared runtime cache: reads and writes cache
- Prepare and launch → Shared runtime cache: reuses runtime data
- Prepare and launch → Encrypted session storage: uses session
- Prepare and launch → Minecraft process: starts game