Skip to content

Installation

This page covers what you need on your machine before you create a Kiln app, and how to install the CLI.

Requirements

Kiln needs a JavaScript runtime and a package manager. The CLI checks both with kiln doctor.

  • Bun 1.1 or later is recommended. When the CLI runs under Bun, it bundles with Bun.build for the Vercel adapter.
  • Node.js 18 or later is supported. Under Node, the Vercel adapter bundles with esbuild. The SQLite auth adapter needs Node 22 or later, because it uses node:sqlite.

kiln doctor reports a failure for Node versions below 18 and a warning for Bun versions below 1.1.

Installing the CLI

The CLI is published as @kiln-js/cli. Most projects add it as a dev dependency, so each project pins its own version:

bash
bun add -d @kiln-js/cli

You can also run it without installing it first:

bash
bunx @kiln-js/cli create my-app

After installation the kiln command is available through your package manager's scripts. For example, the starter's package.json maps bun run dev to kiln dev.

Checking your setup

Run the doctor from the project root to check the runtime, the project files, the installed packages, and the configuration:

bash
bunx kiln doctor

The doctor groups its results into sections:

  • Runtime checks the Bun or Node version and the CLI version.
  • Project checks for package.json, node_modules, and tsconfig.json, and reports whether the routes can be read.
  • Packages lists each Kiln package and reports whether it is installed, optional, or at a version that does not match the CLI. A mismatch fails the check, because the CLI and the runtime packages must agree.
  • Configuration checks for DATABASE_URL when the app uses it, that the Markdown plugin is set up, and that React is not installed twice.

Version alignment

Every Kiln package in one project should come from the same release. kiln dev checks this when it starts and stops with an error if the installed packages disagree with the CLI. If you see a version error, run bun install at the top of your workspace, then start again.