mc-icons
v1.10.1
Published
Parsing markdown file to replace item names into item icons.
Readme
E2E-E Icons
This TS-Node CLI app designed to automatically turn text in Markdown files into Minecraft's item icons, parsing their names or brackets.

Examples
Modpack Enigmatica 2: Expert - Extended using this tool for changelogs.
| Description | Capture | Result |
|-------------|---------|--------|
| Ignore markdown links | [docs](https://example.com) | — |
| Use numbers as metadata | [Flag] (1)[Flag] (0) | ![]()
|
| Specify mod by name, shorthand or abbreviation | [Ash] (forestry)[Green wall] (Actually Additions)[Fan] (cyclicmagic) | ![]()
![]()
|
| Items with exact match | [Beacon] |
|
| Names match case-insensitively | [beacon] |
|
| Item from Minecraft picked first | [Glass] |
|
| Output first items when all share one icon | [Advanced Pocket] (CC) |
|
| Ignore checkbox [x] and empty captures | [x] | — |
| Unknown names are left untouched | [ZZZNonExistentItemZZZ] | — |
| Add (every) to get all matching items | [Mossy Wall (every)] | ![]()
|
| Add (any) to pick only the first match | [Mossy Wall (any)] |
|
| Capture by full id <mod:name:meta:{nbt}> | [<tconstruct:large_plate:0:{Material:"fierymetal"}>][<minecraft:coal:1>] | ![]()
|
| Use (fluid) postfix to get a fluid | [Enriched Lava] (fluid) |
|
| Predefined placeholders | [<placeholder:pickaxe:3>][<placeholder:jackhammer:15>][<placeholder:null>] | ![]()
![]()
|
Usage
No install, no setup — one command. With NodeJS present:
npx mc-icons README.mdWrite [Item Name] (options) anywhere in a Markdown file, run the command, and
the file is rewritten in place with the matching Minecraft icons. The tool ships
prebuilt with its icon database, so the first run is ready immediately and will
interactively prompt you whenever a name is ambiguous.
Options
> npx mc-icons --help output:
Parsing markdown file to replace item names into item icons. (mc-icons)
USAGE mc-icons [OPTIONS] [INPUT]
ARGUMENTS
INPUT input file to mutate
OPTIONS
-t, -threshold, --treshold=<treshold> Levenshtein name mistake threshold (Default: 0)
-x, --max=<max> Maximum amount of icons in multiple results (Default: 64)
-r, --repo=<repo> Repository to make short links to (Default: https://cdn.jsdelivr.net/gh/Krutoy242/mc-icons@master/i/)
-m, --modpack=<modpack> Modpack shortand to filter icons, "e2ee" for example
-s, --silent Do not any prompt
-o, --short Shorten long links with is.gd (Default: true)
--no-o, --no-short
-d, --discord Interactive picker for Discord ANSI icons (Default: false)Developing
Everything is automated — you make commits, the rest regenerates and publishes itself.
One-command setup
pnpm installThat's it. A prepare lifecycle step installs the git hooks and builds the
project, so a fresh clone is ready to work immediately. (Requires
pnpm — corepack enable if you don't have it.)
Regenerating the icon database
Icons come from a live Minecraft instance, so this is the one step that needs your machine's game data. Collapsed into a single command:
- Install the IconExporter and JEIExporter mods.
- In-game, run
/iconexporter export 64(note this issue: a resized MC window can emit 32×32 despite the64), then export JEI data (defaultctrl+J). - Run:
The first run is interactive — it auto-detects common launcher locations and asks for your instance path, the IconExporter sub-folder, and the modpack short id, then remembers them inpnpm datamcicons.config.json(gitignored). Later runs are silent. It regeneratesassets/assets.db, copies new icons intoi/, and git-stages the result for you (no more manualadd-new-images). Usepnpm data --reconfigureto change the saved paths.
What happens automatically
- On commit (pre-commit hook, kept under ~3s): staged files are
eslint --fixed via theeslint_ddaemon (the first commit of a session warms it in ~6s, every commit after is ~instant), and the README autogen blocks are regenerated only when their source (src/tool/examples.tsorsrc/cli.ts) changes. - On push to
master(GitHub Actions): CI builds & tests on Linux + Windows and lints on Linux; semantic-release then derives the version, tag,CHANGELOG.md, GitHub release, and npm publish from your commit messages. Publishing requires anNPM_TOKENsecret in the repo settings.
Author
- https://github.com/Krutoy242
