Skip to main content

npm

Source

Description

A CLI scaffolding tool for creating new WolfStar HTTP Framework bot projects.

Usage

The CLI will guide you through the following prompts:
  • Project name — an npm-compatible name for your bot
  • Package manager — npm, yarn, pnpm, or bun
  • Language — TypeScript or JavaScript
  • Build tool — tsdown, TypeScript 6, or the TypeScript 7 release candidate
  • Linter and formatter — Oxlint / ESLint and Oxfmt / Prettier
  • Port — the port the HTTP server will listen on (default: 3000)
  • Optional features (multiselect) —
  • Auto-install — install dependencies immediately after scaffolding

Options

Non-interactive / AI agent mode

When the CLI detects an AI agent is running it (via @vercel/detect-agent), it automatically enters non-interactive mode, equivalent to passing --no-interactive. A project name argument is required in this mode:

Generated project structure

  • src/locales/en-US/commands/ping.json and src/@types/i18next.d.ts are only generated when i18n is enabled.
  • src/@types/i18next.d.ts is produced by @wolfstar/i18next-type-generator; the CLI runs it automatically at the end of scaffolding, and it can be re-run any time locale files change (see generate:i18n below).
  • src/commands/math.ts is only generated when Subcommands is enabled.
  • tests/ping.test.ts, vitest.config.ts, and vitest.setup.ts are only generated when Testing is enabled.

i18n type generation

When i18n is enabled, the generated package.json includes a generate:i18n script that (re)generates src/@types/i18next.d.ts from the JSON files under src/locales/:
The CLI runs this script automatically once at the end of scaffolding; re-run it manually whenever you add or edit locale keys so the generated types stay in sync.

Requirements

  • Node.js >=20