Skip to main content

SDKs & CLI

Krios ships four packages alongside the CMS itself, each with a focused purpose.

Packages

PackagePurpose
@krios/sdkTypeScript client for the delivery + management APIs
@krios/reactReact rich-text renderer + preview overlay
@krios/cliSchema push/pull, content import/export, key management
@krios/custom-element-sdkBuild custom field types that render as iframe widgets

All four are stable and TypeScript-first. The SDK runs in any JS environment with fetch; the React package targets React 18+; the CLI runs on Node 20+.

Choosing what to use

  • Building a frontend that reads from Krios → @krios/sdk (+ @krios/react if you use React).
  • Operations / schema management / CI integration → @krios/cli.
  • Building a custom field type widget → @krios/custom-element-sdk.
  • Direct REST or GraphQL access — no SDK required. The endpoints are documented in API Reference.

Installation

pnpm add @krios/sdk @krios/react
# or
npm install @krios/sdk @krios/react
# or
yarn add @krios/sdk @krios/react

The CLI is distributed as a global tool:

pnpm add -g @krios/cli
krios --help

Versioning

All four packages move on the same version line as the CMS itself. Major versions track CMS major versions; minor / patch ship independently.