create-mythryl-app
v0.1.11
Published
Start a Mythryl mini app: npm create mythryl-app@latest.
Maintainers
Readme
create-mythryl-app
Start a Mythryl mini app.
npm create mythryl-app@latestor with another package manager:
pnpm create mythryl-app
yarn create mythryl-app
bun create mythryl-appIt asks where to put the app, which template to use, the domain the app will be served from, and its name, then writes the project, installs its dependencies and starts a git repository. It finishes by printing what to do next, with links into the developer console that already have your domain filled in.
Options
Anything given as an option is not asked.
create-mythryl-app [folder] [options]
-t, --template <name> react-vite (default), nextjs
-d, --domain <domain> the domain the app will be served from, such as my-game.example
--title <name> the app's display name (default: from the folder name)
-p, --package-manager <pm> npm, pnpm, yarn, bun (default: the one that ran this)
--install, --no-install install dependencies afterwards (default: yes)
--git, --no-git start a git repository (default: yes, unless already inside one)
-y, --yes ask nothing and use defaults, for scripts and AI coding tools
-f, --force write into a folder that is not empty, replacing files with the same names
-h, --help
-v, --version--yes is for anything that cannot answer questions, such as a script or an AI coding tool:
npx create-mythryl-app lanternfall --template react-vite --domain my-game.example --yesNothing is sent anywhere, and nothing is committed to git: that first commit is yours.
Package managers
npm, pnpm, yarn and bun all work, and every template is installed, typechecked, linted, tested and built with each of
them in CI (yarn 1 and yarn 4 both). The tool uses whichever one ran it, so pnpm create mythryl-app makes a pnpm
project, and the commands in the README and next steps are written for it. --package-manager picks one explicitly.
For yarn 2 and later the project gets a .yarnrc.yml asking for node_modules (not Plug'n'Play) and an empty
yarn.lock, so it installs the way the templates expect. The project does not pin a packageManager version.
Node 22.12 or later is needed by the templates' tooling (Vite and Vitest); odd-numbered Node releases such as 25 are refused by Vitest, and yarn 1 treats that as an error where the others only warn.
Templates
| Template | What you get |
| --- | --- |
| react-vite | A small React app with a card for each part of the SDK: who the player is and how the app was opened, a cloud save, sharing a post, notifications, the Library, signing in to your server, and links out. Static: deploys anywhere. |
| nextjs | The same app on Next.js, with API routes that verify the player's token (/api/me), receive Mythryl's signed webhooks (/api/mythryl) and send the player a notification (/api/notify), using @mythryl/server-sdk. Sets the frame-ancestors header Mythryl needs. |
Every template includes:
public/.well-known/mythryl.json, the manifest, filled in with your name and domain, and placeholdericon.pngandhero.pngat the sizes the console wants.- A
dev:tunnelscript that exposes the dev server over https for the App tester. AGENTS.md,CLAUDE.mdand.cursor/rules, which tell an AI coding tool what a mini app can and cannot do.- Typecheck, lint, test and build scripts.
The new project depends on the same version of @mythryl/app-sdk as this tool, because the packages are released together.
License
MIT
