CLI reference
The sneferu command line tool: every command with its arguments, options, defaults, real output, exit codes and errors.
On this page
Every command of the sneferu command line tool, with its arguments, options, defaults, real output, exit codes and the errors you can hit. This page lists all of them; each command has its own page.
| Command | What it does | Needs |
|---|---|---|
sneferu init | Create a new theme folder from a template. | Nothing; runs locally. |
sneferu validate | Check a theme folder against the compiler and report every diagnostic. | Nothing; runs locally. |
sneferu build | Compile and package a theme into a .sneferu.json artifact. | Nothing; runs locally. |
sneferu format | Format .snf files, theme.json and locale files with Prettier and the Sneferu plugin. | Nothing; runs locally. |
sneferu dev | Start a local preview server that rebuilds when files change. | Runs locally; no login and no network. |
sneferu login | Sign in with your Hekana account in the browser and save a developer key. | Needs network and a Hekana account (a browser step). |
sneferu logout | Revoke the saved developer key and delete it. | Revoking a saved key needs network. |
sneferu whoami | Show the account, key and dev store the CLI uses. | Needs network when signed in. |
sneferu push | Upload the theme source to Hekana as a new version. | Needs network and a Hekana sign-in. |
Environment
HEKANA_TOKEN: Token used by push and whoami instead of the saved key.HEKANA_API_URL: API address for push, login and whoami.
Exit codes
Every command exits 0 on success and non-zero on failure, so it can gate a script or CI. The exact failures per command are on the command pages. init exits 2 for its own errors; the other commands exit 1.
Diagnostics
validate, build and push print compiler diagnostics as file:line:col severity CODE message. Every code has a page under Errors with the message, the fix and an example.
Output shown on these pages
Output blocks were produced by running the real CLI (version 0.11.0) in a temporary folder, with paths shortened. Commands that need a Hekana sign-in or the network show only the deterministic part (for example the not-signed-in message); their success output is described, not invented.
