Authoring Guide · Getting Started
Versions and upgrades
How create-kb versions work, why 1.2 sites stay safe when 2.0 ships, and how to migrate when you choose to
Versions and upgrades
create-kb versions the generator: the snapshot of the app copied into your repo. It does not install a runtime npm dependency that auto-updates your site.
That is the safety model. When we publish create-kb@2.0.0, people who scaffolded 1.2.x keep the 1.2 files on disk. Their yarn build does not start using 2.0. Nothing in their repo changes until they decide to migrate.
Your generated project records that snapshot in kb.engine.json:
Semver for create-kb
We follow semver on the npm package.
| Bump | Example | What it means for new npx create-kb | What it means for an existing site |
|---|---|---|---|
| Patch | 1.2.1 | Bugfixes, docs, small safe starter tweaks | Your site is unchanged. Optional: copy specific fix files if a changelog tells you to |
| Minor | 1.3.0 | New optional features (new MDX component, extra kb.config.json keys with defaults) | Your 1.2 site keeps running. New keys are optional. You can keep 1.2 forever |
| Major | 2.0.0 | Breaking starter or MDX API (renamed files, required config, dropped Node) | Your 1.2 site still runs. You only take 2.0 by migrating. We publish a migration page for that major |
Releasing a new major does not rewrite other people's repositories. npm create-kb@2 is what new scaffolds get. Old projects stay on the engine they copied.
How to stay on 1.2 on purpose
Pin the generator when you create the project:
Later, npx create-kb@latest is only for new directories. It will not upgrade my-notes in place.
When you want a newer engine
There is no npm update for the copied Next.js app. Treat an upgrade as a content-preserving copy.
- Read
kb.engine.jsonso you know what you are leaving. - Read the changelog for every major you would skip: create-kb CHANGELOG.
- Scaffold next to the old project, same identity flags you used originally:
-
Copy your data and custom UI into the new tree. Keep:
content/(docs and blog)public/assets/that you addedkb.config.jsoncomponents/HomePageClient.tsx,components/Footer.tsx,components/Navigation.tsxif you edited themapp/globals.cssif you edited tokensconfig/docs-order.config.ts
-
Do not blindly copy old
author/,scripts/, orpackage.jsononto 2.0. Those are the engine. Let the new scaffold own them unless you patched them and you know why. -
yarn install && yarn devin the new tree. Fix anything the major migration notes call out. -
Point git at the new tree (or replace files on the same branch after a review).
A 2.0 migration page will list required edits (for example a renamed config key). Minors will not require you to change kb.config.json for the old site to keep building.
What we will not do
- We will not publish a patch or minor that makes old 1.x snapshots fail to build if left untouched.
- We will not make
npx create-kb@latestoverwrite an existing project directory (the CLI already refuses non-empty folders).
A later engine-as-npm-package (npm update @.../kb-engine) would change this story. Until that exists, the snapshot model above is the contract.