What it does
spraxium new creates a new project directory from scratch. It runs an interactive wizard that collects a project name, template choice, optional extra packages, and a Git preference. When the wizard completes, the CLI scaffolds the directory, installs all dependencies, and optionally initializes a Git repository. You end up with a working project ready for spraxium dev.
Run the command from any directory outside your existing project. You can also pass the project name directly as an argument to skip the first prompt.
spraxium new
spraxium new my-bot
# alias:
spraxium n my-botThe main benefit of using the wizard instead of creating files by hand is consistency. You start with the folder layout, package set, TypeScript setup, and framework wiring that Spraxium expects, which means less cleanup later.
What the wizard asks
Project name
You can type the project name interactively or pass it on the command line. The CLI uses that name for the directory and package metadata.
Template
Choose the closest starting point for the bot you want to build. This choice controls which files and packages are preloaded.
Optional packages
On the default template, the wizard lets you opt into extra framework packages so the initial install matches your use case.
Git initialization
Decide whether the CLI should initialize a Git repository immediately. This is convenient for new projects, but optional.
Available templates
Three templates are available. Each one represents a different starting configuration, and the wizard lets you pick between them before scaffolding.
Choose the smallest template that still matches the project shape you know you need. It is easier to add one package later than to carry unused pieces from day one.
Optional packages
When you choose the default template the wizard shows a checkbox prompt where you can select any combination of the following extra packages. Non-default templates use a fixed set.
For beginners, the safest choice is usually to start lean and add packages when the first real use case appears. For experienced teams with a known architecture, preselecting the right packages up front reduces the first round of setup churn.
What the wizard installs
The CLI always installs a fixed set of core packages regardless of template: @spraxium/common, @spraxium/core, @spraxium/env, and discord.js. Developer dependencies include @spraxium/cli, typescript, @types/node, and tsdown.
Any extra packages you select are added to the same install pass. The installer detects whether you are inside a monorepo and resolves local workspace references where appropriate. If no package manager is detected, the CLI defaults to pnpm.
What you get immediately after generation
When the command finishes, you already have the essentials in place:
- A working project directory.
- A ready-to-edit src folder with the template's initial files.
- A spraxium.config.ts file aligned with the chosen setup.
- Installed dependencies.
- An optional Git repository if you enabled it.
That is enough to move straight into environment setup and spraxium dev without a separate manual bootstrap phase.
Directory must not exist
If a directory with the project name already exists in the current path, the command stops immediately without writing any files. Rename or remove the conflicting directory before running the wizard again.
Recommended next steps
After scaffolding, the usual sequence is:
- Fill in the environment variables.
- Run spraxium dev once to confirm the app boots.
- Use spraxium generate to add the first real module, service, or command.
That keeps the project moving in small, verifiable steps instead of adding a lot of code before the first successful boot.