Commands

On this page

Run the commands in the site's folder, through your package manager (npx kilim build, pnpm kilim build) or a package.json script. kilim --help lists them all.

Working on a site

CommandWhat it does
kilim devBuilds into .kilim/dev, serves it at port 1923 and rebuilds what changed on save.
kilim newCreates a content file with a frontmatter skeleton from the collection schema.
kilim typesWrites the collections' TypeScript types to .kilim/types.d.ts.

kilim dev shows drafts and scheduled pages with a badge, an error overlay with the file and line when a build fails, the admin at /admin/ and a catalog of the theme's components and blocks at /__kilim/blocks. It only listens on localhost.

kilim new posts "Hello world" writes content/posts/hello-world.md with the collection's fields: the title, today's date when the schema has one, draft: true when it has a boolean draft, and the other optional fields as comments, except the ones marked .meta({ advanced: true }). --slug 2026/hello picks the file name.

Building and publishing

CommandWhat it does
kilim buildBuilds the site into dist/. Nothing is written when a page fails.
kilim checkRuns the SEO and link rules over the last build; exits with 1 on errors.
kilim previewServes dist/ at port 1453, with redirects and 404.html like a static host.
kilim deployBuilds, checks and uploads only what changed, with config deploy.
kilim doctorChecks Node.js, the config, the theme, types, url and the deploy setup.

Useful options:

  • kilim check --format github writes GitHub Actions annotations on the content files; --format json (or --json) is for other tools.
  • --max-warnings <n> makes check, deploy and doctor fail on more than n warnings.
  • kilim preview --host opens the preview to your network, to try the site on a phone.
  • kilim deploy --dry-run lists what would change without uploading; see Deploy.

Starting and themes

CommandWhat it does
kilim init [dir]Creates a site from a template (--template blog, landing or docs).
kilim theme new <name>Writes a working theme skeleton to themes/<name>/.
kilim theme add <source>Downloads a theme from GitHub, npm or a .tgz into themes/.

--port <port> changes the port of dev and preview.