# The Pokémon Showdown client is the browser code behind play.pokemonshowdown.com

> The client repository holds most of the front end code for the Pokémon Showdown battle simulator, and it is written in TypeScript against Preact, licensed AGPL-3.0 precisely so that proprietary forks cannot steal player passwords.

**smogon/pokemon-showdown-client** — The client for Pokémon Showdown

- Repository: https://github.com/smogon/pokemon-showdown-client
- Website: http://pokemonshowdown.com
- Stars: 715 · Forks: 1,095
- Language: TypeScript
- License: AGPL-3.0
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/smogon-pokemon-showdown-client

## This is the front end, not the server

The repository is for most of the client code for Pokémon Showdown, and it is what runs play.pokemonshowdown.com. The readme puts a warning right at the top of that line: if you are setting up a server, you probably want the Pokémon Showdown server repository instead. The navigation links at the top of the readme make the split explicit, with the website, the server repository, this client repository and a separate dex repository. That distinction matters because the two projects have different licences, and the readme warns in capitals that the client's licence is not the same as the server's. The primary language recorded for the repository is TypeScript, the homepage is pokemonshowdown.com, and the only topic carried is hacktoberfest, which says something about how contributions usually arrive.

## The licence is a security decision, not an accident

The client's licence is AGPLv3, and the readme explains the reason in one sentence. The reason is mostly because the author does not want low-effort proprietary forks that add bad code that steals everyone's passwords, or something like that. There is a more permissive path, and it is an email rather than a form. If you are doing anything else other than forking, especially if you want some client code files in your own open source project that you want to release under a more permissive license, such as if you want to make your own multiplayer open source game client for a different game, please ask at staff@pokemonshowdown.com. The author holds all the copyright to the AGPLv3 parts and can relicense them to MIT. That is a rare and useful arrangement for a project of this size, and it is worth knowing before you plan an architecture that depends on importing the code.

## A rewrite is under way, and the beta client is where it lives

Development is proceeding on the client rewrite, and the live version is available at the beta address. That is the headline for anyone who wants to contribute, because the new client is where new work lands. The build step is required for client testing: install the latest Node.js, where the project requires v22 or later, and Git, and run the build command on Windows or the other form elsewhere. On Windows that is node build and on other operating systems it is ./build, and the readme is explicit that you need to build after each change. The comment is also explicit about what the build does not do: it does a fast build with no checks, and for tests, linting and typechecking you want to run npm test separately. The package.json confirms the split, with separate scripts for build, build-full, test, full-test, lint and fix.

## Testing without a login server, and the limits of that

You can make and test client changes simply by building after each change and opening the test client page, and the readme is clear about why that works: it allows you to test changes to the client without setting up your own login server. There is a limitation list, and it is short. Even with a test key, registering fails and logging into other accounts fails, though you can still switch to other unregistered accounts and back. Everything else can be tested. Getting a logged-in account at all requires a test key file, because browsers do not let other websites control the client for security reasons, which is also why they cannot screw with your account, but it makes it harder to log in on the test client. The key file goes in the config directory and contains a single constant.

```
    const POKEMON_SHOWDOWN_TESTCLIENT_KEY = 'sid';
```

The value comes from the actual session cookie, and the readme points at a key page on the site for grabbing it quickly. The file must go in config/ and not in the play.pokemonshowdown.com/config/ directory, which is a small detail that will cost you an hour if you get it wrong.

## Pointing the test client at another server

You can connect to an arbitrary server by navigating to the test client page with a host and port in the query string, and the example given is a server running locally on port 8000, written as testclient-new.html?~~localhost:8000. That is the whole mechanism for testing against a private server, and it is worth knowing because the alternative would be deploying to the live site. There is a browser caveat attached to it. Certain browsers convert the question mark to an encoded form when reading files off the local filesystem, and the workaround is to try a different browser or to serve the files locally first, by running npx http-server from the directory the readme is in and then navigating to the local address with the same query parameter. The readme also explains the browser support order, with Chrome first, then Chromium browsers such as Edge, Vivaldi, Brave and Opera, then Firefox, then Safari 5 and later, then IE11 and Edge, then mobile browsers, and finally any remotely modern browser. Degraded performance and missing features are expected in extremely legacy browsers like Safari 4 and IE9 to 10.

## Not batteries included, and that is on purpose

The warning section is the most unusual part of the readme and it is worth reading twice. This repository is not batteries included. It does not include instructions to run a full Pokémon Showdown login server, and the maintainers will not provide them, and you should not ask for help on this because you will be turned away. The reason given is a good one: if you make a mistake hosting a login server, your users' passwords can get stolen, so they do not want anyone to host one unless they can figure out how to do it without help. The repository also omits several resource files, namely the audio and sprites directories, for size reasons. On the other hand, as long as you do not want to run your own login server, the repository contains everything needed to test changes to the client. That is a coherent position, and it is the reason the earlier point about not wanting low-effort proprietary forks that steal passwords sits so naturally in the same document.

## What the repository actually contains

The top level is a good map of a browser application. There are the deployment directories, with play.pokemonshowdown.com/, pokemonshowdown.com/, replay.pokemonshowdown.com/ and teams.pokemonshowdown.com/ as separate roots. There is desktop/ for the desktop client, lib/ for the library code, test/ for the test harness, config/ for configuration, translations/ for localisation, caches/ for cached data and old-replays/ for archived battles. The graphics side has graphics-src/ and a pokemonshowdown.psd source file, which tells you the artwork pipeline is kept separate from the code. The tooling is build and build-tools/ at the root, an eslint.config.mjs alongside a project-specific eslint-ps-standard.mjs, a tsconfig.json and a .babelrc, with babel carrying the TypeScript and JSX transform. The package.json shows the runtime dependencies are small, with Babel, google-auth-library and image-size, and the dev dependencies carry Preact, eslint 9 and typescript-eslint. There is a CODEOWNERS file, a CONTRIBUTING.md, an UPGRADING-SOCKJS.md and a WEB-API.md for the client to server interface.

## Where this is the wrong place to start

Three limits are worth naming. The first is that this is not a game to play offline and not a library to depend on. It is the front end of a specific service, and its value to you is as a codebase to work on or to learn from rather than as a dependency. The second is the size of the surface. There is a build step, a lint configuration of its own, a test harness invoked as node test/run, a separate full test mode, a rewrite in progress with a parallel beta client, and a SockJS migration to think about, which is a lot of context to load before your first change. The third is the licence, which for a project that wants to reuse code in another product is a real constraint even with the relicensing offer, because the offer is a per-request email to the copyright holder. For a first open source contribution, that is a well-documented and well-scoped repository to start in, and the readme's insistence that difficult onboarding is a bug rather than a user problem sets the tone for the whole project.

## Conclusion

The client suits a developer who wants to work on a large, real browser application with a battle simulator on the other end, and it suits anyone who wants to contribute to a widely used open source game front end. It is the wrong repository if you are setting up a server, because the readme points you at the server repository and warns that this one does not include instructions for running a login server. It is also the wrong choice if you want to reuse the client code under a permissive licence, since the AGPL-3.0 covers it and relicensing has to be requested by email. Before cloning it, read the warning section, because the missing login server and the missing asset directories are deliberate and will otherwise look like an incomplete checkout. The last push was on 2026-10-18 and the package version is 0.11.2.

## FAQ

### How do I build and test changes to the Pokemon Showdown client?

Install the latest Node.js, where the project requires v22 or later, and Git, then run node build on Windows or ./build elsewhere after each change, and open play.pokemonshowdown.com/testclient-new.html. The build is a fast build with no checks, so run npm test separately for tests, linting and typechecking.

### Can I use the Pokemon Showdown client code in my own project?

The client is licensed under AGPLv3, and the README says to ask at staff@pokemonshowdown.com if you want some client code files in your own open source project under a more permissive licence. The author holds all the copyright to the AGPLv3 parts and can relicense them to MIT. The client's licence is not the same as the server's.

### Why can I not register or log into another account on the Pokemon Showdown test client?

Registering and logging into other accounts both fail on the test client even with a test key, though you can still switch to other unregistered accounts and back. Everything else can be tested, and the reason a logged-in account needs extra work is that browsers do not let other websites control the client, so the test client needs a key file placed in the config directory containing your session cookie value.

## Sources

- [Issues](https://github.com/smogon/pokemon-showdown-client/issues)
- [License: AGPL-3.0](https://github.com/smogon/pokemon-showdown-client/blob/master/LICENSE)
- [Project website](http://pokemonshowdown.com)
- [README](https://github.com/smogon/pokemon-showdown-client/blob/master/README.md)
- [smogon/pokemon-showdown-client on GitHub](https://github.com/smogon/pokemon-showdown-client)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/smogon-pokemon-showdown-client
