SnabbSajt · Docs
Site Kit SDK

CLI reference

Local conversion, review, validation, packing, diagnostics, and skill commands.

The primary binary is snabbsajt. All commands are local and keyless.

Import HTML

snabbsajt site import html <public-url|file.html|site.zip> [-o package-dir] [--json]

Import WordPress

snabbsajt site import wordpress --url <public-url> --wxr <export.xml> --out <package-dir> [--json]

Approve an import

snabbsajt site import approve <package-dir> --yes [--json]

Approval refuses blocked reports and unexpected changes to the original deterministic report or generated site.

Namespaced package commands

snabbsajt site init <dir> [--template nextjs|html] [--json]
snabbsajt site validate <site.json|dir> [--json]
snabbsajt site inspect <site.json|dir> [--json]
snabbsajt site pack <dir> [-o bundle.zip] [--page <slug|externalKey> ...] [--review-draft] [--json]
snabbsajt site doctor [--json]

Skills

snabbsajt skills install --agent auto|codex|claude|all [--global] [--force] [--json]
snabbsajt skills list --agent auto|codex|claude|all [--global] [--json]
snabbsajt skills doctor --agent auto|codex|claude|all [--global] [--json]

Project-local installation is the default. Modified skill files are preserved unless --force is explicit, and a backup is created before replacement.

Compatibility alias

The @snabbsajt/site-kit package still exposes site-kit for hand-authored packages. New import and skill workflows use snabbsajt.

Legacy site-kit commands

site-kit init

site-kit init <dir> [--template nextjs|html]

Creates a starter package and refuses to overwrite an existing site.json.

site-kit validate

site-kit validate <site.json|dir>

Checks the versioned envelope, section content, variants, caps, references, duplicate ids/slugs, and file names. A directory check also requires exactly one matching file for every declared asset and uploaded font.

The exit code is 0 when there are no errors. Warnings do not fail CI.

site-kit inspect

site-kit inspect <site.json|dir>

Validates, then prints the business name, language, counts, and section types as JSON.

site-kit pack

site-kit pack <dir> [-o bundle.zip] [--page <slug|externalKey> ...]

Validates, checksums the embedded files, and creates the self-contained bundle accepted by SnabbSajt. Packing fails on missing or ambiguous files and on the total size cap.

The repeatable --page flag packs a partial bundle containing only the named pages (matched by slug or externalKey), their sections, and the assets they reference. Partial bundles are meant for merge imports into an existing site.

Incremental (merge) import workflow

  1. Give every page and section a stable externalKey in site.json (for example "home", "home/hero"). validate errors on duplicate keys and warns on keyless sections (those are insert-only).
  2. First import creates the site as usual.
  3. For an update, change the package, then pack only what changed:
    site-kit pack <dir> --page home --page contact
  4. Import the partial bundle into the existing site (a merge, via the import API's mergeIntoWebsiteId). New keys insert, unchanged keys no-op, untouched sections update in place, and sections the owner edited in the app are skipped as conflicts unless explicitly forced. Nothing is deleted, site settings/theme/fonts are untouched, and a restore point is taken before the first write.

On this page