Skip to content
Hekana Spray
Documentation
Getting started
Theme development
Components and tags

Localization

Apps and custom code

Examples and recipes
API reference
Publishing
Build apps
AI development

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

WhatVersion
Node.js20 or newer (node -v)
A text editorAny. 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

bash
npx sneferu init my-theme
cd my-theme

init 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

bash
npx sneferu dev

Open 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:

locales/en.jsonJSON
  "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:

locales/en.jsonJSON
  "hero_title": "My first Hekana theme",
Result
The hero after the change, drawn by the same renderer the dev preview uses. 1080 px wide, with the preview's sample data.

Validate and build

Stop the preview with Ctrl+C, then run:

bash
npx sneferu validate
npx sneferu build

validate 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 with t('hero_title'), which looks the text up in the current language's file in locales/.
  • 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 init made is for.
  • dev and build use the same compiler, so what you preview is what you ship.

Next steps