CLI tool
olistic/warriorjs avatar
olistic/warriorjs

WarriorJS: a tower game you solve by rewriting Player.js

🏰 An exciting game of programming and Artificial Intelligence

9,539 stars499 forksTypeScriptMIT

At a glance

What is it?
WarriorJS is a programming game where the only interface is a source file you edit between runs, and the project that ships it is a quiet pnpm and turbo monorepo whose last push landed on 2026-03-27 with no GitHub releases at all.
Who is it for?
WarriorJS suits a learner who wants a small, complete, readable project to think in and a maintainer who wants to publish levels rather than build infrastructure. Skip it if you need a published release history to pin against, a documented way to share a third party tower, or an API you can learn from the README alone.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 7 months ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 16, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • olistic/warriorjs9,539 ★ · +0
Star history
Repository2026-09-162026-11-16
olistic/warriorjs9.5k9.5k

0 Stars in the last 61 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The quick start asks for Node 22, the workspace root demands Node 24

There are two Node version statements in this project and they do not agree. The quick start tells players to install Node.js 22 or later, then to install the CLI globally:

sh
npm install --global @warriorjs/cli

and to launch the game:

sh
warriorjs

The root package.json, which is what you face when you clone the repository instead of installing the CLI, declares engines node >=24. So the number you need depends on which half of the project you are touching. A player who follows the quick start on Node 22 is doing exactly what the README says, and a contributor who opens a pull request from the same machine on Node 22 hits an engine constraint inside a pnpm workspace with a lockfile. Check which side of the line you are on before debugging anything else, because a version mismatch here presents as an install failure long before any game code runs.

Players install from npm, contributors work inside a pnpm and turbo workspace

The published artifact and the source tree are two different toolchains. What you install is a single global package, @warriorjs/cli, through npm, and that is the entire player experience. What you clone is a private pnpm workspace with pnpm-workspace.yaml, pnpm-lock.yaml and packageManager [email protected], where the root package.json has private set to true and no publishable name, because nothing here is meant to go to a registry from this root. Layout follows the workspace convention of apps, libs and towers directories alongside docs, with turbo.json driving the task graph and vitest.config.ts holding the test setup. Root scripts filter a package out by name in two places, which tells you the website is a workspace member of its own: build runs turbo run build --filter='!warriorjs-website' and typecheck runs turbo run typecheck with the same filter. Practical consequence: contributing means pnpm plus Node 24 plus a filtered turbo run, while playing means npm and one command, and the README never states that these are different setups.

The loop is generate the level, rewrite Player.js, run the whole game again

The play cycle is short enough to describe in one line. Launching warriorjs walks you through creating a warrior and choosing a tower, generates a README.md holding your first level's instructions, and expects your solution in a file called Player.js. You then run warriorjs again to see how your warrior fares. That is the whole loop, and there is no other control surface: the README is explicit that the code you write is the strategy, with no clicking and no dragging. There is also a browser alternative at warriorjs.com, which removes the install but not the loop. The README does not document running one floor at a time, and it does not mention anywhere a place where a score or a perfect run is recorded, even though it invites you to refactor for a perfect score.

A tower is the contribution unit, and no distribution channel is named

If you want to give something back, the README pushes one route above the others: build a tower, described as a set of levels that other players can install and play, with the towers documentation page linked as the place to start. Bug fixes, documentation improvements and new abilities or units are listed as alternatives, but the tower route is called the best way to contribute. What the README does not say is where a contributed tower is published, what other players install it from, or how a player selects one that is not bundled. The towers/ directory exists in the repository, so levels are content in this workspace, but the distribution half of that arrangement is left to the contribution guide and the towers docs page. If you were planning to publish levels and watch strangers play them, the gap is exactly the part you cannot fill from the README: you would be choosing a channel, a versioning story and a moderation answer on your own.

The player API documentation page is still filed under space-api

The documentation links are short, and one of them has an unexpected address. Gameplay and Towers are self explanatory, but the third link points at /docs/player/space-api for the Player API, and the project was born as a port of ruby-warrior, with credits for the original idea going to Ryan Bates. A logo credit goes to Guillermo Cura. The cost shows in what the README will not tell you. It names no ability, no action and no available method, so a new player cannot write a single line of Player.js from it alone and has to leave for the docs site before knowing the vocabulary their code is allowed to use. For a project whose stated audience includes someone writing a first if statement, that is the missing page.

Only lefthook is allowed to run install scripts, and the build skips the website

Three details in the root package.json tell you how the project is policed. The pnpm block sets onlyBuiltDependencies to lefthook alone, so while lefthook installs its hooks through the prepare script, every other dependency in the tree is denied its install step. That is a deliberate tightening, and it means a transitive package that expects a postinstall to fetch or compile something will be installed without it, quietly. Linting is biome check with biome check --write for the fix path, and biome itself is a devDependency at ^2.4.6, so there is no separate eslint or prettier configuration in the root. Tests run through vitest at ^4.0.18 with a watch mode and a coverage variant behind the v8 provider. The clean script is rm -rf {apps,libs,towers}/*/dist, which depends on your shell expanding those braces, so on a shell that does not, the command quietly matches nothing and leaves every dist directory in place.

No GitHub releases and the last push was 2026-03-27

The maintenance picture is thin, and it is visible from two fields rather than from a status badge. The repository has no GitHub releases at all, so there is no tag to pin to and no changelog entry keyed to a published version, and the last push to master landed on 2026-03-27. That is a while back relative to now, so plan on the trunk as the only source of truth rather than expecting a maintained release cadence. The practical effect lands on the install step. Because npm install --global @warriorjs/cli resolves to whatever the registry last published, and no published version maps to a commit here, a player cannot tell from the version string which code they are running or whether a bug they hit has been fixed upstream. There is a CHANGELOG.md in the root, so that is where to look for what changed, and the version numbers of the devDependencies, typescript at ^5.9.3 and vitest at ^4.0.18, tell you the toolchain the last push was written against.

Editorial conclusion

WarriorJS suits a learner who wants a small, complete, readable project to think in and a maintainer who wants to publish levels rather than build infrastructure. Skip it if you need a published release history to pin against, a documented way to share a third party tower, or an API you can learn from the README alone. Before you install, confirm your Node version against both the 22 requirement in the quick start and the 24 requirement in the workspace root, and read the CHANGELOG before assuming a change landed.

Frequently asked questions

How do I install and start WarriorJS?

Install Node.js 22 or later, run npm install --global @warriorjs/cli, then run warriorjs. The game creates a warrior, has you pick a tower, and writes a README.md with the first level's instructions next to a Player.js file you are meant to fill in.

Do I write JavaScript or TypeScript with WarriorJS?

Both are supported by the project's own description, which says you write JavaScript or TypeScript to guide a warrior through towers. The quick start names Player.js as the file to edit, while the repository source itself is TypeScript on top of a pnpm and turbo workspace.

Can I play WarriorJS in a browser instead of installing the CLI?

Yes, the README points to a browser version at warriorjs.com. It does not describe whether the browser version reads the same Player.js file or the same tower levels as the local CLI, so do not assume a level you wrote locally loads there.

Where is the WarriorJS player API documented?

The documentation site links three pages: Gameplay, Towers, and the Player API, whose address ends in space-api. The README itself names no abilities or methods.

Official sources

  1. Issues
  2. License: MIT
  3. olistic/warriorjs on GitHub
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/olistic-warriorjs.svg)](https://hysenlabs.com/projects/olistic-warriorjs)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/olistic-warriorjs.svg)](https://hysenlabs.com/projects/olistic-warriorjs)

Was this useful?