SnabbSajt · Docs
For website ownersFor developers
Site Kit SDK

Site Kit SDK

Convert Next.js, HTML, or WordPress evidence into a safe, editable SnabbSajt site package.

Site Kit is the open-source toolkit for developers and coding agents that need to bring an externally built website into SnabbSajt.

It does not execute Next.js, React, HTML, CSS, or JavaScript inside SnabbSajt. You map the finished site's content and structure to SnabbSajt's typed sections, validate the result locally, and pack it into the same self-contained bundle used by the product's backup importer.

What you get

  • A typed defineSite() authoring helper for TypeScript.
  • HTML URL/file/zip and WordPress URL+WXR conversion commands.
  • init, validate, inspect, review, approval, and pack commands.
  • The production package validator and import caps.
  • The public section registry, variants, theme types, and package types.
  • Checksum-protected image and font bundles.
  • Versioned agent skills for Codex and Claude Code.

What stays safe

By default the import creates a new unpublished draft. It never publishes a site. The SnabbSajt server validates the package and asset bytes again before storing anything. Raw HTML, scripts, iframes, custom CSS, and foreign database ids are not accepted.

Incremental merge import

Packages can also be merged into an existing site instead of creating a new one. Give every page and section a stable externalKey, pack the package as normal, and import as a merge: new keys insert, and nothing is ever deleted. Where a section exists on both sides the merge works field by field. Every field the owner has not touched takes your new value; a field they edited in SnabbSajt keeps their value and is reported back to you. So a client fixing one headline no longer freezes the whole section against your next push. The merge decides what changes by matching keys, so there is nothing to select at pack time. A restore point is taken automatically before the merge. See the CLI reference and import report for details.

Merge is not in the browser UI yet. The browser importer always creates a new draft site. Merging a partial bundle into an existing site runs through the MCP import_site tool (see below) or the site-kit script. A browser flow for it is planned.

Getting developer access

Pushing into a site, and serving it from your own hosting, are the two things that need an operator grant. Ask for it in the product: open a site, go to Inställningar › Avancerat › Utvecklare (Settings › Advanced › Developer), say what you are building, and send it. We answer by hand, usually the same day.

Once it is on, that same page carries the three commands to run and this site's id, so you can go from approval to a first --dry-run push without leaving it.

Nothing else in Site Kit is gated: authoring, validating, inspecting and packing a site all work with no account at all.

Authentication

Site Kit is local and keyless. You do not need an API key to author, validate, inspect, or pack a site.

Importing the zip (no key needed). A signed-in SnabbSajt user opens /dashboard/import, labelled "Läs in ett hemsidepaket" / "Load a website package", and chooses the file. That page works even on a brand-new account with no sites yet, so it is the link to hand a client. The same file picker also sits in Settings › Importera (Import) under "Läs in en kopia eller ett paket".

Importing over MCP (agents). The import_site MCP tool does the same thing without a browser. It requires the content:write scope and nothing else: the advanced-editor capability was dropped (owner ruling 2026-07-25) because the browser importer is the proof that turning a package into a draft site is not a privileged act. The limits that do apply are the connection's scope, the per-workspace import rate limit and the per-plan site cap. Merging into an existing site works from both the tool and the browser.

Start with the quickstart, then choose the Next.js, HTML, or WordPress workflow.

Site Kit 0.2 is published on npm as @snabbsajt/cli@0.2.0. It is a beta: expect the package format to stay stable, the browser surfaces to keep moving. Automatic pixel-perfect code conversion is not part of the SDK.


Didn't find the answer, or is something wrong here? Tell us.

Last updated on

On this page