Dev setup
What a Windows PC needs to work on EDGEmat. The shared tools are the same as in REDcode’s setup guide. The code starts in M1: the extension in extensions/edgemat and the MCP server in packages/edgemat-mcp, one npm workspace.
1. Base tools
| Tool | Version used | Why | Install |
|---|---|---|---|
| Git for Windows | as REDcode | Source control | winget install --id Git.Git -e |
| nvm for Windows and Node.js | as REDcode (Node 24) | The tool will be TypeScript, as the rest of the ecosystem | winget install --id CoreyButler.NVMforWindows -e, then nvm install 24 and nvm use 24 |
| Python | 3.10 or later | Brand tooling | |
| Chrome or Edge | any | Renders the brand images | Already present on Windows |
| REDbridge | 0.8.0 (0.7.0 or later works for M1) | Reads and writes game files | See REDbridge’s setup guide |
2. Repository and GitHub
git clone https://github.com/Edgemodders/EDGEmat.git
cd EDGEmat
git config user.name "CyberbuildsAI"
git config user.email "340969962+CyberbuildsAI@users.noreply.github.com"
3. Game access for spec checks
M0 checks the behavior spec against the game through REDcode’s MCP server, redcode-mcp, which runs REDbridge. Nothing is installed into EDGEmat itself. Set up on the dev PC on 2026-10-14:
| Tool | Version used | Notes |
|---|---|---|
| REDcode checkout | commit 31dd076 |
redcode-mcp 0.1.0, already built at packages\redcode-mcp\dist\server.cjs |
| REDbridge | bridge_info reports 0.7.0, WolvenKit 9.1.0 |
The built exe is older than its source (0.7.2). Nothing used here needs 0.7.1 or later |
| Claude Code | 2.1.299 | The MCP client |
| Node.js | 24.11.1 | Runs the server |
| Python | 3.13.9, with Pillow 11.3.0 and numpy 2.4.3 already present | Mask analysis in the scratchpad |
# In the REDcode checkout, only if dist\server.cjs is missing:
npm install
npm run mcp:build
# Register it for Claude Code sessions in this repo (local scope, not committed):
claude mcp add redcode -- node "E:\Modding\Cyberpunk 2077\REDcode\packages\redcode-mcp\dist\server.cjs"
claude mcp list # redcode: ... - Connected
The server finds REDbridge and the game from REDcode’s VS Code settings (redcode.bridgePath, redcode.gamePath), so no arguments are needed on a PC with REDcode set up. A session already running when the server is added cannot see its tools; it can still drive the server as a plain MCP client over stdio.
In-game tests use a WolvenKit project outside the repo, E:\Modding\Cyberpunk 2077\Projects\EDGEmat_M0. Game files and anything extracted from them stay there or in the session scratchpad, never in this repo.
4. Build, test and package
Installed with npm install at the repository root on 2026-10-16 (Node 24.11.1, npm 11.14.1):
| Package | Version | Used by |
|---|---|---|
vscode-jsonrpc |
9.0.3 | The bridge client (copied from REDcode), bundled into the extension and the MCP server |
pngjs |
7.0.0 | Thumbnails, pure JavaScript, bundled |
@modelcontextprotocol/sdk |
1.32.1 | The MCP server, bundled |
zod |
3.25.76 | The MCP server’s tool schemas, bundled |
esbuild |
0.28.2 | Bundling |
typescript |
5.9.3 | Type checks |
@types/vscode |
1.70.0 | The extension’s API level (VS Code 1.70 or later) |
@vscode/vsce |
4.0.0 | Packaging the VSIX |
npm install
npm run typecheck # both packages
npm run build # extensions/edgemat/dist, packages/edgemat-mcp/dist and packages/edgemat-core/dist
npm run smoke # M1's test: builds the library from the game and checks its counts
npm run edgemat:package # dist\edgemat-0.1.0.vsix
code --install-extension dist\edgemat-0.1.0.vsix
The smoke test finds the game and REDbridge from the VS Code settings (edgemat.*, then redcode.*), as the extension does, and writes the library to %LOCALAPPDATA%\EDGEmat. F5 in VS Code, with the repository open, runs the extension in a development host (.vscode/launch.json, “Run EDGEmat”); build first. “Run EDGEmat with REDcode main” runs REDcode’s checkout beside it (../REDcode: git pull, then npm run build in extensions/redcode), for what needs a REDcode not yet released, such as its Keys (EDGEmat #18).
Register the MCP server with Claude Code (no options needed on a PC with REDcode set up). --scope user makes it available in every folder, the development host’s too; without it, only in the folder where the command ran:
claude mcp add --scope user edgemat -- node "E:\Modding\Cyberpunk 2077\EDGEmat\packages\edgemat-mcp\dist\server.cjs"
For mat_generate (and mat_reshape’s Tripo step), the server reads each key at each call from its environment (GEMINI_API_KEY, OPENAI_API_KEY, TRIPO_API_KEY) when set, else from REDcode’s Keys (the EDGE tools’ shared store), through a REDbridge 0.18.0 of its own started with --keys (found as for the game, else the one inside REDcode; EDGEmat #18). So with REDcode’s Keys set up no -e is needed. -e with a key still wins; remove and add again to change it (claude mcp remove --scope user edgemat). mat_from_image and mat_apply need no key. The check scripts (paint-check, reshape-check) take the same variables, or on the dev PC the keys still in the shared key store, through REDnode’s checkout (scripts/devKey.mjs).
claude mcp add --scope user edgemat -e GEMINI_API_KEY=<your key> -e OPENAI_API_KEY=<your key> -- node "E:\Modding\Cyberpunk 2077\EDGEmat\packages\edgemat-mcp\dist\server.cjs"
When F5’s host crashes
The development host sometimes dies at startup with “Extension host terminated unexpectedly”. It was seen with EDGEmat, EDGEfab and REDcode; pressing F5 again works, sometimes on the third or fourth try. Found on 2026-11-18 from VS Code’s logs (%APPDATA%\Code\logs\<session>\main.log and each window<n>\renderer.log):
| Fact | Seen |
|---|---|
| Exit code | 134 (an abort), about 1.1 s after the host starts, before it writes its own log |
| Which windows | Only F5’s development hosts (EDGEmat and EDGEfab); no normal window crashed in two days of logs |
| Windows’ event log, crash dumps | Nothing for these crashes |
| The cause | Unverified. The timing points at the debugger connecting to the host, which waits at its first line under F5 |
What to do:
- Ctrl+F5 (Run Without Debugging) starts the host without the debugger. EDGEmat’s work does not need breakpoints, so this is the usual way to run it.
launch.jsonturns off the debugger’s web worker host and child process attaching (fewer connections at startup) and has"trace": true. After a crash, the debugger’s log for that session is in the F5 window’s log folder,exthost\ms-vscode.js-debug(or the folder the Debug Console names); the abort’s message is in it. The F5 window’s Debug Console shows the same message until the next run.
Releasing
From 0.3.0, the first preview (0.2.0 was never released). .github/workflows/release.yml is the same workflow as REDnode’s (from 2026-10-22; before that, publish.yml ran on a pushed v* tag). In the Actions tab, Release › Run workflow builds the files and keeps them as the run’s artifact EDGEmat-build, to install and test before a release. With Make a release ticked, it also releases. It checks that both packages have one version (tools/version.mjs --check), stops when the run is not on main or the version’s tag exists, takes the release notes from the version’s section of docs/changelog.md (and stops when there is none), typechecks, builds, packages the VSIX for Windows x64, tags the commit v<version> and makes the GitHub release with the VSIX, the MCP server as edgemat-mcp-<version>.cjs, the Nexus Mods zip EDGEmat-<version>-nexus.zip (nexus/README.md) and THIRD-PARTY-NOTICES.txt. Before the GitHub release it publishes the VSIX to the VS Code Marketplace and Open VSX, as REDcode’s workflow does, with the Edgemodders organisation secrets VSCE_PAT and OVSX_PAT; each step runs even when another failed, and the run fails if any did. The extension’s "preview": true gives it the Marketplace’s Preview badge. The extension carries the MCP server (dist/mcp/edgemat-mcp.cjs, built by its esbuild.mjs from packages/edgemat-mcp). When all of that succeeded, the npm job publishes @edgemodders/edgemat-mcp with provenance (NPM_TOKEN, as REDcode’s redcode-mcp), with the license and the notices copied beside it, then the core as @edgemodders/edgemat-core (packages/edgemat-core, EDGEmat #7, from 0.3.2): one CommonJS file built from extensions/edgemat/src/core with its types, pngjs and vscode-jsonrpc as dependencies, for EDGEfab and other tools’ MCP servers. It publishes even when the server’s step failed. Its first publish makes a new package under @edgemodders, so NPM_TOKEN must be allowed to (unverified: a token for edgemat-mcp only would refuse it).
The changelog is docs/changelog.md, kept the same way as REDnode’s: each change a modder would notice gets a line under Unreleased in its group (New, Changed, Fixed, Other), in the same commit as the change. tools/release/notes.mjs turns it into the GitHub notes, the version’s short Nexus summary (--nexus: the hand-written <!-- nexus ... --> block under the version’s heading, rules at the top of the changelog; the release stops without it), and the extension’s CHANGELOG.md (--extension, run by vscode:prepublish when the VSIX is packaged; that file is generated, not committed).
- Make sure every test since the last release passed (Tests). Untested or failed means no release.
- In
docs/changelog.md, rename Unreleased to## <version> (<date>)and start a new empty Unreleased above it. Check the notes withnpm run release:notes -- <version>. - Raise the version:
node tools/version.mjs <version>sets it in the extension, the MCP server, the core package and the lock file (node tools/version.mjsalone shows where each stands). - Update
nexus/description.bbcodefor what changed (npm run nexus:statusfirst: if the live description changed on Nexus,npm run nexus:pulland merge). Commit and push tomain. - On GitHub: Actions › Release (left) › Run workflow (right) › branch
main, tick Make a release and Update Nexus Mods, press the green Run workflow (orgh workflow run release.yml --ref main -f release=true -f nexus=truefrom a terminal;npm run releaseleaves Nexus out). Watch the run. Without the ticks, the same button gives a test build: the run’s page has the files under Artifacts. Then install the release in a normal VS Code (not the development host): from the Extensions view, which takes it from the Marketplace, or the release’s VSIX withcode --install-extension. Check that its version is the new one, and that the Nexus page shows it. -
Bring EDGEweb up to the release (every Edgemodders repo’s rule, EDGEmat #16): right after the release, in the same piece of work, EDGEmat’s session brings every EDGEweb page about EDGEmat up to the released version. It follows releases, not
main: never before the release. It is prose a session writes, so no workflow does it. In the sibling checkout../EDGEweb(git pullfirst), with the version’s section ofdocs/changelog.mdas the list of what changed:Pages What docs/wiki/edgemat/Each page a change touches: its text, screenshots, and its revieweddateShared wiki pages ( docs/wiki/library.md,glossary.md,first-hour.md,faq.md, and others:grep -rln EDGEmat docs/wiki)EDGEmat’s rows and lines docs/index.html(EDGEmat’s card) anddocs/platform.html(its section,#edgemat)The version, the status line, what is new and what is next Follow EDGEweb’s
CLAUDE.md, Wiki, for front matter, terms and screenshots. Commit and push to EDGEweb’smainasCyberbuildsAI, with the dashboard entry.For the next release’s wiki (each change a modder would notice since the last release, with the pages it touches; emptied after each release’s step 6):
Change EDGEweb pages Game materials on a game mesh on the Desk: Use a Game Surface, Use a Game Material, Back to the Game’s Material; Add to Project carries the changed mesh desk.md,settings.md(the new command),assistants.md(mat_apply/mat_partsdesk_id)Connect Claude Code finds claudeoutside the Windows PATHassistants.md,troubleshooting.mdMessages start with EDGEmat: and offer Reveal in REDcode (#15) desk.mdShine in View in 3D: roughness and metal with the colors, the setup editor’s unsaved edits included (needs REDcode 0.10.15 or later) view-in-3d.md,setup-editor.mdView in 3D opens on the look clicked, with a REDcode that has openMesh(REDcode #38); older REDcodes keep the status-bar hintview-in-3d.md,desk.mdBumps in View in 3D: folds, seams and a fabric’s weave as relief (each layer’s Bumps preset over the garment’s folds; a textured material’s own normal map) view-in-3d.md,setup-editor.mdLayer edges smooth in View in 3D and on the setup map (masks stored small); Remove on the Desk asks about unsaved setups and closes their tabs view-in-3d.md,setup-editor.md,desk.mdOpen in EDGEmat shows in Game Assets only on a mesh, setup or surface (REDcode 0.10.5 or later) desk.md,troubleshooting.mdThe color filter shows the closest colors when none is named so (a road has greys only); grayfindsgrey(#20)setup-editor.md,troubleshooting.mdGlass and glow in View in 3D (REDcode 0.10.18 or later): glowing parts glow and stay lit in the dark, glass is see-through; repeated Roughness labels show their range view-in-3d.md,setup-editor.mdLayered materials drawn live in View in 3D (a REDcode with #43): sharp up close, and number edits in the setup editor show as you make them; neon signs glow in their own color view-in-3d.md,setup-editor.md
When a release run stops partway (0.3.2, 2026-11-13: the VS Code Marketplace step failed on an expired VSCE_PAT, so npm never ran): do not run Release again, which stops at “already released”. Fix the cause (renew the token in the organisation’s secrets), then Actions › Finish a release › Run workflow with the version and what is missing (gh workflow run finish-release.yml --ref main -f version=<version> -f marketplace=true -f npm=true). It works from the tag: the Marketplace gets the GitHub release’s VSIX, and npm the MCP server and the core built from the tag, skipping a package already at that version. VSCE_PAT is an Azure DevOps personal access token with the Marketplace › Manage scope for All accessible organizations; they expire, at most a year after they are made.
Nexus Mods (page 35422) is kept through Nexus’s v3 API, as REDnode’s is: the Nexus tool (in EDGErepo: check it out beside this repo to run the nexus:* scripts; the release workflows clone it at the tag v1), nexus/nexus.json, the organisation secret NEXUS_KEY in CI and a DPAPI key file on the dev PC. With Update Nexus Mods the workflow checks the page before building (it stops if the description changed on Nexus since the last pull) and, after the GitHub release, uploads the Nexus zip as the main file’s new version with Mod Manager Download off (an extension, not a game mod), archives the old one, adds the changelog and pushes the description. Details in nexus/README.md.
Licenses. The extension and the MCP server bundle npm packages (MIT, ISC, BSD-3-Clause). tools/release/notices.mjs lists them from the builds’ source maps with their license texts: into the VSIX (vscode:prepublish), and into dist/THIRD-PARTY-NOTICES.txt for the release and the Nexus zip. Generated, never committed.
npm run release:notes # the GitHub notes of the extension's version
npm run release:notes -- 0.3.0 --nexus # plain lines for Nexus's changelog field
Releasing Wardrobe Designer
Wardrobe Designer (apps/wardrobe-designer, a REDnode app) has its own release, apart from EDGEmat’s, the way REDnode’s app packs have theirs: its version in rednode-app.json (and package.json, the same), its changelog apps/wardrobe-designer/changelog.md, its tags wardrobe-designer-v<version>, its workflow .github/workflows/release-wardrobe.yml (Release Wardrobe Designer) and its Nexus page, mod 36636 (apps/wardrobe-designer/nexus/). The zip, built by tools/release/wardrobe-zip.mjs, is laid out like the game folder (red4ext/plugins/REDnode/apps/wardrobe-designer/, with the app off until the player switches it on, LICENSE.txt and THIRD-PARTY-NOTICES.txt from tools/release/notices.mjs --wardrobe), so Vortex installs it; Mod Manager Download is on. Its GitHub release is not marked as the repo’s latest, which stays EDGEmat’s.
- Make sure every Wardrobe Designer test since its last release passed (Tests). Untested or failed means no release.
- Raise
versioninapps/wardrobe-designer/rednode-app.jsonandpackage.json. In its changelog, rename Unreleased to## <version> (<date>), start a new empty Unreleased above it, and write the Nexus summary under the heading. Check:node tools/release/notes.mjs --wardrobeandnode tools/release/notes.mjs --wardrobe --nexus. - Update
apps/wardrobe-designer/nexus/description.bbcodefor what changed (npm run wardrobe:nexus:statusfirst: if the live description changed on Nexus,npm run wardrobe:nexus:pulland merge). Check it withnode tools/check-bbcode.mjs apps/wardrobe-designer/nexus/description.bbcode. Commit and push tomain. - Actions › Release Wardrobe Designer › Run workflow › branch
main, tick Make a release and Update Nexus Mods (ornpm run wardrobe:release -- -f nexus=true). Without the ticks, it builds the draft zip as the run’s artifactWardrobe-Designer-build. - Install the release’s zip in the game (Vortex, or extracted into the game folder) and check the app starts, as the test “Wardrobe Designer install” says.
- Bring EDGEweb up to the release, as EDGEmat’s step 6 says, for the pages that mention Wardrobe Designer (
grep -rln -i "wardrobe" docsin../EDGEweb), with its changelog’s section as the list.
npm run wardrobe:zip # builds the app and dist/Wardrobe-Designer-<version>-draft.zip
npm run wardrobe:nexus:status # the page, its files, and whether its description matches the repo
5. Docs site and brand images
The site at https://edgemodders.github.io/EDGEmat/ is built by .github/workflows/pages.yml on every push to main. Settings > Pages > Source must be GitHub Actions.
.\tools\brand\render.ps1 # banner, social preview, icon, badges
| Output | Used by |
|---|---|
docs/assets/brand/banner.png |
README header |
docs/assets/brand/social.png |
Upload by hand in Settings > General > Social preview |
docs/assets/brand/nexus.png |
The Nexus page’s primary image, 1280 x 640. Made by hand, not rendered |
docs/assets/brand/icon.png |
Site icon, and the extension’s Marketplace icon later |
tools/brand/activity.svg |
The activity bar icon. Drawn by hand, not rendered: 24 × 24, stroke 2, currentColor, the family’s HUD brackets as in REDcode and EDGEdeck. M1 copies it to extensions/edgemat/images/activity.svg |
docs/assets/brand/badges/*.svg |
README badges. Edit the list in tools/brand/badges.py |
docs/assets/wardrobe-designer/*.png |
Wardrobe Designer’s banner, social, Nexus (with room for the EDGEmodders header, added by hand) and icon images, drawn by .\tools\brand\render-wardrobe.ps1 from tools/brand/wardrobe.html (the style of REDnode’s app packs) |