Command reference
Every command, with a link to where this guide describes it. scmjs <command> --help
gives its options.
scmjs info#
| Command | What it does |
|---|---|
scmjs info <files…> |
What a map, replay or bot file holds, whichever it is |
scmjs map#
| Command | What it does |
|---|---|
scmjs map info <maps…> |
Size, tileset, players, units, triggers, strings and the check in one line; --table for a folder |
scmjs map check <maps…> |
Check Map: errors, then warnings; --format github, junit or sarif for CI; --baseline fails only on new findings |
scmjs map dump <map> |
The whole map as text, for git diff and grep |
scmjs map find <text> <maps…> |
Edit ▸ Find across maps: units, locations, strings, triggers |
scmjs map preview <map> |
A picture of the map, in the terminal or as a PNG with --out |
scmjs map sounds [list|export] <map> |
The sounds the map carries, listed or written out as WAV and Ogg files |
scmjs map fetch <words…> |
Searches scmscx.com, and downloads a map with --id or --first |
scmjs map open <map> |
Opens the map in scmJS |
scmjs map new <map> |
A new map: flat ground, start locations placed |
scmjs map generate <map> |
A symmetric melee map from a seed, walked and checked before it is written |
scmjs map set <map> |
The name, description, revision or text encoding |
scmjs map resize <map> |
Scenario ▸ Resize: another size, anchored |
scmjs map triggers export|import|edit |
The triggers as a text or .trg file and back; edit opens them in your editor |
scmjs map strings export|import|edit|prune |
The strings as a text file and back; prune removes the unused ones |
scmjs map optimize <map> |
The map made smaller: unused sounds, files and strings out, compressed again; --strip-editor drops the editor-only sections too |
scmjs map unpack <map>, scmjs map pack <folder> |
The map's archive as a folder of files, and back |
scmjs map unpack <map> --text |
The scenario as text files to keep in git; map pack builds the map from them |
scmjs map build <map> |
Builds the map's TrigScript script into it, as Save does |
scmjs map run <plugin> <map> |
Runs a plugin, or a script written like one, over the map |
scmjs map diff <a> <b> |
What changed between two maps, or since a git revision with --rev; --picture shows where |
scmjs map log <map> |
The commits that changed the map, each with what it changed in the map's terms |
scmjs map blame <map> |
The commit, author and date that last changed each trigger, location, string, unit group or setting |
scmjs map merge <base> <ours> <theirs> |
Two versions of a map merged with their common ancestor, as git's merge driver |
scmjs map trace <map> |
Runs the triggers in the game: which fired, how often, which never did and why |
scmjs map trace [map] --replay <rep> |
The same for a replay's game: when each trigger fired, and --order lists every firing in turn |
scmjs map cost <map> |
What the triggers cost Remastered each frame, and the costliest; --replay as for map trace |
scmjs map test <map> [tests…] |
Plays the map's test scenarios in the game, with a replay of each that fails; -u rewrites what a replay's scenario expects |
scmjs map test record <map> <rep> |
A test scenario from a replay, its expectations taken from the end of the game |
scmjs map coverage <map> <replays…> |
Plays many replays on the map: which triggers fired in how many games, and which never did |
scmjs map rush <map> |
The time to walk between the start locations, by the game's own pathing |
scmjs map balance <map> --bots <bots…> |
Games played on the map with your bots, a row a start location: win rate, length, first contact, rush distance, resources, and a verdict |
scmjs map heatmap <map> <replays…> |
Where units died, buildings went up or armies walked in many replays, as heat over the map |
scmjs map share <map> |
A link to the map on scmjs.dev; --edit to edit it together |
scmjs map play <map> |
A lobby on the play page with the map, and its invite link |
scmjs init#
| Command | What it does |
|---|---|
scmjs init [folder] |
Sets a folder of maps up for git and GitHub: maps as text in git diff, merged part by part, checked on every push |
scmjs replay#
| Command | What it does |
|---|---|
scmjs replay info <replays…> |
Who played, on which map, for how long and at what APM |
scmjs replay map <replay> |
The map the replay was played on, as a map file |
scmjs replay watch <replay> |
Plays the replay in the terminal |
scmjs replay export <replay> |
A video or GIF of the replay with the game's own pictures |
scmjs replay open <replay> |
Opens the replay in scmJS's replay viewer |
scmjs replay share <replay> |
A link that opens the replay in the editor |
scmjs plugin and scmjs bot#
| Command | What it does |
|---|---|
scmjs plugin new <name> |
A plugin to start from |
scmjs plugin dev |
The editor with your plugin, reloaded each time you save |
scmjs plugin check |
What the editor would make of the plugin |
scmjs bot new, init, build |
A BWAPI bot built into a .scmbot file for the play page |
scmjs bot update |
The newest bot toolchain |
scmjs bot run <bot> <map> |
Plays the bot against the game's computers |
scmjs bot ladder <bots…> --maps <maps…> |
Bots and computers against each other on every map: Elo, head-to-head, replays |
Your account and setup#
| Command | What it does |
|---|---|
scmjs login, scmjs logout |
Signs in to scmjs.dev in the browser, and out again |
scmjs account |
Who you are signed in as, your storage, the maps you are sharing |
scmjs doctor |
What this computer has for each command, and what is missing |
scmjs about |
This version, whether there is a newer one, and the links |
scmjs mcp |
The map commands as an MCP server for AI tools |
scmjs lsp |
A TrigScript language server for your text editor: errors, completions, hovers, go to definition |
scmjs completion <shell> |
A completion script for bash, zsh or fish |
Cheat sheet#
scmjs info map.scx # what the map holds
scmjs map check maps/*.scx --strict # fail on errors and warnings
scmjs map check maps/*.scx --baseline --strict # fail only on findings not in .scmjs-baseline.json
scmjs map preview map.scx --out map.png # a picture
scmjs map find "Marine" maps/*.scx # search
scmjs map triggers edit map.scx # triggers in your text editor
scmjs map diff --rev HEAD~1 map.scx --picture # what the last commit changed, and where
scmjs map log map.scx # the map's history, in the map's terms
scmjs map blame map.scx # who last changed each trigger
scmjs map generate "(2)Duel.scx" --seed 7 # a melee map to play
scmjs map balance map.scx --bots mybot.scmbot # is every start fair? games from each
scmjs map optimize map.scx --dry-run # what would make the map smaller
scmjs map trace map.scx # which triggers fire in the game
scmjs map test map.scx # run map.tests.json in the game
scmjs map trace --replay bug.rep --order # which triggers fired in a played game, and when
scmjs map coverage map.scx replays/ # which triggers never fired in any of those games
scmjs replay watch game.rep # a replay in the terminal
scmjs map heatmap map.scx replays/ --out h.png # where units died in those games
scmjs replay export game.rep --to 0:30 # its first half minute, as game.webm
scmjs map share map.scx --qr # a link, and a code for a phone
scmjs init # this folder of maps, ready for git
scmjs map unpack map.scx --text # the map as text files, to keep in git