Introduction
Pokemon Showdown provides a comprehensive command-line utility calledpokemon-showdown that enables you to:
- Simulate battles programmatically
- Generate and validate teams
- Convert between team formats
- Start a Pokemon Showdown server
Installation
Build the project
Windows users should use
node build instead of ./build, and replace ./ with node in all commands.Getting Help
You can access help for any command at any time:Available Commands
simulate-battle
Simulate battles by sending commands via stdin and receiving output via stdout
Team Commands
Generate random teams, validate teams, and convert between team formats
Server Commands
Start a Pokemon Showdown server on a specified port
Command-Line Options
Thepokemon-showdown executable supports several command-line flags:
| Flag | Short | Description |
|---|---|---|
--help | -h | Display help information |
--skip-build | Skip the automatic build step (server only) | |
--debug | -D | Enable debug mode for battle simulation |
--replay | -R | Generate replay data during battle simulation |
--spectate | -S | Generate spectator-compatible output |
Piping Commands
One of the most powerful features of the CLI is the ability to pipe commands together:Example: Generate and Export a Team
Example: Generate and Validate
Team Format Requirements
For detailed information about team formats, see the Teams documentation.Usage from Other Languages
Since the CLI uses standard input/output, you can easily call it from any programming language that supports subprocess execution:Next Steps
Battle Simulation
Learn how to simulate battles programmatically
Team Management
Master team generation, validation, and conversion
