pokemon-showdown/sim
André Bastos Dias ef97b292fb
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
Fix Enamorus shiny validity (#10864)
2025-02-09 23:40:13 -06:00
..
examples Update Dex API (#8181) 2021-04-08 03:00:37 -07:00
tools Fix Rockruff-Dusk's Pokédex entry (#10871) 2025-02-09 20:17:52 -06:00
battle-actions.ts Overhaul 'SwitchIn' event for more accurate effect resolution order (#10766) 2025-01-28 16:51:17 -06:00
battle-queue.ts Overhaul 'SwitchIn' event for more accurate effect resolution order (#10766) 2025-01-28 16:51:17 -06:00
battle-stream.ts PRNGSeed is now a string (#10826) 2025-01-15 15:51:28 -08:00
battle.ts Fix bug where Wish and Future Sight ignore fainted pokemon (#10847) 2025-01-29 08:17:02 -06:00
dex-abilities.ts Fix improper duplication of cached dex data (#10843) 2025-01-28 18:37:29 -06:00
dex-conditions.ts Overhaul 'SwitchIn' event for more accurate effect resolution order (#10766) 2025-01-28 16:51:17 -06:00
dex-data.ts Import Utils from lib/utils 2025-01-14 23:01:53 -08:00
dex-formats.ts Add February 2025 rotational ladders 2025-02-01 00:27:11 -07:00
dex-items.ts Fix improper duplication of cached dex data (#10843) 2025-01-28 18:37:29 -06:00
dex-moves.ts Import Utils from lib/utils 2025-01-14 23:01:53 -08:00
dex-species.ts Fix Rockruff-Dusk's Pokédex entry (#10871) 2025-02-09 20:17:52 -06:00
DEX.md Move packed team docs out of PROTOCOL.md 2021-06-10 15:04:25 -07:00
dex.ts Import Utils from lib/utils 2025-01-14 23:01:53 -08:00
field.ts Overhaul 'SwitchIn' event for more accurate effect resolution order (#10766) 2025-01-28 16:51:17 -06:00
global-types.ts Add February 2025 rotational ladders 2025-02-01 00:27:11 -07:00
index.ts Further improve documentation 2021-06-10 09:17:58 -07:00
NONSTANDARD.md Move packed team docs out of PROTOCOL.md 2021-06-10 15:04:25 -07:00
pokemon.ts Fix getUpdatedDetails default parameter (#10870) 2025-02-09 20:37:34 -06:00
prng.ts PRNG: Address 'TODO: benchmark' comment (#10822) 2025-01-25 14:20:36 -07:00
README.md Slightly improve documentation 2021-11-13 14:17:47 -05:00
side.ts Add February 2025 rotational ladders 2025-02-01 00:27:11 -07:00
SIM-PROTOCOL.md Fix protocol doc for Splash 2023-12-28 20:10:20 -08:00
SIMULATOR.md Slightly improve sim docs for stdio usage 2024-01-17 21:23:20 -08:00
state.ts Sim: Use a CSPRNG (#10806) 2025-01-11 13:56:34 -06:00
team-validator.ts Fix Enamorus shiny validity (#10864) 2025-02-09 23:40:13 -06:00
TEAMS.md Update packed team Tera Type documentation (#9185) 2022-12-30 13:47:38 -06:00
teams.ts Data: Fix huge perf bugs in randbat tests, part 1 (#10616) 2024-11-09 03:45:18 -08: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