@laikacms/decap
v1.0.1
Published
Decap CMS integrations for Laika CMS: backend, OAuth2, widgets, server adapters. AI chat lives in @laikacms/decap-ai. The Decap CMS shell itself (App, DecapCmsProvider, widgets) lives in the upstream-named `@laikacms/decap` fork.
Maintainers
Readme
@laikacms/decap
Decap CMS integrations for Laika CMS: backend adapter, OAuth2 server, custom widgets, and an AI chat assistant.
pnpm add @laikacms/decapExports
Type utilities
| Export | Purpose |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| @laikacms/decap/decap-config-types | ExtractFieldsType<T>, ExtractCollectionType<T> — TypeScript utilities to derive typed frontmatter from a const-asserted Decap CMS config |
decap-config-types usage
import { ExtractCollectionType, ExtractFieldsType } from '@laikacms/decap/decap-config-types';
import config from './config.gen';
// Pick a collection by name from the const-asserted config
type PagesCollection = Extract<
typeof config['collections'][number],
{ name: 'pages' }
>;
// Derive the entry type — fields only
type PageEntry = ExtractCollectionType<PagesCollection>;
// Equivalent to: ExtractFieldsType<PagesCollection['fields']>
// You can also go field-level directly
type PageProps = ExtractFieldsType<PagesCollection['fields']>;Backend & API
| Export | Purpose |
| ----------------------------------------- | --------------------------------------------------- |
| @laikacms/decap/decap-api | Decap-compatible HTTP API on top of a Laika storage |
| @laikacms/decap/decap-cms-backend-laika | Decap CMS backend that talks to decap-api |
| @laikacms/decap/decap-oauth2 | OAuth2 server (GitHub-style) for Decap login |
Widgets
| Export | Purpose |
| ----------------------------------------------------------- | ----------------------------- |
| @laikacms/decap/decap-cms-widget-lucide-icon | Lucide icon picker widget |
| @laikacms/decap/decap-cms-widget-radix-icon | Radix icon picker widget |
| @laikacms/decap/decap-cms-editor-component-embedded-entry | Embed entries inside Markdown |
AI
AI features live in the separate
@laikacms/decap-ai package:
pnpm add @laikacms/decap-ai| Export | Purpose |
| --------------------------- | --------------------------------------- |
| @laikacms/decap-ai | AI chat backend (Anthropic-powered) |
| @laikacms/decap-ai/tools | Tool definitions for the AI chat |
| @laikacms/decap-ai/widget | AI chat widget for in-editor assistance |
Locales
@laikacms/decap/decap-cms-locale-nl — Dutch locale for Decap CMS.
i18n bundles are exposed per-module: …/decap-oauth2/i18n, …/decap-oauth2/i18n/en,
…/decap-oauth2/i18n/nl.
Companion packages
laikacms— core domain, APIs, serializers@laikacms/decap-ai— AI chat backend and widget for Decap CMS@laikacms/github— GitHub storage@laikacms/aws— AWS implementations
Documentation
See the laikacms repository for setup and integration guides.
License
MIT
