Your setup
What a few commands need beyond scmjs itself, and how to keep it up to date.
Downloading the program#
Each release has scmjs as a single program with Node inside it:
| System | Download |
|---|---|
| Windows (x64) | scmjs-cli-windows-x64.zip |
| macOS (Apple silicon) | scmjs-cli-macos-arm64.tar.gz |
| macOS (Intel) | scmjs-cli-macos-x64.tar.gz |
| Linux (x64) | scmjs-cli-linux-x64.tar.gz |
Each archive holds scmjs (scmjs.exe on Windows) and the licences of what is inside it.
Put the program in a folder on your PATH so that scmjs works from any folder.
On Windows, make a folder such as C:\Tools, unpack scmjs.exe into it, and add the
folder to your Path under Settings ▸ System ▸ About ▸ Advanced system settings ▸
Environment Variables.
On macOS and Linux, download and unpack it in one step, using the file name for your system from the table:
curl -L https://github.com/scm-js/scm-js/releases/latest/download/scmjs-cli-linux-x64.tar.gz | tar -xz scmjs
sudo mv scmjs /usr/local/bin/
The programs are not code-signed yet, so the first run of a copy downloaded in a browser may be stopped:
- Windows shows SmartScreen's "Windows protected your PC". Choose More info, then Run anyway.
- macOS says "the developer cannot be verified". Allow it under System Settings ▸ Privacy
& Security, or clear the flag once in Terminal with
xattr -d com.apple.quarantine scmjs. A copy fetched withcurl, as above, is not stopped.
To check a download, the release's SHA256SUMS file lists each file's checksum.
sha256sum -c SHA256SUMS --ignore-missing (shasum -a 256 -c SHA256SUMS on macOS) checks
the files you downloaded against it.
Checking your setup#
Most commands need nothing more than the command itself. A few need more: TypeScript,
Docker, or your copy of StarCraft. scmjs doctor says what this computer has, what each
thing is for, and the command that installs what is missing. It ends with the commands
that cannot run yet and the one thing each lacks.
scmjs 0.13.3 · the newest · Node v24.13.0 · linux x64
Tools
✔ TypeScript 6.0.3 ~/maps/node_modules/typescript
▲ Docker not found
scmjs bot new|init|build run the bot toolchain in it.
https://docs.docker.com/get-docker/
✔ Browser chromium /usr/bin/chromium
✔ ffmpeg 6.1.1 · ffmpeg
✔ Desktop app scmJS.exe /mnt/c/Users/you/AppData/Local/Programs/scmJS/scmJS.exe
· Claude Code scmjs mcp not added
claude mcp add scmjs -- npx -y @scm-js/cli mcp
· scmjs.dev not signed in
scmjs login
The game
✔ StarCraft Remastered /mnt/c/Program Files (x86)/StarCraft
✔ Game engine 1248410ad2a0 ~/.cache/scmjs/engine
Not ready
✖ bot new|build Docker not found
What it looks for:
| Line | Needed by |
|---|---|
| TypeScript | map build, and map run or plugin dev with a plugin written in TypeScript |
| Docker | bot new, bot init, bot build and bot update |
| Desktop app | map open and replay open, which use the browser without it |
| Claude Code | scmjs mcp, when you use it from Claude Code |
| scmjs.dev | share, map share and replay share; map play signs in on the play page instead |
| Browser | replay export and map test --clips, which draw their clips in Chrome, Chromium or Edge |
| ffmpeg | replay export to an .mp4; a .webm or a .gif does without it |
| StarCraft | map preview, map analyze, map generate and every command that runs the game |
| Game engine | map trace, map cost, map coverage, map rush, map test, map heatmap, map balance, replay watch, replay export, bot run, bot ladder |
A dot instead of a tick means the thing is not there and nothing is wrong: ffmpeg, the
desktop app, Claude Code and a scmjs.dev sign-in are all optional. Only a missing thing
has lines under it. The Claude Code line looks for scmjs mcp among the servers Claude
Code knows, for every folder or for this one, and says so when Claude Code is not
installed.
The game engine line names the engine's build. Each command that plays the game drives the engine with a runner of its own; an engine fetched before the play page had a runner lacks that one, and the line says which it holds. The next command that needs a missing runner fetches it. Before anything is fetched the line says "not fetched yet".
The first line says which scmjs this is: the npm package says nothing more, and the
single program says "single executable", with the package manager it came from. --json
prints the checks, how this copy was installed and the list of ready commands as JSON. The
doctor changes nothing, and exits with 1 only when Node itself is too old (the single
program carries its own).
Commands that need StarCraft#
map preview draws a map with the game's graphics, map analyze reads which ground is
walkable from the game's tilesets, and map generate lays its ground with them.
map terrain and map doodads read a map's terrain and doodads from the tileset, and
map edit paints terrain and places doodads with it (on a map linked to the
editor, with the editor's own game data instead).
map set --settings fills in a unit's, upgrade's or technology's numbers from the game's
tables. map run gives a plugin the game's data when a copy is there, and runs without
when it is not. map trace, map cost, map coverage, map rush, map test,
map heatmap, map balance, replay watch, replay export, bot run and bot ladder
run the game itself. They need two things on your computer:
- Your copy of StarCraft, Remastered or 1.16.1. It is found in the usual places; otherwise
name its folder with
--starcraft <folder>or theSCMJS_STARCRAFTsetting. WhenSCMJS_STARCRAFTnames a folder that is not a copy of the game, the command tells you, and names the copy it used instead. A 1.16.1 folder holdsStarDat.mpq,BrooDat.mpqandpatch_rt.mpq. Without the patch the two hold the game's tables from before its patches, so the commands that run the game refuse such a folder, and the others draw the terrain and leave out what comes from those tables (unit sizes, walking speeds). Nothing of the game is fetched or carried by the command. - The game engine, for the commands that run the game. It is the engine of
scmjs.dev/play, about 25 MB to download (105 MB once on
disk), fetched the first time a command needs it and kept in your cache folder
(
~/.cache/scmjson Linux, the usual place on other systems;SCMJS_CACHEmoves it). The line that says so goes to standard error, so a--jsoncommand's output stays JSON. When the play page has newer runners, the next command fetches them and removes the old ones.
None of these run on a build server such as GitHub's, which has no copy of the game.
map diff --picture uses your copy when it finds one and draws the ground in plain greys
when it does not, so it runs there too.
Updating#
scmjs -v (or scmjs --version) prints the version alone, for a script. scmjs about
prints this version, whether a newer one is out and the line that installs it, how this
copy was installed, the desktop app and Docker if they are installed, and the addresses of
the editor, the docs and the source. Update the way you installed. With Homebrew:
brew update && brew upgrade scmjs
brew upgrade on its own refreshes the tap at most once a day, so it can report that the
version you have is the newest for up to a day after a release. brew update fetches the
tap first.
With Scoop:
scoop update scmjs
With winget:
winget upgrade scm-js.scmjs
With npm:
npm install -g @scm-js/cli@latest
For a downloaded program, download the newer file from the releases page and put it over the old one. Every way of installing gets each version on the same day.
Shell completion#
scmjs completion bash, zsh or fish prints a completion script with every command and
option in it. An option that takes one of a few values completes them (--lang gives
en ko), an option or argument that names a file completes files, and the script is made
again from the commands themselves, so it is regenerated, not edited, after an update.
Install it once, for the shell you use. For bash, add this line to ~/.bashrc:
eval "$(scmjs completion bash)"
For zsh, write it into a folder on your $fpath (~/.zsh/completions here):
scmjs completion zsh > ~/.zsh/completions/_scmjs
For fish:
scmjs completion fish > ~/.config/fish/completions/scmjs.fish
In Korean#
scmjs speaks English and Korean. It follows the computer's language: the locale on Linux
and macOS (LANG, or LC_ALL or LC_MESSAGES where one is set), the display language on
Windows. To choose for one command, give it --lang:
scmjs --lang ko info maps/*.scx
To choose for every command, set SCMJS_LANG to ko or en, in ~/.bashrc or your
shell's own startup file:
export SCMJS_LANG=ko
The help, the reports, Check Map's findings and the errors change language. What stays the same in every language:
- A map's own text: its name, description, strings and triggers.
- The text forms of triggers and strings,
map dumpandmap unpack --text. They are formats, sogit diffon a map reads the same on every computer. - The files a command writes: a baseline, a test file, the README and workflow
scmjs initmakes. A baseline written in Korean holds when the check runs in English. - A mod's folder as
mod unpackandmod newwrite it, and, for now, the findings ofmod checkand the lines ofmod diff; the rest of themodcommands' output follows the language. - In
--json, the keys and the values that name things (a finding's level, a kind) are English; a sentence in it, such as a finding's text, is in the chosen language. The CI formats ofmap checkdo the same: rule ids in English, messages in the language. scmjs mcpandscmjs lsp. The MCP server's tools are read by an AI model, and the language server passes on the TrigScript compiler's messages, which are English.
A few of the help's own words are left as they are: the usage line's [options] and
[command], which are syntax, and any error the command line library raises that the
translation does not know. The Korean was not written by a native speaker; a review is
welcome.