A console-based recreation of Hearthstone made in NodeJS https://hs.lunartides.dev
  • TypeScript 87.3%
  • Svelte 8.4%
  • MDX 3.1%
  • JavaScript 0.7%
  • CSS 0.2%
  • Other 0.1%
Find a file
2026-04-20 22:25:23 +02:00
.github Try to fix CI 2026-03-13 23:27:57 +01:00
packs Change GitHub url to new self-hosted Forgejo instance 2026-04-20 18:45:22 +02:00
sites Improve docs site docker build 2026-04-20 22:25:23 +02:00
src Change GitHub url to new self-hosted Forgejo instance 2026-04-20 18:45:22 +02:00
test/src Combine /cards/ and /packs/ 2026-03-30 13:02:52 +02:00
tools Fix bugs from previous commits 2026-04-20 11:04:11 +02:00
universe Fix card path in [emergence/create] 2026-04-16 18:10:40 +02:00
.gitattributes chore: add gitattributes file 2024-01-04 08:31:16 +01:00
.gitignore Combine /cards/ and /packs/ 2026-03-30 13:02:52 +02:00
biome.json Combine /cards/ and /packs/ 2026-03-30 13:02:52 +02:00
bun.lock Try to fix ci v2 2026-03-24 13:46:58 +01:00
CHANGELOG.md Bump to v3.0.0-stable 2025-12-05 13:03:53 +01:00
config.ts Change GitHub url to new self-hosted Forgejo instance 2026-04-20 18:45:22 +02:00
decks.json Make cards use uuidv7 2026-01-16 12:22:36 +01:00
hub.ts Replace main frontends with new [emergence] frontend 2026-03-31 21:50:30 +02:00
index.ts Remove hub helper sfx 2026-03-04 20:22:18 +01:00
install.sh Add linux install script 2026-04-05 11:45:02 +02:00
LICENSE Create LICENSE 2022-04-20 22:59:30 +02:00
loc.md Update biome dependency 2026-03-03 09:15:12 +01:00
package.json Change GitHub url to new self-hosted Forgejo instance 2026-04-20 18:45:22 +02:00
README.md Change GitHub url to new self-hosted Forgejo instance 2026-04-20 18:45:22 +02:00
run.bat refactor!: remove support for nodejs, go all in on bun 2024-01-15 10:11:39 +01:00
setup.bat refactor!: remove support for nodejs, go all in on bun 2024-01-15 10:11:39 +01:00
tsconfig.json Use nodenext module 2026-03-02 22:24:39 +01:00

Hearthstone.js

Game faded from bottom to top

A console-based recreation of Hearthstone.

Features

  • Most of Hearthstone's features before 2025!
  • Create your own cards. Minimal programming knowledge required!
  • Limitations on what cards can do are considered bugs!
  • Make your own decks.
  • A relatively clean codebase which is easy to mod!
  • 70+ configurable settings to change how the game works!
  • An AI (or two) you can play against!
  • Import cards directly from Hearthstone!
  • Procedural audio support!
  • ~150 pre-built cards. (26 Collectible.)
  • Publish cards online for others to see and use!
  • GPL-3.0 License.

Note

Hearthstone.js is a hobby project I'm working on in my free time. I don't always have the time nor energy to work on it. Therefore, I can't guarantee that updates will be released in a reasonable timeframe. Update 2.0 took ~4 months to come out, whereas 3.0 took almost 2 years. I work in my own pace, so don't expect constant updates.

If you notice any issues, or want to request a new feature, open an issue. I'll try to respond as soon as I'm able. You're free to open pull requests, but I can't guarantee that they'll be merged.

Running

See the docs for a more comprehensive guide.

You need to have Node and Bun installed.

  • If you are on Windows, open setup.bat, then run.bat.
  • Otherwise, open a console / terminal, then run bun install, and bun . (This works on all platforms.)
  • If you're on Linux, you can run the install.sh script. This will allow you to run the game through the new hs command.

Images

Here's what you can expect from Hearthstone.js

HUB

Screenshot of the HUB

This is the hub. It connects the different aspects of Hearthstone.js together, allowing you to run the separate tools seamlessly.

Generic game

Screenshot of the game

This is what the main game looks like. It might look different if the settings under the Debug category are off.

Commands

Screenshot of the game commands

This is what is shown when you select Commands in-game. This list is scrollable, and there are more commands out of view.

Help message in-game

Screenshot of the help message in-game

This is what is shown when you run the help command. As you can see, there is a lot of commands that can be run.

Deck Creator

Screenshot of the deck creator

This is what the Deck Creator looks like. This is the tool that lets you create a deck, and gives you its corresponding deckcode.

Deck Creator commands

Screenshot of the deck creator's help message

This is what is shown when you select Commands in the deck creator.

Custom Card Creator

Custom card creator demo

This is the custom card creator. It allows you to create custom cards. Not much else to be said. See the docs for more information.

Vanilla Card Creator

Vanilla card creator demo

This is the vanilla card creator. If set up right, it will allow you to import any card from Hearthstone.

Vanilla Card Creator generated code (No manual lines of code written)

Screenshot of the code generated by the vanilla card creator

This is the code generated by selecting Brann Bronzebeard in the vanilla card creator. The custom card creator will generate identical code.

Functional code

Screenshot of the fixed generated code

This is the same code, but cleaned up. I changed the event from ChangeMe to PlayCard, and added value.trigger(Ability.Battlecry). This makes Brann Bronzebeard work properly.

History

Screenshot of the history command output

This is the result of running the History command in-game. It shows a log of what has happened since the game started. This is helpful for seeing what happened last turn.