Installation
Requirements
Section titled “Requirements”- Node.js 18 or later
- A Contentful space with a management token
Packages
Section titled “Packages”ctkit is split into two packages:
| Package | Purpose |
|---|---|
@ctkit/cli | The CLI tool — run commands like ctkit push, ctkit generate, ctkit migrate |
@ctkit/core | Types, constants, and validators — import these in your schema files |
Installing @ctkit/cli automatically installs @ctkit/core as a dependency, so a single install gives you everything.
Install ctkit
Section titled “Install ctkit”You can install ctkit as a project dependency (recommended) or globally.
Project dependency
Section titled “Project dependency”npm install @ctkit/clipnpm add @ctkit/cliyarn add @ctkit/cliThen run it with npx ctkit, pnpm ctkit, or yarn ctkit.
Global install
Section titled “Global install”npm install -g @ctkit/clipnpm add -g @ctkit/cliyarn global add @ctkit/cliVerify installation
Section titled “Verify installation”ctkit --versionYou should see the installed version printed to stdout. If you installed locally, use npx ctkit --version.
Importing in schemas
Section titled “Importing in schemas”Schema files import types, constants, and validators from @ctkit/core:
import { ContentTypeSchema, FieldType, validators } from '@ctkit/core';