mc is a simple, stable command-line app for Minecraft mods.
Currently supported commands:
mc init [--version <mcVersion>] [--loader <forge|fabric|neoforge>]mc mod search <mod-name>mc mod lsmc mod add <mod-slug-or-id>mc mod download [--dir <path>]mc mod rm <mod-slug>mc mod tree
Unsupported command groups (resource, modpack, shader, plugin) intentionally return a not-supported error for now.
The CLI uses mc.toml in the current directory.
[project]
mc-version="1.20.1"
loader="forge"
[mods]
sodium="<version number>"
fabric-api="<version number>"Initialize with defaults:
mc initInitialize with explicit version/loader:
mc init --version 1.21.1 --loader fabricSearch mods only:
mc mod search sodiumAdd a mod and required dependencies:
mc mod add sodiumDownload jars listed in the manifest:
mc mod downloadDownload to a custom directory:
mc mod download --dir ./project/modsDownloads are verified with Modrinth sha512 hashes. Existing files are rechecked and re-downloaded if hashes do not match.
List current manifest mods:
mc mod lsRemove a mod from manifest:
mc mod rm sodiumBy default rm is safe: it blocks removing a dependency that other installed mods still require.
Remove a mod and prune orphan dependencies:
mc mod rm sodium --pruneForce-remove even if dependents exist:
mc mod rm sodium --forceShow dependency tree:
mc mod tree- Resolver is loader-aware and version-aware (uses manifest
mc-version+loader). - Required dependencies are added once (deduplicated DAG traversal).
- Incompatible exact dependency versions produce a hard error with conflict details.
- Manifest updates are atomic and only written after successful full resolution.
- Dependency graph cache is stored at
.mc/graph-cache.jsonfor fasterrmandtree.