pokemon-showdown/sim
André Bastos Dias 08562488b0
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run
Refactor Illusion switch out check (#11742)
2026-02-03 16:09:04 -07:00
..
examples Update to ESLint 9 (#10926) 2025-02-25 20:03:46 -08:00
tools Implement Mega Stones as {key: value} pairs (#11684) 2026-01-08 14:59:22 -07:00
battle-actions.ts Refactor Illusion switch out check (#11742) 2026-02-03 16:09:04 -07:00
battle-queue.ts Fix comments for priority in the sim (#11385) 2025-08-24 13:19:27 -07:00
battle-stream.ts TypeScript: Enable noImplicitOverride 2025-02-26 14:38:32 -08:00
battle.ts EBC: Auto tie should kick in after turn 1000 ends 2026-01-10 20:16:28 -07:00
dex-abilities.ts Implement Mega Stones as {key: value} pairs (#11684) 2026-01-08 14:59:22 -07:00
dex-conditions.ts Implement Mega Stones as {key: value} pairs (#11684) 2026-01-08 14:59:22 -07:00
dex-data.ts Implement Mega Stones as {key: value} pairs (#11684) 2026-01-08 14:59:22 -07:00
dex-formats.ts Add onChooseTeam event for formats (#11476) 2025-10-06 02:20:44 -06:00
dex-items.ts Implement Mega Stones as {key: value} pairs (#11684) 2026-01-08 14:59:22 -07:00
dex-moves.ts Implement Mega Stones as {key: value} pairs (#11684) 2026-01-08 14:59:22 -07:00
dex-species.ts Implement Mega Stones as {key: value} pairs (#11684) 2026-01-08 14:59:22 -07:00
DEX.md
dex.ts Add forme names as fuzzy matches 2025-05-30 19:54:00 -07:00
field.ts Update to ESLint 9 (#10926) 2025-02-25 20:03:46 -08:00
global-types.ts Revamp Gen 9 Free-For-All Random Battle (#11406) 2025-08-31 23:58:46 -06:00
index.ts Update to ESLint 9 (#10926) 2025-02-25 20:03:46 -08:00
NONSTANDARD.md
pokemon.ts Gens 3-4: Fix Knock Off + Recycle Interaction (#11510) 2025-10-17 16:34:51 -06:00
prng.ts Correctly support Node 18 2025-02-26 21:42:14 -08:00
README.md
side.ts Add onChooseTeam event for formats (#11476) 2025-10-06 02:20:44 -06:00
SIM-PROTOCOL.md SIM-PROTOCOL: Update for clarity 2025-05-13 13:29:53 -07:00
SIMULATOR.md Slightly improve sim docs for stdio usage 2024-01-17 21:23:20 -08:00
state.ts Remove useless spreads (#11132) 2025-05-24 16:19:48 -07:00
team-validator.ts Expand Arceus EV Limit to all level 100 events (#11724) 2026-01-26 09:24:43 -06:00
TEAMS.md Update packed team Tera Type documentation (#9185) 2022-12-30 13:47:38 -06:00
teams.ts Add October PMotM: Blank Canvas Random Battle (#11463) 2025-10-01 12:41:03 -06:00
tsconfig.json Migrate to esbuild for compilation (#9203) 2022-12-22 15:19:29 -06:00

Node.js package

Pokémon Showdown has a Node.js API. It currently only works in Node, not browsers, although we're working on unifying it to work in browsers.

You can install it with the usual:

npm install pokemon-showdown

And you can use it to do the following things:

Simulating battles

See: sim/SIMULATOR.md

Also available as a command-line API!

Validating, generating, and converting teams

See: sim/TEAMS.md

Also available as a command-line API!

Getting Pokédex information

See: sim/DEX.md

Undocumented APIs

Pokémon Showdown's Node.js package has TypeScript definitions for everything it exports, including a lot of undocumented APIs.

Please be aware that any undocumented API is unstable and should not be relied upon not to change. We do not follow semver for undocumented APIs. If you really want to use an undocumented API, remember to pin the exact PS version in your dependencies. You probably also want to follow the API update channel in the Discord server: https://psim.us/devdiscord