Quickstart
Create a Hekana theme with npx sneferu init, preview it, change one line, then validate and build it. About five minutes.
On this page
The Hekana theme SDK is called Sneferu. It is a command line tool and a small HTML-like language for building store themes. You write a theme as a folder of plain files, check it with validate, and build turns it into one file you can publish to Hekana. A theme cannot run JavaScript, so there is nothing to host.
What you'll build
A complete store theme on your own computer: a home page, product, collection, cart and search pages, a header and footer, in English and Arabic. You will start from the starter that init creates, change the home page heading, and build the result. It takes about five minutes.
You can build a theme for any kind of store with this: a shop, a game top-up store, a digital downloads store. The starter is the neutral place to begin.
Requirements
| What | Version |
|---|---|
| Node.js | 20 or newer (node -v) |
| A text editor | Any. VS Code setup adds syntax colour |
You do not install anything else. npx fetches the sneferu command the first time you run it.
Create a project
npx sneferu init my-theme
cd my-themeinit copies the starter theme into a new my-theme folder. It also writes AGENTS.md and CLAUDE.md into it. These are instructions for AI coding agents, so an agent you open in the folder already knows the rules of a Sneferu theme. See Build with AI agents. The full list of files is on Project structure.
Preview
npx sneferu devOpen http://127.0.0.1:4100. You see the starter store with sample products. Leave the command running: saving a file recompiles it and reloads the page. Use --port 4200 if 4100 is taken.
Customize
The home page starts with a hero section. Its heading text lives in the English locale file, locales/en.json, under the key hero_title. Open locales/en.json and change that line.
Before:
"hero_title": "Everything you need, in one place",Save the file. The preview reloads and the big heading now reads My first Hekana theme.
After:
"hero_title": "My first Hekana theme",Validate and build
Stop the preview with Ctrl+C, then run:
npx sneferu validate
npx sneferu buildvalidate checks the theme against the language and the size limits, and prints theme [email protected] is valid when it passes. build writes the package to dist/my-theme-0.1.0.sneferu.json. That file is what you publish.
How it works
- Pages are in
templates/, and each one lists the sections it shows. - The hero is a section:
sections/hero.snf. It prints the heading witht('hero_title'), which looks the text up in the current language's file inlocales/. - The heading can also be set from the theme editor, as the hero's Title setting. A value set there wins over the locale text.
- Project structure explains what every file
initmade is for. devandbuilduse the same compiler, so what you preview is what you ship.
