sneferu init
Create a new theme folder from a template. Usage, options, output, exit codes and errors.
On this page
Create a new theme folder from a template.
Scaffolds a complete theme: theme.json, layout, templates, sections, blocks, snippets, groups, locales, assets, plus AGENTS.md and CLAUDE.md for AI coding tools. The folder passes validate as written. See Project structure for every file.
Usage
sneferu init [options] [dir]Arguments
| Argument | Required | Default | Description |
|---|---|---|---|
dir | no | my-theme | Folder to create. |
Options
| Option | Default | Description |
|---|---|---|
--force | off | Write into a non-empty folder. |
--template <name> | starter | What to scaffold: starter, arcade, console, esports, creator, license or bento. |
--list | off | List the templates and exit. |
Examples
sneferu initCreates ./my-theme from the starter template.
sneferu init shop --template arcadeCreates ./shop from the arcade template.
sneferu init --listPrints the templates and exits.
Output
sneferu init my-theme (exit 0)
✔ created my-theme from the starter template — next: cd my-theme && npx sneferu devsneferu init my-theme (exit 2): Run a second time: the folder is no longer empty.
✖ ./my-theme is not empty (use --force to write anyway)sneferu init --list (exit 0): Descriptions shortened here to the first words; the CLI prints the full sentence.
Templates for sneferu init --template <name>:
starter A complete store to start from: header, footer, every page type, tokens you can edit.
arcade A complete dark gaming store for gift cards and top-ups: ...
console A clean white gaming store for gift cards and top-ups: ...
esports A complete bold gaming top-up store: ...
creator A complete editorial store for one creator selling courses, e-books and templates: ...
license A complete dark store for software licences, subscriptions and digital tools: ...
bento A complete soft pastel bento store for printables, templates and e-books: ...Exit codes
| Code | Meaning |
|---|---|
0 | The folder was created, or --list printed the templates. |
2 | The folder is not empty (and --force is not set), or the template name is unknown. The unknown-template message lists the available templates. |
Common errors
✖ ./<dir> is not empty (use --force to write anyway)
The target folder already has files. Pick another folder, or add --force to write into it anyway.
✖ unknown template '<name>'. Available templates: ...
--template names a template that does not exist. Use one of the names printed by sneferu init --list.
