Model or dataset
oil-oil/wolfcha avatar
oil-oil/wolfcha

wolfcha seats one human against an AI table, and its license and version disagree

AI-powered Werewolf (Mafia) social deduction game where every player is controlled by top LLMs like DeepSeek, Qwen, Gemini, and more

752 stars69 forksTypeScriptApache-2.0

At a glance

What is it?
A Next.js Werewolf game where every other seat is a model. The interesting parts are not the game loop but the mismatches: MIT against Apache-2.0, package.json 0.1.0 against a v1.0.0 tag, one npm script that runs 25 test files, and an environment template carrying ten secrets.
Who is it for?
wolfcha is worth reading as a study in how a model-driven game keeps its own state, and it is not a package to drop into a product without cleanup first.
Can I use it commercially?
Yes. Apache-2.0 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?
Yes. The repository last received commits 3 days 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 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • oil-oil/wolfcha752 ★ · +46
Star history
Repository2026-09-132026-11-22
oil-oil/wolfcha706752

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

Editorial analysis

The README links MIT, the metadata records Apache-2.0

Two licenses, one repository. The License section at the bottom of the README points at a file labelled MIT:

code
[MIT](./LICENSE)

The metadata attached to the repository records Apache-2.0 instead. Nothing in the top-level tree resolves it: `LICENSE` is there, but which text it holds is not something the README, the metadata or the tree says out loud, and the two sources disagree. There is also no `NOTICE` file and no dual-licensing sentence anywhere in the README, so a reader has to open the LICENSE file to learn which grant applies.

For a repository that asks sponsors for capability support and carries a commercial payment path, the license question is not academic. Apache-2.0 carries an explicit patent grant and a NOTICE convention; MIT does not. Pick one and state it in both places before anyone builds on this.

package.json reads 0.1.0 and private, the only tag is v1.0.0

The manifest is honest about being a private package and vague about its version:

code
"name": "wolfcha",
"version": "0.1.0",
"private": true,

The release feed holds exactly one entry, v1.0.0, published 2026-02-16. So the published tag sits two version numbers above the manifest, and `private: true` means npm publish is blocked even if you wanted it. The last push is 2026-10-02, which leaves eight months of work on the default branch with no second release, and the CHANGELOG at the top level is the only place that history could live.

The same gap shows up in the docs. There are three README variants plus a rules document whose filename is Chinese, `docs/游戏规则.md`, and the English README links its rules to that file. The English text also carries the language switch at the top pointing only to `README.zh.md`, while a separate `README.en.md` sits in the tree.

Both dev and build pin webpack, and the Dockerfile picks the first lockfile

Neither script uses the Next.js default bundler:

code
"dev": "next dev --webpack",
"build": "next build --webpack",
"start": "next start",

That is a deliberate choice with consequences, because a `--webpack` flag in both places means dev and production share one bundler, and any webpack-specific plugin or loader keeps working. It also means the faster default path is switched off.

The container image makes the same kind of decision about package managers. The deps stage copies `package.json` along with three lockfile globs, then tries them in order:

bash
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
  elif [ -f package-lock.json ]; then npm ci; \
  elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
  else echo "Lockfile not found." && exit 1; \
  fi

The repository ships `pnpm-lock.yaml` and `pnpm-workspace.yaml`, but only the lockfile glob is copied into that stage, not the workspace definition, and yarn is tested before pnpm. The base image is `node:20-alpine` with `libc6-compat` added, while the local instructions ask only for Node.js and pnpm with no version at all.

One npm script runs 25 test files, three live audits need .env.local

The test surface is concentrated in a single command. `test:single-player-context` passes 25 test files to `tsx --test` in one line, spanning the AI logger, API keys, character generation, the game master, speech ordering, phases, the game machine store, concurrency and reasoning profiles. Adding a file to the suite means editing that string; there is no glob.

Beside it sit four audit scripts and one payment-specific run:

code
"audit:single-player-context": "tsx scripts/single-player-context-audit.ts",
"audit:single-player-context:live": "node --env-file=.env.local --import tsx scripts/live-single-player-context-audit.ts",
"audit:character-generation:live": "node --env-file=.env.local --import tsx scripts/live-character-generation-audit.ts",
"audit:full-game:live": "node --env-file=.env.local --import tsx scripts/live-full-game-audit.ts",

The three `live` variants read `.env.local` directly through Node's `--env-file`, so they cannot run without real provider credentials and they will spend tokens when they do. The offline counterpart uses plain `tsx`. A fourth entry runs the server-side tokenpay tests under `--conditions=react-server`, and a fifth, `migrate:game-sessions-user-id`, is written out to `scripts/migrate-game-sessions-user-id.m` and stops there.

.env.example wires eight services whether you use them or not

The template is the real dependency list, and it is long. Ten secret-shaped variables point at eight separate services: ZenMux, TokenDance through its gateway at `https://tokendance.space/gateway/v1`, DashScope, NewAPI, MiniMax, Supabase, TokenPay and Watcha Pay. Three more carry the `NEXT_PUBLIC_` prefix, which means they are compiled into the browser bundle, including a Supabase publishable key and a Watcha OAuth client id.

Almost nothing is filled in. The two exceptions are TTS model defaults, one direct and one routed:

code
MINIMAX_TTS_MODEL=speech-01-turbo
TOKENDANCE_TTS_MODEL=minimax-speech-2.8-turbo

Two details are easy to copy wrong. `TOKENPAY_ENCRYPTION_KEY` is left blank with a note that it must be generated by `openssl rand -base64 32` and configured on the server only, so it never takes the `NEXT_PUBLIC_` prefix. And the placeholder lines for ZenMux and DashScope end with a trailing space after the placeholder text, which lands in the variable if you copy the line instead of rewriting it.

Stripe keys stay in the template for orders that are switched off

Two payment paths are live and one is a ghost. TokenPay needs an encryption key, a stable attribution URL and a product name:

code
TOKENPAY_ENCRYPTION_KEY=
TOKENPAY_APP_URL=https://wolf-cha.com
TOKENPAY_KEY_NAME=Wolfcha TokenPay

Watcha Pay has its own key, entitlement id, base URL and a return URL that carries a query parameter back to the homepage: `https://wolf-cha.com/?payment=watcha-pay`. The comment beside it states that production has to use the production key and production entitlement id, and that sandbox credentials must not be reused.

Stripe is the third. `STRIPE_SECRET_KEY` and `STRIPE_WEBHOOK_SECRET` are both still in the template, and the note above them says they exist only for historical Stripe order callbacks because new orders are switched off. Two live payment integrations and one dead one, separated only by a comment.

One seat, eight roles, and memory built from speeches and votes

The design choice that makes this different from a single-player demo is that a human takes one seat in a table of eight to twelve. The role list is Villager, Werewolf, White Wolf King, Seer, Witch, Hunter, Guard and Idiot, and the loop runs in four beats: night, where werewolves pick a target while special roles act on private information; the table speaking; the vote; and the deaths that reshape the next round.

Each AI carries a stable personality layered over a hidden role, so the same seat can lie for the town or for the pack depending on the draw. What the models read is spelled out as four inputs: speeches, votes, deaths and changing suspicions. That is the whole memory model the README claims, and it is the part the roadmap names as unfinished, since richer memory and bluffing sit on the same list as mobile play.

The presentation layer is where the stack shows: lip sync while a character speaks, day and night eye-blink transitions, dedicated role art for night actions, optional AI voice, and spectator mode.

The roadmap is the honest part: no mobile, no review, no friends

Six roadmap items describe what is not there: better mobile play, post-game review and free chat, richer memory and bluffing, special mechanics such as time rewind and AI insight, multiplayer with friends alongside AI players, and community ratings for standout AI personalities.

Two of those are worth weighing against what exists. Spectator mode is already listed as a feature, while multiplayer with friends is still ahead, so the social loop today is one human against models. Post-game review is missing too, which means the transcript that a deduction game produces has nowhere to go afterwards.

The credits page names where the work comes from: TokenDance for core game flow, roleplay and summaries, DashScope for AI capability, and Watcha for AI capability and platform support. The project says it was created at the Watcha and ModelScope Global Hackathon, and the name combines Wolf with Cha, the character from the Lu Xun story.

Editorial conclusion

wolfcha is worth reading as a study in how a model-driven game keeps its own state, and it is not a package to drop into a product without cleanup first. Three things to settle before you build on it: which license actually governs, since the README links an MIT file while the repository records Apache-2.0 and the file itself is not readable here; which version you are on, since package.json reads 0.1.0, is marked private, and the only release tag is v1.0.0 from 2026-02-16; and how much of .env.example you actually need, because the template wires ZenMux, TokenDance, DashScope, MiniMax, NewAPI, Supabase, TokenPay and Watcha Pay whether or not you use them, and the live audit scripts refuse to run without a filled .env.local. The last push was 2026-10-02, and the roadmap still lists mobile play, post-game review and multiplayer as unfinished.

Frequently asked questions

How do I run wolfcha on my own machine?

Clone the repository, run `pnpm install`, copy `.env.example` to `.env.local` and start `pnpm dev`, then open http://localhost:3000. Providers are configured in `.env.local`, and Node.js with pnpm is the only stated requirement.

Which roles can a human play in wolfcha?

Villager, Werewolf, White Wolf King, Seer, Witch, Hunter, Guard and Idiot, in a table of eight to twelve seats where every other player is a model.

Which AI providers does wolfcha connect to?

The environment template carries keys for ZenMux, TokenDance through its gateway at https://tokendance.space/gateway/v1, DashScope, NewAPI and MiniMax. Voice output uses the MiniMax TTS model speech-01-turbo directly, or minimax-speech-2.8-turbo through TokenDance.

What backend does wolfcha store game data in?

Supabase, configured through NEXT_PUBLIC_SUPABASE_URL and a server-only SUPABASE_SERVICE_ROLE_KEY, with a supabase/ directory in the tree. A migration script for adding a user id to game sessions is defined in package.json.

What license is wolfcha released under?

The two sources conflict. The README's License section links an MIT file, while the license field attached to the repository records Apache-2.0, and the text of the LICENSE file is not stated anywhere in the README.

Official sources

  1. License: Apache-2.0
  2. oil-oil/wolfcha on GitHub
  3. Project website
  4. README
  5. Releases
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/oil-oil-wolfcha.svg)](https://hysenlabs.com/projects/oil-oil-wolfcha)

Star history chart for your README

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

Was this useful?